id: aws-session-token

info:
  name: AWS Session Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/aws.yml
  metadata:
    verified: true
    max-request: 1
  tags: aws,amazon,token,exposure,session

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

    extractors:
      - type: regex
        part: body
        regex:
          - '(?i)(?:aws.?session|aws.?session.?token|aws.?token)["''`]?\s{0,30}(?::|=>|=)\s{0,30}["''`]?([a-z0-9/+=]{16,200})[^a-z0-9/+=]'
# digest: 4a0a004730450221008bf46938094c16ce78be6928aa01ab2d5f4922eb6e1db9734476941dc0e2384902201dca08a987f71845228f80ac18a4b99a7937478e737799a5e4590a8508a1079b:922c64590222798bb761d5b6d8e72950