Inadequate CI/CD Identity and Access Management
The contractor was offboarded. Their CI token never was.
What Is Inadequate CI/CD Identity and Access Management?
Offboarding removes a person from the identity provider, but not the service account they created or the CI token they minted. Human identity is centralised; machine identity is not. You'll watch an attacker authenticate to the CI API with a contractor's token seven months after that contractor's account was disabled, then fix it by binding tokens to the directory with a short lifetime and a named owner, so a token dies when its owner does.
What You'll Learn in Inadequate CI/CD Identity and Access Management
- Offboarding removes a person from the directory, but not the service account or CI token they created, because machine identity is not centralised.
- A CI API that trusts a static token on its own, without consulting the directory, keeps accepting a disabled owner's token indefinitely.
- Bind machine identities to the directory: short-lived federated tokens checked on use, each with a named owner, revoked when the owner is disabled.
- Keep an inventory of non-human identities with an owner and an expiry each, since a token that is owned and expiring cannot become an orphan.
Inadequate CI/CD Identity and Access Management — Training Steps
-
A token that outlived its owner
Thrayle offboarded a contractor, Devrin Malreth, seven months ago. Their single sign-on account was disabled the day the contract ended, exactly as the process requires. But Devrin minted a CI token while they were here, and Bob has it. Disabling the person's login did nothing to the token.
-
Disabled owner, live token
The identity list carries both people's logins and the machine tokens they created. Devrin's login is disabled. The token they minted is not: it has no expiry, no owner now that the person is gone, and it was used minutes ago.
-
It still authenticates
Bob presents the token to the CI API and asks for the source of a private repository that Devrin never worked on. The API checks that the token string is valid and that is all it checks.
-
Logged as a ghost
Bob reopens the identity settings. His pull is in the activity log, recorded under the disabled contractor's name. To the CI system this was Devrin, back at work after seven months away.
-
Why it still worked
-
A disabled account, active
Thrayle's identity monitor watches for accounts acting after they were disabled. This morning it matched one: a contractor disabled over half a year ago, authenticating to the CI API.
-
Find the orphan
Alice opens the same identity settings. The monitor pointed at one token, but the list is where she can see it beside every other machine identity and confirm what state it is in.
-
The activity that was flagged
The activity log shows what the monitor caught: the disabled contractor's identity, authenticating to the CI API and pulling private source, seven months after the account was switched off.
-
No owner, no expiry
The token itself tells the story. Its owner is a disabled account, it has no expiry, and it is a static string that is trusted for as long as it matches. Offboarding acts on people in the directory, and this token was never in the directory.
-
Shut it down
The first move is to stop the bleeding: revoke this token now, so the identity the monitor flagged cannot authenticate again while Alice fixes the cause.
Security Framework Coverage
OWASP CI/CD Top 10
- CICD-SEC-2 Inadequate Identity and Access Management
CWE
- CWE-324 Use of a Key Past its Expiration Date
- 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