id: aws-api-key

info:
  name: AWS API Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/data/default/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: 4a0a0047304502207118952ea0a8b6664bcae08a48442709a6a0afef1b5e391f4935c18698b4d46e022100bc84d681d727f11b629e3cd9d41833807431a5834c47f12fe502b7299803ad8c:922c64590222798bb761d5b6d8e72950