Subscribe to the Non-Human & AI Identity Journal

Repository Identity

An identity that can read, write, trigger, or authenticate through a code repository or its connected automation. It may be human, bot, token, or service account. The key governance issue is not where it lives, but whether its permissions are owned, reviewed, and revoked on time.

Expanded Definition

Repository Identity is the NHI used to interact with a code repository and the automation attached to it. That includes humans working through repository access, bots running checks, tokens authenticating pipelines, and service accounts pushing or pulling code. The governance question is not whether the identity is human or machine, but whether its access is bounded, attributable, and revocable.

In practice, Repository Identity sits at the intersection of source control, CI/CD, and secrets management. It governs actions such as commit, merge, release, issue automation, webhook triggering, and package publication. In NHI Management Group terms, it should be treated as a lifecycle-managed identity with ownership, purpose, expiry, and review, not as an informal convenience credential. That is consistent with the broader NHI lifecycle guidance in the Ultimate Guide to NHIs and the access discipline reflected in NIST Cybersecurity Framework 2.0.

Definitions vary across vendors on whether a repository bot is a distinct identity, a delegated human identity, or just a token bound to a pipeline. The practical test is whether the credential can independently act, and whether its permissions and audit trail can be governed separately. The most common misapplication is treating repository access as a shared developer convenience, which occurs when long-lived tokens or bot accounts are reused across projects without clear ownership.

Examples and Use Cases

Implementing Repository Identity rigorously often introduces operational overhead, requiring teams to weigh delivery speed against tighter credential control, rotation, and approval gates.

  • A GitHub Actions token can open pull requests, trigger builds, and publish packages, but it must be scoped to one repository and rotated on a fixed schedule.
  • A release bot signs commits and tags versions after passing policy checks, with its permissions separated from the human maintainer’s role.
  • A dependency scanning service reads repositories across an organisation, but its access is limited to read-only and monitored through central identity review.
  • A compromised webhook secret in a CI/CD integration is treated as a Repository Identity failure because it enabled unauthorised execution through the repo automation path.
  • In breach analysis from 52 NHI Breaches Analysis, repository-connected credentials repeatedly appear as the initial foothold, especially when secrets are stored in code or build tooling.

That pattern is also visible in the GitLocker GitHub extortion campaign, where repository access became an execution path for broader compromise. The same control logic applies whether the identity is a bot, token, or service account, because the repository is the trust boundary, not the badge on the identity.

Why It Matters in NHI Security

Repository Identity is a high-risk NHI category because source control frequently contains the credentials, automation hooks, and deployment paths that attackers want most. NHIMG data shows that 96% of organisations store secrets outside of secrets managers in vulnerable locations, and 80% of identity breaches involved compromised non-human identities such as service accounts and API keys, underscoring how often repository-adjacent access becomes the starting point for compromise. The same governance gap is highlighted in the Top 10 NHI Issues and the Ultimate Guide to NHIs, where overprivilege, weak offboarding, and poor visibility are recurring failure modes.

For security and governance teams, the critical failure is assuming repository access can be reviewed like ordinary user access. It cannot, because the blast radius includes code integrity, build provenance, and downstream release systems. Repository identities should be inventoried, tied to named owners, and removed as soon as their purpose ends. Organisations typically encounter this term only after a compromised token, malicious pull request, or poisoned pipeline has already altered code, at which point Repository Identity becomes operationally unavoidable to address.

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 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-01 Repository identities are NHI assets that need ownership, lifecycle, and access review.
NIST CSF 2.0 PR.AA Repo identity governance supports authenticating and authorising machine access to code systems.
NIST Zero Trust (SP 800-207) Repository access should be continuously verified, not trusted by network or tool location.

Apply least privilege, strong authentication, and periodic access validation to repository identities.