id: private-key

info:
  name: Private Key Detect
  author: gaurang,geeknik
  severity: high
  tags: file,keys,token
file:
  - extensions:
      - all

    extractors:
      - type: regex
        regex:
          - "BEGIN OPENSSH PRIVATE KEY"
          - "BEGIN PRIVATE KEY"
          - "BEGIN RSA PRIVATE KEY"
          - "BEGIN DSA PRIVATE KEY"
          - "BEGIN EC PRIVATE KEY"
          - "BEGIN PGP PRIVATE KEY BLOCK"
          - "ssh-rsa"
          - "ssh-dsa"
          - "ssh-ed25519"
# digest: 4a0a0047304502203d84bdd80958e93fab396d28643588f26175a3c06c7e978b29993e028b80f37f022100f8e840ad963ba575c0fbee1ebc8479700ddb1d4bc3da274508550896f7169693:922c64590222798bb761d5b6d8e72950