Huntress Acquires Inside Agent: A New Era for Identity ProtectionFree Trial
Back to Blog
Application Security

Securing the Software Build Pipeline: From Code to Production

Your CI/CD pipeline is the most privileged system in your organization. It has access to source code, secrets, production credentials, cloud provider APIs, and the ability to deploy code that your use…

30 Mar 20262 min read0 views

Introduction

Your CI/CD pipeline is the most privileged system in your organization. It has access to source code, secrets, production credentials, cloud provider APIs, and the ability to deploy code that your users will run. A compromised build pipeline is a compromised organization. And yet, in most environments I audit, the pipeline has weaker security controls than the production systems it deploys to.

The Attack Surface

A typical modern pipeline involves: a source code repository (GitHub, GitLab, Bitbucket), a CI server (Jenkins, GitHub Actions, CircleCI, GitLab CI), artifact storage (Docker registries, package repositories, S3 buckets), secrets management (Vault, AWS Secrets Manager, environment variables), and deployment targets (Kubernetes, EC2, Lambda). Each component is a potential compromise point.

The Codecov attack compromised the Bash Uploader script used in thousands of CI pipelines. The SolarWinds attack modified code during the build process. The event-stream npm attack injected malicious code into a dependency. All of these were build pipeline attacks, and all of them succeeded because the pipeline itself was not adequately secured.

Hardening Your Pipeline

Protect your CI/CD server like a production system. Patch it. Restrict network access. Require MFA for all admin access. Monitor its logs. If you are running self-hosted Jenkins, treat it as a tier-1 critical asset — because an attacker who controls Jenkins controls your production environment.

Isolate builds. Every build should run in a fresh, ephemeral environment — a container or VM that is created for the build and destroyed afterward. Build environments that persist between builds accumulate state that can be poisoned. Never run builds on shared, long-lived infrastructure.

Manage secrets properly. Never store secrets in CI configuration, environment variables visible in logs, or source code. Use a dedicated secrets manager with short-lived, scoped credentials. Rotate secrets after any pipeline compromise or team member departure.

Sign and verify artifacts. Sign your build artifacts (container images, packages, binaries) and verify signatures before deployment. Cosign (for containers) and Sigstore (for general-purpose signing) provide free, open-source solutions. This ensures that what you built is what you deploy, with no tampering in between.

SLSA Framework

SLSA (Supply-chain Levels for Software Artifacts) provides a maturity model for build pipeline security, from Level 1 (basic provenance documentation) to Level 4 (hermetic, reproducible builds with two-party review). Most organizations should target SLSA Level 2-3, which requires a hosted build platform with provenance generation. Even Level 1 — documenting what was built, when, from what source, by what process — is a significant improvement over having no build provenance at all.

Comments

Keep Reading

Explore Related Topics and Insights

Insider Threat Detection Without Becoming Big Brother
EMERGING THREATS

Insider Threat Detection Without Becoming Big Brother

Insider threat programs have a PR problem. Announce that you are monitoring employee behavior and you will get pushback from HR, legal, works councils, and the employees themselves. And they are not w…

S

Spakto Team

30 Mar 2026
Read article →
Cloud Security Posture Management: Choosing and Deploying CSPM
CLOUD SECURITY

Cloud Security Posture Management: Choosing and Deploying CSPM

When I ran a cloud security assessment for a logistics company last year, we found 847 misconfigurations across their AWS and Azure environments. Seventeen of them were critical — including an S3 buck…

S

Spakto Team

30 Mar 2026
Read article →
Secure Code Review: What Senior Engineers Actually Look For
APPLICATION SECURITY

Secure Code Review: What Senior Engineers Actually Look For

Automated tools find about 40% of security vulnerabilities in code. The other 60% — business logic flaws, race conditions, authorization bypasses, and subtle injection vectors — require human eyes. Af…

S

Spakto Team

30 Mar 2026
Read article →
Threat Hunting: Moving From Reactive to Proactive Security
THREAT INTELLIGENCE

Threat Hunting: Moving From Reactive to Proactive Security

Your SIEM generates alerts. Your EDR generates alerts. Your firewall generates alerts. You triage them, you respond to them, you close them. And then one day you discover that an attacker has been in…

S

Spakto Team

30 Mar 2026
Read article →
Building a Security Culture That Outlasts Your CISO
EMERGING THREATS

Building a Security Culture That Outlasts Your CISO

I have seen security programs thrive under one CISO and collapse under their successor. I have seen organizations where security is everyone's responsibility and organizations where it is "the securit…

S

Spakto Team

30 Mar 2026
Read article →
Zero-Day Markets: The Economics of Vulnerability Trading
EMERGING THREATS

Zero-Day Markets: The Economics of Vulnerability Trading

A zero-day exploit for iOS full-chain remote code execution with persistence is worth between $1 million and $2.5 million on the private market. An Android equivalent fetches $2 to $2.5 million. A Chr…

S

Spakto Team

30 Mar 2026
Read article →
OT/ICS Security: Bridging the IT-OT Divide
EMERGING THREATS

OT/ICS Security: Bridging the IT-OT Divide

I spent the first half of my career in IT security and the last decade increasingly focused on operational technology. The cultural divide between IT and OT is wider than the technical one, and until…

S

Spakto Team

30 Mar 2026
Read article →
Quantum Computing and Cryptography: Preparing for Q-Day
EMERGING THREATS

Quantum Computing and Cryptography: Preparing for Q-Day

Q-Day — the day a quantum computer can break RSA-2048 and ECC in practical time — is not here yet. Estimates range from 2030 to 2040, with considerable uncertainty. But if you wait for Q-Day to start…

S

Spakto Team

30 Mar 2026
Read article →