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