id: fastly-token

info:
  name: Fastly API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/fastly-api-token.yaml
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/fastly-api-token.go
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    verified: true
    max-request: 1
  tags: fastly,exposure,tokens,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?:fastly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 4a0a00473045022016485371c5b2c89367b9b02bde63e425be4ad80aa60284ed0cf9f0582ac06108022100965627e335dc2efcba1430ce6e68d61ad9044b7c3a6ad23abf0d74560909f5bd:922c64590222798bb761d5b6d8e72950