id: aws-api-key

info:
  name: AWS API Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/aws.yml
    - https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
    - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
    - https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html
    - https://docs.aws.amazon.com/accounts/latest/reference/credentials-access-keys-best-practices.html
  metadata:
    verified: true
    max-request: 1
  tags: aws,amazon,token,exposure,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - '\b((?:A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16})\b'
# digest: 4a0a0047304502201a3c4ee597d431a1a322cf5f547c8bf311f6f5b56e2cd434c03c0e8706004fee02210095e4884b00a955b0c1ab87e0f79b622c4991725b7b4be24417762cf4838c85fe:922c64590222798bb761d5b6d8e72950