id: newrelic-api-service-key

info:
  name: New Relic API Service Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/newrelic.yml
    - https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys
    - https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#user-key
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    verified: true
    max-request: 1
  tags: newrelic,exposure,tokens,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)\b(nrak-[a-z0-9]{27})\b
# digest: 4b0a00483046022100ab0f00d5f554498b17d682e673e6ea2a598a39dd3605223ad9fd06f25716245602210083415b2abbfcd35629f9a729372d05dc55510cdd78868151a4dad1b2dedddeb7:922c64590222798bb761d5b6d8e72950