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

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