The cybersecurity game has fundamentally shifted but many organisations are still playing by outdated rules.

Remember when we thought firewalls and network perimeters were enough? Those days are unfortunately over. Attackers have discovered something far more valuable than breaking down digital walls: they're increasingly targeting the software supply chain and the systems organisations use to build and deploy applications.

Zero Trust CI/CD applies Zero Trust security principles to continuous integration and continuous delivery pipelines. Instead of automatically trusting users, workloads or credentials inside the development environment, access must be authenticated, authorised and continuously verified.

For enterprises, this means securing identities, reducing privileges, replacing long-lived credentials, verifying dependencies and software artifacts, isolating build environments and monitoring pipeline activity.

em360tech image

I've spent the last decade watching this evolution unfold across dozens of organisations. The writing was on the wall after SolarWinds in 2020, when thousands of organisations were affected through a software supply chain compromise. Codecov followed in 2021, exposing customer credentials for months before the compromise was discovered. Then CircleCI's breach in January 2023 forced customers to rotate their secrets.

The lesson is increasingly difficult to ignore: CI/CD pipeline security has become a critical part of software supply chain security.

Why Are CI/CD Pipelines a Security Risk?

CI/CD systems weren't originally designed with security as a first-class citizen. They were built for one thing: speed. Ship fast, break things, worry about security later. Except "later" has a habit of never arriving.

Picture your typical deployment pipeline. Database passwords flow through it. API keys traverse multiple stages. Cloud access tokens are passed between systems. Container registry credentials move between environments.

If these credentials are stored insecurely or given excessive privileges, compromising the pipeline can give an attacker a route into much more valuable systems.

Your pipeline doesn't just handle secrets. It can effectively become a master key to your infrastructure. CI/CD systems may have administrative access to production environments, cloud platforms, repositories and other critical enterprise resources.

The dependency problem makes everything exponentially worse. Modern applications can contain hundreds of open-source components, with each dependency introducing another potential attack vector.

Remember the left-pad incident? An 11-line JavaScript package broke thousands of builds when its author unpublished it. Now imagine the consequences if a similarly widespread package were deliberately compromised.

Multi-tenant environments can amplify these risks further. One compromised job may potentially expose other data, secrets or infrastructure if adequate isolation controls aren't in place.

What is Zero Trust in CI/CD?

Zero Trust has unfortunately become one of those terms that gets tossed around boardrooms without much substance behind it. But when properly applied to CI/CD pipelines, it can fundamentally change the way organisations approach development security.

John Kindervag coined the term Zero Trust while at Forrester in 2010. Although many implementations have focused heavily on network security, the underlying principle goes much further: trust should never be granted automatically simply because a user, device or workload is already inside the network.

Traditional security models often create what I call the "candy shell" approach — hard exterior, soft interior. Once you're inside the perimeter, you're implicitly trusted.

Zero Trust flips this assumption entirely. Every access request must be verified, permissions should be limited to what is necessary, and organisations should operate on the assumption that a compromise can occur.

What Are the Core Principles of Zero Trust CI/CD?

For CI/CD environments, this philosophical shift requires rethinking how identities, credentials, permissions and workloads are managed.

The core principles of Zero Trust CI/CD include continuous verification, least-privilege access, short-lived credentials, workload isolation and comprehensive monitoring.

In practice:

  • Jobs must prove their identity before accessing resources.
  • Credentials should not be unnecessarily shared between jobs or pipeline stages.
  • Permissions should be granted for specific tasks rather than providing blanket administrative access.
  • Actions should be logged, monitored and analysed.
  • Context should inform access decisions, including who or what is requesting access, from where and for what purpose.

How Do You Implement Zero Trust in CI/CD?

Recently, I helped a fintech startup transform its CI/CD security posture. Its original setup was a textbook example of how not to do things: Jenkins running on shared servers, jobs executing with administrative privileges and secrets stored in plain-text files scattered across repositories.

It was the classic startup approach: ship features fast and address security debt later.

Implementing Zero Trust required changes across identity management, software artifacts, dependencies and infrastructure.

1. Strengthen Identity and Access Management

We started with identity — the foundation of any Zero Trust implementation.

Traditional CI/CD systems often rely heavily on long-lived tokens stored as secrets. These tokens may be shared across multiple jobs, can be difficult to rotate safely and create auditing challenges.

OpenID Connect (OIDC) transforms this model.

Instead of storing static cloud credentials, a job can receive a short-lived token containing claims about its identity, such as which repository it originated from, which workflow is executing and potentially the specific commit being processed.

GitHub Actions introduced OIDC support in 2021, and major cloud platforms support workload identity federation.

The key advantage is that credentials can exist only for the duration required by the workload rather than remaining valid for months or years. When the job completes, the temporary credential expires, reducing the value of stolen credentials.

2. Sign and Verify Software Artifacts

Every artifact produced by a pipeline should be verifiable.

Artifact signing and software provenance help organisations confirm where software came from, how it was built and whether it has been altered.

The Supply-chain Levels for Software Artifacts (SLSA) framework provides organisations with an incremental approach to improving software supply chain security.

The current SLSA framework separates security requirements into different tracks. Its Build Track focuses on the trustworthiness and completeness of an artifact's provenance, with progressively stronger controls:

  • Build L1: Provenance exists showing how the package was built.
  • Build L2: Signed provenance is generated by a hosted build platform.
  • Build L3: A hardened build platform provides stronger protection against tampering during the build.

SLSA also includes a Source Track covering the integrity of source code and the processes used to create it.

The objective isn't simply to chase a particular maturity level. Enterprises should progressively improve their ability to trace, verify and protect the software they build and consume.

Tools such as Sigstore can also make cryptographic signing and verification more practical by providing mechanisms for signing, verifying and establishing transparency around software artifacts.

3. Secure Third-Party Dependencies

Third-party dependencies represent one of the largest attack surfaces in modern applications.

The 3CX attack in 2023 demonstrated how sophisticated adversaries can compromise legitimate software supply chains to distribute malicious code.

Dependency pinning is therefore important. Avoid relying unnecessarily on floating versions in production builds. The difference between lodash: ^4.17.0 and lodash: 4.17.21, for example, is that the first permits a range of versions while the second explicitly identifies the expected version.

But pinning alone isn't sufficient.

A comprehensive dependency security strategy can include:

  • automated dependency and vulnerability scanning;
  • checksum and integrity verification;
  • controlled or private registries for critical dependencies;
  • defined processes for reviewing dependency updates; and
  • Software Bill of Materials (SBOM) generation to improve visibility into the components contained in software.

The objective is to understand what software is entering the pipeline, where it came from and whether it can be trusted.

4. Isolate CI/CD Build Environments

Your build environment should be appropriately isolated from production networks and sensitive infrastructure.

This seems obvious, yet I've encountered numerous organisations running CI/CD agents on the same networks as production systems.

Ephemeral build environments can significantly reduce this risk.

Spin up a fresh container or virtual machine for each job, execute the build, capture the required artifacts and then destroy the environment.

This reduces persistence between builds and makes it harder for attackers to establish long-term footholds or contaminate subsequent workloads.

What Are the Benefits of Zero Trust CI/CD?

The fintech company I mentioned saw meaningful improvements after implementing these controls. Security incidents declined, audit preparation became faster and developers spent less time troubleshooting permission-related issues.

But the journey wasn't smooth.

Initial implementation took around six months. Developers needed training on new workflows, and some legacy applications required significant refactoring to support ephemeral credentials.

The cultural transformation proved harder than the technical implementation.

That's an important lesson for enterprise leaders: Zero Trust CI/CD isn't simply a collection of security tools. It changes how developers, security teams and infrastructure teams interact with the software delivery process.

What Is the Business Value of Zero Trust CI/CD?

Zero Trust CI/CD isn't merely about preventing breaches — it can help organisations build a more controlled and sustainable software delivery environment.

Regulatory compliance and security assurance can become easier to manage when strong identity, access control, auditability and monitoring are built directly into development processes.

Standards and programmes such as SOC 2, ISO 27001 and FedRAMP place significant emphasis on areas including identity management, access control, accountability and security monitoring. Zero Trust principles can support organisations in meeting these requirements.

Customer trust is another consideration.

Enterprise customers increasingly request security documentation, attestations and evidence of security controls before entering contracts. Being able to demonstrate strong software supply chain controls can therefore support enterprise sales and procurement processes.

Developer productivity can also improve.

Are you enjoying the content so far?

Eliminating unnecessary manual security tasks and making permissions more predictable can allow developers to focus more of their time on building features rather than navigating security bureaucracy.

What Are the Challenges of Implementing Zero Trust CI/CD?

Zero Trust isn't a panacea.

Implementation requires investment in technology, skills, processes and cultural transformation.

Technical complexity can increase. Managing multiple security tools, understanding cryptographic signing and troubleshooting OIDC authentication require specialised skills that many teams may initially lack.

Performance overhead is another consideration. Signature verification, dependency scanning and continuous monitoring all add work to the build process. The overhead may be small, but in high-frequency deployment environments, even minor delays can matter.

Legacy system integration can be particularly difficult. Older applications and infrastructure may not support modern authentication mechanisms, potentially requiring refactoring, compensating controls or eventual replacement.

This is why organisations should view Zero Trust as an incremental security strategy rather than a one-time transformation project.

What Is the Future of CI/CD Security?

Several developments are likely to shape the evolution of secure CI/CD environments.

Policy as Code is becoming increasingly important. Tools such as Open Policy Agent (OPA) allow organisations to version-control, test and deploy security policies alongside application code. Security can become part of the development workflow rather than an external constraint added at the end.

AI-powered threat detection could also improve the ability to identify unusual behaviour across software pipelines. Machine learning systems can potentially detect abnormal access patterns, suspicious dependency changes and unusual build activity at scale.

Hardware-backed security provides another layer of protection. Trusted Platform Modules (TPMs), Hardware Security Modules (HSMs) and hardware-backed attestation can provide stronger cryptographic roots of trust than software controls alone.

Finally, software supply chain transparency is becoming increasingly important for regulatory compliance and enterprise risk management. Requirements around software security, vulnerability management and component visibility mean organisations need a clearer understanding of what goes into their software and how it is produced.

How Can Enterprises Get Started With Zero Trust CI/CD?

Don't attempt to implement everything simultaneously. Zero Trust CI/CD is best approached incrementally, beginning with the controls that address the greatest risks.

1. Audit Current CI/CD Access

Document long-lived credentials, excessive privileges, shared accounts, exposed secrets and unmonitored systems.

You can't fix what you don't know exists.

2. Replace Static Credentials Where Possible

Implement OIDC authentication and workload identity federation for supported cloud services and development platforms.

Prioritise replacing long-lived credentials with short-lived, workload-specific access.

3. Begin Signing and Verifying Artifacts

Introduce artifact signing and provenance verification so that software can be traced back to its expected source and build process.

The controls can become more sophisticated as your software supply chain security programme matures.

4. Segment Build and Production Environments

Isolate build environments from production infrastructure and limit network access according to the principle of least privilege.

Where possible, use ephemeral build environments rather than persistent CI/CD agents.

5. Monitor Pipeline Activity

You can't secure what you can't see.

Centralise logs and monitor authentication events, permission changes, build configuration changes, dependency updates and unusual pipeline activity.

Start by establishing visibility. More sophisticated detection and response capabilities can follow.

Building a More Secure CI/CD Pipeline

The question isn't simply whether an organisation should implement Zero Trust in CI/CD. It's which risks should be addressed first and how Zero Trust controls can be introduced without disrupting software delivery.

Organisations that wait for the "perfect" security solution risk never implementing meaningful improvements. Those that start with achievable controls and iterate can progressively strengthen their security posture.

Zero Trust CI/CD reduces software supply chain risk by removing implicit trust from development and deployment pipelines. Strong identity controls, short-lived credentials, least-privilege access, artifact verification, dependency security and isolated build environments make it significantly harder for attackers to turn one compromised account, workload or component into a wider enterprise breach.

Enterprises don't need to implement every Zero Trust control at once. Starting with identity, credential management, build isolation and pipeline visibility can establish the foundation for a more secure CI/CD environment that evolves alongside the organisation's software delivery practices.