id: yandex-api-key

info:
  name: Yandex API Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/yandex-api-key.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/yandex-api-key.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}(AQVN[A-Za-z0-9_\-]{35,38})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 490a00463044022023c520b5edc8947ac0c6bb050bdb8eadf9163ce18ce326525d06cba8b5dc603202203c3b86db124c9d16933e553661094c6e23b777c7921d0771be75d334029d641c:922c64590222798bb761d5b6d8e72950