Join our Newsletter — 33% off our NHI Course

Code Delivery Cycle

The code delivery cycle is the path source code takes from development to deployment across repositories, automation, containers, virtual machines, and supporting stores. Each transfer point can create new exposure if access is too broad, retention is too long, or copies are left behind after they are no longer needed.

How the code delivery cycle creates exposure

The code delivery cycle is not just a path for software, it is also a chain of custody for source, build artefacts, credentials, and copied content. Exposure increases whenever code is moved between repositories, CI/CD systems, containers, virtual machines, and supporting stores without a clear reason for each copy to exist.

That means the security question is rarely about one platform in isolation. It is about where the code resides, who can reach it, how long it stays there, and whether any transfer point leaves behind a stale or overbroad access path.

A useful way to think about the cycle is as a series of trust transitions. Each transition should be justified by delivery need, because every additional location expands the number of systems that must be secured, monitored, and eventually cleaned up.

For teams dealing with repeated leakage patterns, the most relevant supporting material is the Ultimate Guide to NHIs, which frames why long-lived access and secret sprawl often persist across delivery tooling.

Where the security boundaries usually fail

The most common failure is not a dramatic compromise, but accumulation. Source code, build-time tokens, deployment keys, and environment-specific copies can outlive their purpose, especially when pipelines are reused, artefacts are cached, or temporary access is never fully removed.

Another weak point is visibility. Organisations often know where the primary repository is, but not where mirrors, clones, build outputs, or packaged artefacts ended up. Once that inventory is incomplete, retention and revocation become guesswork rather than control.

Delivery tooling can also blur ownership. Development, platform, security, and operations may each assume another team is responsible for removing old copies or narrowing access after a release, which leaves orphaned exposure in the gaps between teams.

For lifecycle and cleanup discipline, NHI Lifecycle Management Guide is a useful companion because it explains how provisioning, rotation, and offboarding reduce persistent access in adjacent delivery systems.

Why secrets and retained copies matter

The code delivery cycle becomes especially sensitive when secrets, tokens, certificates, or long-lived credentials are embedded in code, attached to build jobs, or copied into deployment environments. Those materials are not just configuration detail, they are access pathways, and they tend to spread faster than the code itself.

NHIMG’s research block highlights one particularly relevant signal: 30.9% of organisations store long-term credentials directly in code. For a delivery cycle, that matters because code often moves through multiple repositories, runners, images, and backups before anyone notices the credential is still present.

That same pattern is why secret sprawl is not only a vault problem. If a secret appears in source, artefacts, logs, or deployment templates, the delivery cycle itself becomes the propagation mechanism, and one overlooked copy can keep access alive long after the original change was shipped.

Teams should treat secret handling as part of the delivery path, not a separate downstream task. If the code can be rebuilt, inspected, or promoted, then any embedded secret or copy can also be replicated unless the pipeline removes it deliberately.

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 CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-01 — Secrets and Credential Sprawl Code delivery cycles often spread secrets across repos, CI/CD and artefacts.
NHI-03 — Lifecycle and Offboarding Delivery copies and access should be removed when they are no longer needed.
Recommendation — Eliminate embedded secrets and shorten credential exposure across the delivery path. Revoke stale access and delete obsolete delivery artefacts after promotion.
CIS Controls v8 6 — Access Control Management Delivery systems need least-privilege access so copied code and artefacts are not broadly reachable.
15 — Service Provider Management Delivery often spans hosted CI/CD, registries and storage services that require shared responsibility.
Recommendation — Restrict access to repositories, build systems and artefact stores to approved users and services. Track third-party delivery services and verify their access, retention and cleanup responsibilities.
NIST CSF 2.0 PR.AC — Access Control The cycle’s risk comes from overbroad access across multiple delivery stages and storage points.
Recommendation — Apply least-privilege controls to every repository, pipeline, image store and deployment target.

Practitioner Guidance

Why practitioners should care: The code delivery cycle needs explicit ownership because each handoff can create a new security boundary, and boundaries without cleanup become exposure points. The practical standard is simple: if a copy, token, or artefact no longer helps deliver the release, it should not remain reachable.

What to watch for: Look for repeated artefact reuse, stale deployment copies, broad read access to build stores, and code paths that still contain secrets after promotion. These are usually the earliest signs that the delivery cycle is accumulating risk instead of reducing it.

Practitioner takeaway: Treat delivery as a lifecycle problem, not a one-time release event, because the safest code path is the one with the fewest surviving copies and the shortest-lived access.