id: yandex-aws-access-token

info:
  name: Yandex AWS Access Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/yandex-aws-access-token.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/yandex-aws-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}(YC[a-zA-Z0-9_\-]{38})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 4a0a00473045022100fcb22d4276c7333891476e6318b2632b0f684b999bde02bb50d8d1b50f99475802200863ee870928a19de527868a2942526cc67244ebbf7dc2bdb33df053f7773114:922c64590222798bb761d5b6d8e72950