Pipeline security
Short answer: a secret that reached a git repository is compromised, even if the commit was deleted, because it stays in history and every clone. Rotate it first, then investigate. To stop new leaks, scan in three places: a pre-commit hook on developer machines, push protection or a scan in CI that blocks the merge, and continuous scanning of the whole history; and replace long-lived keys with short-lived credentials (OIDC federation from CI to the cloud) wherever possible. For NIS2 and similar rules, a leaked production credential can also be a reportable incident: check the deadlines with our incident reporting clock.
Hardcoded credentials are the most boring vulnerability class and one of the most reliably exploited. The mechanics are mundane: a developer tests with a real API key, commits, pushes. Maybe the key is removed in the next commit — but git is a history, not a state, and the secret lives on in every clone forever. Attackers know this; automated scanning of exposed repositories for credential patterns is continuous, and freshly leaked cloud keys see abuse within minutes, not days.
.gitignore prevents future accidents for that path; it does nothing for the config file already committed, the key pasted into a test, or the .env that was renamed. And deleting a leaked secret in a new commit removes it from the working tree while preserving it perfectly in history — visible to anyone with git log -p. Truly removing it requires history rewriting, which is disruptive enough that the practical rule is simpler: a committed secret is a burned secret. Rotate it.
Modern scanners combine pattern matching (known key formats are highly recognizable) with entropy analysis for the generic high-randomness strings. Expect false positives early; tune with allowlists rather than turning detectors off.
No. The secret stays in git history, in every clone and fork, and often in CI logs and caches. Treat it as compromised: revoke or rotate it first, then decide whether rewriting history is worth the disruption.
Combine a pre-commit secrets scanner on developer machines, push protection or a blocking scan in CI, and scheduled scans of full history. Each layer misses things the others catch.
Use OpenID Connect federation: GitHub Actions, GitLab CI and Azure DevOps can exchange a short-lived identity token for temporary cloud credentials in AWS, Azure or Google Cloud, so there is no stored key to leak.
We wire secrets scanning, SAST and dependency checks directly into your pipelines — findings routed to your SIEM and your tickets, with the rotation runbooks for what scanning finds.
Get in touch →