Skip to content
StrikeOps

Secrets Committed to Source Code Repositories

HighTypical severity Containers, CI/CD and source codeCWE-798ATT&CK T1552.001

01Description

Credentials such as API keys, database passwords, cloud access keys and private keys were found in source code repositories, including in commit history.

02Impact

Anyone with repository access, and anyone who obtains a copy through a leak or compromised developer account, can use the secrets. Deleting the file does not remove the secret from Git history.

03Severity

Typically

High

Typically High. Severity follows the secret: Critical for production database, cloud or signing keys; Medium for revoked or low-privilege test credentials.

04How to verify

  1. 1Scan repositories and full history with a secret scanner such as gitleaks or trufflehog.
  2. 2Validate whether discovered secrets are active using read-only checks.
  3. 3Identify who has access to affected repositories.

Testing note: only test systems you are authorized to test, within the agreed scope and rules of engagement. Verification steps are written for professional testers and avoid destructive techniques.

05Remediation

  1. 1Revoke and rotate every exposed secret; rewriting history alone is not enough.
  2. 2Store secrets in a vault or the CI/CD platform's secret store.
  3. 3Enable push protection and secret scanning on all repositories.

06References

Draft findings like this from your own evidence

Book a demo
Book a demo