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

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