id: age-secret-key

info:
  name: Age Identity (X22519 secret key)
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/age.yml
    - https://github.com/FiloSottile/age/blob/main/doc/age.1.html
    - https://github.com/C2SP/C2SP/blob/8b6a842e0360d35111c46be2a8019b2276295914/age.md#the-x25519-recipient-type
    - https://age-encryption.org
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    verified: true
    max-request: 1
  tags: age-encryption,exposure,tokens,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - '\bAGE-SECRET-KEY-1[0-9A-Z]{58}\b'
# digest: 4b0a0048304602210089b57103edfcc59d4b74b093faa073ac67a73fe251ba4427822f5c99d94ec89a022100b49321f39d8901970137ed186dd810e23ad9487bb9cb791959571836f63fd19d:922c64590222798bb761d5b6d8e72950