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,vuln

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: 4b0a00483046022100fba096ab3af2ce8e0d2cf943a4a2ff302ad3ce95d1f093e15994c2716dfb2626022100c256de275567accb2976b3d305628ff76ba3c903070b636acd7e10c97874ccad:922c64590222798bb761d5b6d8e72950