id: amazon-session-token

info:
  name: Amazon Session Token - Detect
  author: DhiyaneshDK
  severity: info
  description: Amazon session token was detected.
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/aws.yml
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    verified: true
  tags: file,keys,aws,amazon,token,session

file:
  - extensions:
      - all

    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/+=]'

# Enhanced by md on 2023/05/04
# digest: 4a0a0047304502204b382689d26dfb84573e4907d4fd5f918350c6f78a356361afe3ec7cd1599974022100c4dc735fa0147243b03bc374a745840fe8233d12f5767e4795767281bd142b58:922c64590222798bb761d5b6d8e72950