Because identities and secrets are the bridge between development and runtime. Service accounts, API keys, and pipeline permissions can carry an application flaw into production if they are over-privileged or poorly governed. In practice, the identity problem is not only who can deploy, but which workloads and automation paths can move from code into cloud access.
Why This Matters for Security Teams
Code-to-cloud delivery compresses build, test, deploy, and runtime into a single trust chain, which means identity decisions made in source control or CI/CD can affect production access almost immediately. The main risk is not just leaked credentials. It is the combination of broad pipeline permissions, long-lived secrets, and automation that can turn a small development mistake into a production control gap. This is why identity governance has to extend beyond human users and into service accounts, workload identities, and deployment tooling.
Security teams often underweight this problem because the environment looks ephemeral and automated. In reality, ephemeral infrastructure often hides persistent trust relationships. A pipeline token with write access, a cloud role with excessive scope, or a secret reused across environments can create a durable path for abuse even when the code itself is clean. The NIST Cybersecurity Framework 2.0 is useful here because it frames identity, access, and continuous monitoring as core operational controls rather than one-time configuration tasks.
In practice, many security teams encounter identity failure only after a compromised pipeline or over-privileged deployment path has already been used to reach production, rather than through intentional design of the trust model.
How It Works in Practice
Code-to-cloud environments usually involve multiple identity layers: developer sign-in, repository access, CI/CD runner permissions, cloud IAM roles, secrets managers, and workload identities. Each layer can be legitimate on its own, but risk emerges when they are chained together without tight scope, short lifetime, and clear ownership. A single pipeline may need permission to read a build secret, assume a deployment role, and write to a container registry. If any one of those permissions is broader than necessary, the compromise of that step can become the compromise of the deployment path.
Good practice is to treat every automated identity as a production identity with its own lifecycle. That means defining ownership, scoping access to one environment or one function, rotating secrets, and preferring short-lived credentials over static keys. Where possible, use workload identity federation instead of stored secrets so that trust is derived from attested runtime context rather than copied credentials. Monitoring should also be identity-aware: unusual role assumption, secret retrieval, or privileged API calls from a CI/CD context should be treated as high-signal events.
- Limit pipeline permissions to the exact repositories, branches, and environments required.
- Replace long-lived API keys with short-lived tokens and workload identities.
- Separate build, test, and deploy identities so compromise does not cross stages easily.
- Log secret access, role assumption, and configuration changes as identity events.
- Review cloud roles for hidden privilege paths such as wildcard actions or cross-account trust.
Current guidance from CISA supply chain guidance and OWASP DevSecOps guidance supports this layered approach, especially where software delivery and infrastructure changes are tightly coupled. These controls tend to break down when multiple teams share the same runner, secrets are copied between environments, and cloud trust relationships are inherited from default templates because accountability becomes ambiguous and privilege creep goes unnoticed.
Common Variations and Edge Cases
Tighter identity controls often increase delivery friction, requiring organisations to balance deployment speed against stronger approval, rotation, and verification steps. That tradeoff is especially visible in fast-moving engineering teams, but current guidance suggests the cost of explicit identity governance is lower than the cost of recovering from a compromised pipeline or leaked cloud credential.
The standard answer changes in a few important environments. In mature platform engineering setups, developers may not hold cloud privileges directly, but the platform layer can still concentrate risk if its automation identities are too broad. In multi-account or multi-cloud architectures, trust often spans providers, so the weak point may be federation policy rather than a single secret. In serverless or ephemeral compute, short-lived execution can reduce dwell time, but it does not remove the need to control who can trigger functions, pass parameters, or inject configuration. Where container orchestration is involved, workload identities and registry permissions deserve the same scrutiny as human admin access.
There is no universal standard for this yet, but the best practice is evolving toward zero standing privilege, strong secret hygiene, and continuous verification of both human and machine access paths. In code-to-cloud environments, the most dangerous assumption is that automation is inherently safer than manual change.
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 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0, NIST Zero Trust (SP 800-207) and NIST AI RMF set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.AA | Identity and access are central to code-to-cloud trust chains. |
| OWASP Non-Human Identity Top 10 | Workload and service identities are a primary source of code-to-cloud risk. | |
| NIST Zero Trust (SP 800-207) | 3.1 | Zero trust principles fit ephemeral pipelines and distributed cloud trust. |
| NIST AI RMF | AI-assisted delivery can add model and automation risk to code-to-cloud chains. | |
| MITRE ATT&CK | T1078 | Valid accounts abuse is common when pipeline or cloud identities are over-privileged. |
Treat CI/CD tokens, service accounts, and workload identities as governed assets with lifecycle controls.
Related resources from NHI Mgmt Group
- Why do multi-cloud environments create more identity risk than single-cloud estates?
- Why do GitHub-based supply chain attacks create identity risk for cloud environments?
- When does a cloud identity platform create more governance risk than it reduces?
- Why do hybrid identity environments create more audit and security risk than single-directory setups?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org