Pcornel
Security · Secrets Management

Secrets

Cheat sheet · https://pcornel.dk/topic.php?topic=5059

Back to the Topic

Answer

Secrets are credentials that grant access — passwords, API keys, tokens, certificates and private keys. Anyone who has one can act as its owner, so they need storage, access control and rotation.

Remember

  • Secrets grant access to whoever holds them.
  • Store, restrict, audit and rotate.
  • Assume leaked secrets will be used.

First checks

  • gitleaks detect --source . — find secrets in code
  • trufflehog git file://. — history scan
  • Secret owners and rotation dates — inventory

Verify in this order

secret created → stored securely → used → rotated → revoked

Where it usually breaks

First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5059

Confirmation

Confirm action

Continue?