Join our Newsletter — 33% off our NHI Course
Home› FAQ› NHI Lifecycle Management› What should organisations do when a developer or…
NHI Lifecycle Management

What should organisations do when a developer or bot no longer needs GitLab access?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 6, 2026 Domain: NHI Lifecycle Management

Remove the SSH key immediately and confirm the change across any linked automation, because leaving the key in place preserves access beyond the valid trust window. The cleanest offboarding process ties key removal to leaver workflows and pipeline decommissioning, not to ad hoc manual cleanup.

What offboarding should look like for GitLab access

When a developer leaves, or a bot is retired, GitLab access should be removed as part of the same offboarding event, not left for a later cleanup task. The key control is to revoke the credential that actually authenticates the actor, then verify that any linked pipeline, integration, or automation has been disabled or rekeyed so the access path does not survive the departure.

For human users, that usually means removing personal SSH keys, tokens, and any SSO-linked access that can still reach GitLab. For bots and service workflows, the offboarding step must also identify every repository, deployment job, and automation script that relied on the key, because the access may be embedded in a CI pipeline rather than obvious in the user list.

GitLab-specific offboarding is especially important because source control access often spans code, secrets, package registries, and deployment automation. A key that stays valid after the owner no longer needs it can still be used to clone repositories, alter pipeline definitions, or trigger release activity, so the cleanup step should be tied to the trust window, not to convenience.

Why immediate key removal matters in practice

The practical question is not just whether the person or bot is gone, but whether any credential still has a live path into production systems. An orphaned SSH key, deploy key, or token can preserve access long after the business relationship has ended, which makes offboarding a privilege and exposure problem as much as an account management task.

That is why teams should treat removal of the GitLab key as the primary action, then confirm that dependent automation no longer expects it. If the key is reused elsewhere, the offboarding event should trigger coordinated rotation, because deleting one reference while another pipeline still trusts the same secret creates a false sense of closure. See the broader access and secret-handling patterns in 17,000+ Secrets Exposed in Public GitLab Repositories and the OWASP Cheat Sheet Series guidance on secure authentication and secret handling.

For organisations using machine access patterns, the same logic applies to service credentials that gate CI/CD or deployment tooling. Offboarding is complete only when the old credential can no longer authenticate, and when the replacement path, if any, is explicitly bounded and recorded. For that reason, OAuth 2.0 Authorization Framework is relevant wherever GitLab access is mediated through machine-to-machine tokens rather than interactive logins.

How to make GitLab offboarding reliable, not ad hoc

Reliable offboarding depends on having one owner for the access decision and one checklist for the actual revocation. The strongest pattern is to couple GitLab access removal to HR leaver workflows or bot retirement workflows, then require confirmation that the key has been deleted from GitLab, from any secret store, and from any pipeline variable, runner, or integration that can still use it.

What to verify: confirm the key is gone from GitLab, confirm the account or bot can no longer authenticate, and confirm no automation job still references the same secret. If the access was shared across repositories or environments, verify each trust boundary separately rather than assuming one deletion covers all of them.

Decision rule: if a credential can still reach a repository, pipeline, or deployment target, treat it as live access until proven otherwise. That means the correct response is revocation first, investigation second. If the access was part of a broader automation chain, check the chain as a unit, not as isolated credentials.

For organisations that want a control baseline, NIST SP 800-53 Rev 5 Security and Privacy Controls is a useful anchor for access revocation, key lifecycle, and auditability, while CIS Controls v8 supports the operational discipline of account management and access review.

Risk and Threat Considerations

Leaving a GitLab SSH key active after a developer or bot no longer needs it creates unnecessary residual access. In practice, that means an attacker, former contractor, or stale automation path can continue to act with the same trust the organisation thought it had already withdrawn.

Failure mechanism: the credential remains valid across one or more repositories, runners, or linked systems, so the offboarding event removes the person but not the path. If the key also unlocks downstream automation, the exposure can persist even when the visible GitLab account looks inactive.

Impact: code theft, unauthorized repository changes, pipeline abuse, and access to secrets or deployment targets become possible until the key is removed and the dependent automation is revalidated. In a shared DevOps environment, one stale key can outlive multiple reviews and create a quiet persistence channel.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 addresses the attack surface, NIST SP 800-53 Rev 5 and CIS Controls v8 set the technical controls, and ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01 — Improper OffboardingGitLab keys must be removed when a human or bot no longer needs access.
NHI-07 — Long-Lived SecretsStale SSH keys keep GitLab access alive beyond the valid trust window.
Recommendation — Tie GitLab access revocation to offboarding workflows and verify every dependent secret is removed. Shorten secret lifetime and rotate or revoke any GitLab key that outlives its owner’s need.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementSSH keys are authenticators whose lifecycle must be controlled and revoked.
Recommendation — Revoke obsolete GitLab authenticators and confirm they no longer grant access.
CIS Controls v8CIS-6 — Access Control ManagementThe question is about timely removal of access when it is no longer needed.
Recommendation — Remove GitLab access promptly and review linked automation for lingering permissions.
ISO/IEC 27001:2022A.5.18 — Access rightsGitLab access removal is an access-rights lifecycle control.
Recommendation — Revoke GitLab rights on departure and verify no dependent system still uses them.

Practitioner Guidance

What to prioritise: remove the authenticating secret first, then check every place it may have been copied, mounted, or exported. For bots, the real offboarding target is often the pipeline variable, runner secret, or deployment integration rather than the GitLab account record alone.

Common mistake: treating key deletion as a documentation task instead of a control action. If the team cannot prove the old key is unusable, the offboarding is incomplete regardless of whether the user has been disabled.

What good looks like: a leaver or bot retirement ticket closes only after access removal, dependency confirmation, and a logged check that no linked automation still trusts the old credential.

Practitioner takeaway: offboarding is finished when the credential is dead everywhere it was trusted, not when the ticket is marked resolved.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 6, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org