Insufficient CI/CD Credential Hygiene
One key, everywhere, and nobody can say what rotating it breaks.
What Is Insufficient CI/CD Credential Hygiene?
One credential shared by many repositories is never rotated, because rotating it means coordinating teams nobody has mapped, so its blast radius and its rotation cost grew together until rotation became impossible. You'll watch an attacker take the shared key from one low-value repository and deploy to an unrelated production system, then fix it by building a consumer inventory, splitting the credential per service with an owner each, and rehearsing a rotation instead of deferring it.
What You'll Learn in Insufficient CI/CD Credential Hygiene
- A credential shared by many consumers accrues rotation debt: its blast radius and the cost of rotating it grow together until rotation is deferred forever.
- A shared credential's reach is the sum of every consumer, so compromising one low-value repository that holds it reaches everything it can deploy to.
- Build an inventory that maps each credential to its consumers and an owner, so a rotation's impact is known rather than feared.
- Split shared credentials per service with an owner and rotation date each, and rehearse rotations instead of deferring them.
Insufficient CI/CD Credential Hygiene — Training Steps
-
One key, everywhere
Bob compromised the pipeline of a low-value repository, internal-docs. It builds a static site and deploys nothing important, so it was never a priority to protect. But its secret store holds DEPLOY_KEY, and DEPLOY_KEY is shared. The same key sits in many repositories, because giving everything one key was simpler than managing many.
-
Shared, unowned, never rotated
The credential Bob pulled from the docs repo is used across many repositories, has no owner, and has never been rotated. Its reach is nothing to do with the low-value repo he came in through.
-
Deploy somewhere it should not reach
To prove the reach, Bob uses the shared key from the docs pipeline to deploy to payments-api, a production system the docs repository has nothing to do with.
-
Why it reached so far
-
We need to rotate, but
Harlvane's monitoring caught a deploy to payments from the internal-docs pipeline. The obvious response, rotate the shared key, runs straight into the reason it was never rotated.
-
The credential nobody can turn off
Alice opens the shared credential. It is used across many repositories, owned by no one, and has never been rotated, and the page itself warns that rotating it would break an unknown set of consumers.
-
Find out who uses it
Before anything can be rotated, Alice has to know what depends on the key. She builds an inventory of its consumers from the deploy logs, the secret stores and the pipelines that read it.
-
Twelve consumers, now known
The inventory names what the shared key actually deploys to: twelve services across several teams, each now with an owner. For the first time, what a rotation would affect is written down.
-
Split it per service
A shared key will always drift back into this state. Alice splits it into one credential per service, each with an owner and a rotation date, and rehearses rotating the first one to prove the process works.
-
A rotation that just works
Each service now has its own credential, its own owner and a rotation date. Rotating the payments-api credential touched only payments-api, and nothing else broke, because nothing else shared it.
Security Framework Coverage
OWASP CI/CD Top 10
- CICD-SEC-6 Insufficient Credential Hygiene
CWE
- CWE-522 Insufficiently Protected Credentials
- CWE-262 Not Using Password Aging
MITRE ATT&CK
- T1078 Valid Accounts
CIS Controls
- CIS 5 Account Management
- CIS 16 Application Software Security
NIST CSF
- PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
- PR.AA Identity Management, Authentication, and Access Control
- PR.PS Platform Security
NICE Framework
- DD-WRL-004 Secure Systems Development
- IO-WRL-005 Systems Administration