id: contentful-token

info:
  name: Contentful Delivery API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/contentful-delivery-api-token.yaml
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/contentful-delivery-api-token.go
  metadata:
    verified: true
    max-request: 1
  tags: contentful,exposure,tokens

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

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