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
    - https://io.adafruit.com/api/docs
  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: 4a0a0047304502205962c3a7203e6dc880905ceb92a0d0765f7cbec0e9bafa0d0bf4ec4f82fddb48022100f329e824271df0a02414ee92ec208c2c7d2720d6bf4adfaeed0da0e7bf5dea18:922c64590222798bb761d5b6d8e72950