Knowledge · Application Security

Build Pipeline Supply Chain Security

Build pipeline security controls — CI/CD platform security, build environment isolation, secrets management, identity and access controls, and build process hardening — for preventing supply-chain attacks against the build process.

Primary question: What controls should be applied to CI/CD build pipelines to prevent supply-chain compromise?

Definitions

Build pipeline

The automated CI/CD workflow that transforms source code into deployable artifacts, including steps for dependency resolution, compilation, testing, packaging, and deployment.

Build environment

The isolated computational environment where the build pipeline executes, including the operating system, installed tools, network access, and available secrets.

CI/CD platform

The infrastructure that hosts and orchestrates build pipelines — such as GitHub Actions, GitLab CI, Jenkins, CircleCI, or custom infrastructure.

Build agent

The process or machine that executes build pipeline steps. Build agents may be shared (run multiple pipelines) or ephemeral (created fresh for each pipeline run).

Build step injection

An attack where malicious commands are injected into a build pipeline, typically by compromising the pipeline configuration, a shared agent, or a dependency used during the build.

The engineering problem

Shared build agents may be compromised through one pipeline and then used to attack other pipelines running on the same agent.

Build pipeline configurations stored in source control may be modified by unauthorized users or automated attacks (e.g., pull request injection), adding malicious build steps.

Build secrets (API keys, signing keys, deployment credentials) stored in pipeline variable stores may be leaked through logs, artifacts, or unauthorized access.

Security controls

Each control inspects a different artifact and produces evidence for an engineering decision.

Build environment isolation

Isolated builds
Artifact
A build pipeline that executes in an isolated environment — ephemeral agents, containerized builds, or sandboxed runners — that cannot access other pipelines, development systems, or production environments.
Risk
Shared build agents that allow cross-pipeline contamination or access to sensitive systems.
Output
Isolated build environments with no cross-pipeline access.

Evidence:

CI/CD platform access control

Platform access control
Artifact
A CI/CD platform with enforced identity and access controls — least privilege for pipeline triggers, branch protection rules, required approvals for pipeline configuration changes, and audit logging of all platform actions.
Risk
Unauthorized modifications to pipeline configurations or unauthorized pipeline execution.
Output
Enforced access controls with audit logging.

Evidence:

Secrets management

Pipeline secrets
Artifact
Build secrets stored in a dedicated secrets manager (e.g., HashiCorp Vault, AWS Secrets Manager, GitHub Actions secrets) with scoped access, rotation policies, and audit logging.
Risk
Secrets stored in plaintext pipeline variables, logged to build output, or accessible to unauthorized pipeline users.
Output
Scoped, rotated, and audited secrets with no plaintext exposure.

Evidence:

Pipeline configuration integrity

Config integrity
Artifact
Build pipeline configurations that are version-controlled, reviewed, and approved before execution, with tamper-evident storage and change detection.
Risk
Unauthorized modifications to pipeline configurations that inject malicious build steps.
Output
Integrity-verified pipeline configurations with change detection.

Evidence:

Artifact signing

Artifact integrity
Artifact
A build artifact signed with a cryptographic key, enabling verification that the artifact has not been modified since it was built.
Risk
Build artifacts that have been modified after the build process without detection.
Output
Signed build artifacts with cryptographic integrity verification.

Evidence:

Build reproducibility

Reproducible builds
Artifact
A build process that produces identical artifacts from the same source code and dependencies, enabling independent verification of build integrity.
Risk
Build artifacts whose provenance cannot be independently verified because the build process is not reproducible.
Output
Reproducible builds that enable independent verification of artifact integrity.

Evidence:

Verification workflow

  1. Define pipeline security requirements — isolation, access control, secrets management, and audit needs.
  2. Configure build agents for isolation — use ephemeral runners, containerized builds, or sandboxed environments.
  3. Enforce CI/CD platform access controls — branch protection, required approvals, least privilege.
  4. Configure secrets management — store secrets in a dedicated manager, scope access, enable rotation and audit.
  5. Protect pipeline configurations — version control, review, approval, and change detection.
  6. Monitor build pipelines for anomalous behavior — unexpected steps, unusual network connections, secret access patterns.
  7. Conduct periodic pipeline security reviews — audit access controls, secret rotation, agent isolation, and configuration changes.
  8. Source code is fetched from the version control system.
  9. Dependencies are resolved from controlled registries with provenance verification.
  10. The build environment is initialized in an isolated and controlled manner.
  11. The build process compiles source code and packages dependencies.
  12. Build artifacts are produced and their integrity is verified.
  13. Artifacts are signed with cryptographic keys for integrity verification.
  14. Build logs and artifact hashes are recorded for audit and reproducibility.

Limits of verification

  • Build pipeline security requires ongoing maintenance and monitoring — controls degrade over time as dependencies change and new threats emerge.
  • Artifact signing depends on secure key management — compromised signing keys undermine the entire integrity chain.
  • Reproducible builds may not be achievable for all projects, especially those with complex build processes or external build-time dependencies.

Canonical terms used: Build pipeline security; Build integrity; Supply-chain attack; Build reproducibility.

Evidence and references

  1. DerScanner SCA documentationDerScanner SCA identifies open-source components, vulnerabilities in open-source libraries, software-supply-chain risks, license risks, dependency-tree visualization, package health assessment, and hybrid SAST+SCA function reachability.derscanner-sca

Supply-chain security

Secure your build pipeline

DerScanner provides SCA analysis to support build pipeline security and supply-chain risk management.

Supply-chain security

Discuss build pipeline security

Share your current build pipeline and supply-chain challenges. We will help design a secure build process.

Engineering knowledge for building and operating trustworthy systems.

DerSecur Recognition · build 2dac3d6 · 2026-09-07 06:49:25Z · system