id: reactapp-env-js

info:
  name: React App Environment Js
  author: random-robbie,rinolock
  severity: unknown
  metadata:
    verified: true
    max-request: 4
    github-query: "REACT_APP_"
  tags: react,exposure,config,js,javascript

http:
  - method: GET
    path:
      - "{{BaseURL}}/env.js"
      - "{{BaseURL}}/config.js"
      - "{{BaseURL}}/config/env.js"
      - "{{BaseURL}}/config/runtime-env.js"

    stop-at-first-match: true
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "REACT_APP_"

      - type: word
        part: header
        words:
          - "application/octet-stream"
          - "application/javascript"
          - "text/plain"
        condition: or

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100f27a77a6097ae96f0ecedeeb335cb7c6731310d65235c2ce51eb0b5fab82163f022012a0f94fbad59989bd88806ee28916bc8868848591270f4b041c30327155e8b7:922c64590222798bb761d5b6d8e72950