id: sentry-access-token

info:
  name: Sentry Access Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/sentry-access-token.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/sentry-access-token.yaml
  metadata:
    verified: true
    max-request: 1
  tags: sentry,exposure,tokens

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

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