id: yandex-access-token

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

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 490a004630440220191ce109e5b99b5a9a60c3c8a456859cb49fd2fbd4ac587cca60d48f6359d0a402205abeb6f03ebe7ef8dfddb03597a6270257b84e67051b5871b3d1f0993ea1c6df:922c64590222798bb761d5b6d8e72950