id: age-identity-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
  metadata:
    verified: true
  tags: file,keys,age-encryption,token

file:
  - extensions:
      - all

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