id: adafruit-api-key

info:
  name: Adafruit API Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/adafruit-api-key.yaml
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/adafruit-api-key.go
  metadata:
    verified: true
    max-request: 1
  tags: adafruit,exposure,tokens

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

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