Skip to content

LS-KEY-001: RSA Private Key

Severity CRITICAL
Blast radius Server access or identity impersonation
Rotate at https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

If this leaks

Allows an attacker to impersonate the key owner for SSH logins, TLS termination, or code signing wherever the matching public key is trusted.

What to do

  1. Rotate or revoke the credential at https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent.
  2. Check the provider's audit logs for use you don't recognise.
  3. Remove it from git history (leakscan purge --help) and load it from an environment variable or secret manager instead.

Pattern

-----BEGIN RSA PRIVATE KEY-----

Suppress

On one line: # leakscan:ignore LS-KEY-001. For the whole project:

disable_rules: [LS-KEY-001]