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: 490a0046304402207b733af211f5e36a8c217ded3fdd05d3baf8178e20df66383f23d34a9767b7b402207bdfc9d90d6f8b14d42fdaf5749b9099878cb8aab6c7a77a0a3eaf379eedd050:922c64590222798bb761d5b6d8e72950