Marcio Cunha

Building Continuous Deployment Pipelines with Artifact Integrity Verification via In-toto and SLSA Framework

Learn how to harden your software delivery against supply chain attacks using the SLSA framework and the in-toto standard to attest the provenance and integrity of every generated artifact.

Marcio Cunha5 min
Also available in:PortuguêsEspañol
Summary
  • Software supply chain attacks occur when attackers modify legitimate files during the build process without altering the original source code.
  • The SLSA framework establishes graduated security levels to certify that the software building process is immune to tampering.
  • The in-toto standard acts as an auditing system that documents each step executed by a pipeline in a cryptographically secure way.
  • Digital signatures and structured metadata guarantee that the binary deployed to production is exactly the one that passed safety checks.
  • Adopting provenance checks eliminates operational blind spots and provides end-to-end traceability in modern production environments.

The Silent Challenge in the Software Supply Chain

In modern software development, delivery speed has become the primary driver of corporate competitiveness. However, focusing solely on agility while ignoring the security of built artifacts opens critical vulnerabilities. In practice, this means an attacker no longer needs to break directly into the production server; compromising a single step in the continuous integration (CI) pipeline is enough to silently inject malicious code into libraries or binaries distributed to thousands of users. To combat this invisible threat, reliability engineering requires rigorous integrity verification mechanisms that follow the code from its first line to the production environment.

Protecting the pipeline is no longer just about keeping passwords secure and access keys restricted. Today's challenge lies in proving irrefutably that the artifact executed on the server is identical to the code reviewed by engineers, with no arbitrary alterations along the way. This is where conceptual frameworks and open standards designed to track and verify every digital mutation come into play. Without this guarantee, automation ceases to be a competitive advantage and transforms into an automated vector for spreading vulnerabilities and tampered code.

Understanding the SLSA Framework and Maturity Levels

The SLSA (Supply-chain Levels for Software Artifacts) framework is a set of security guidelines structured into maturity levels that protects software integrity against tampering. In practice, it acts as an instruction manual and a quality seal for the supply chain, defining what a pipeline must do to be considered trustworthy. The framework is divided into four main levels, where level zero represents the total absence of formal guarantees and level four requires fully isolated, ephemeral builds with automated generation of cryptographically signed metadata.

Each SLSA level raises the technical rigor required to build an artifact. While initial levels focus on generating automated records about build origins, higher levels demand reproducibility—the ability to run the exact same compilation process in different environments and obtain the exact same byte-for-byte binary result. This progression allows engineering teams to adopt security incrementally, securing the most critical points of the CI/CD infrastructure first before reaching full compliance required in highly regulated enterprise environments.

The Role of In-toto in Step Traceability

While SLSA defines the security rules and tiers, in-toto is the technology that makes this traceability viable in practice. Created to protect end-to-end supply chain integrity, in-toto works as a kind of 'passport' for software, where each phase of development—from code review to final package generation—is recorded in metadata known as 'link files'. Each link is cryptographically signed by whoever or whatever executed the action, whether a human engineer or an automated agent like GitHub Actions or Jenkins.

In practice, in-toto ensures that no pipeline step was skipped, suppressed, or executed by unauthorized actors. If an attacker attempts to skip security testing to accelerate the deployment of modified code, in-toto's verification system detects the missing corresponding signature and blocks deployment immediately. This logical chaining transforms the pipeline into an unbreakable chain of custody, where any tampering attempt leaves evident traces and prevents the corrupted binary from proceeding through the workflow.

Practical Architecture for a Secure Pipeline with Metadata

Building a pipeline with integrity verification requires a shift in automation mindset: the generated artifact no longer travels alone; it carries an inseparable cryptographic dossier. The typical architecture begins with an ephemeral build environment that executes compilation in an isolated container without excessive privileges. During this process, integrated tools collect detailed information about used dependencies, the exact source code (with commit hash), and triggered compilation tools, generating a structured provenance document.

Next, this document is digitally signed using keys managed by secure cryptography services, such as Cosign associated with the Sigstore project. The binary and its respective signature are then stored in a compatible artifact registry. At deployment time, the destination environment performs strict validation: before downloading and running the container or binary, it verifies the digital signature and cross-references manifest data with established security policies. If any verification fails, the process is aborted and a security alert is dispatched to the engineering team.

Practical Implementation: Generating and Verifying Provenance

To illustrate the practical application of these concepts, we can examine how generating provenance metadata and performing verification occurs using modern command-line tools. The process involves creating an attestation file documenting the build process and verifying that attestation before deployment. Below is a conceptual example of commands used in an automated pipeline to sign an artifact and validate its integrity.

# Generate the application binary and capture its SHA-256 hash sha256sum my-application > checksums.txt  # Create provenance attestation using Cosign/Sigstore cosign generate-blob-attestation --key cosign.key --output-certificate cert.pem --output-signature sig.sig my-application  # Verify signature and artifact integrity prior to deployment cosign verify-blob --key cosign.pub --signature sig.sig --certificate cert.pem my-application

These commands demonstrate the operational simplicity modern tools provide for implementing complex security standards. Using file-based signatures or cloud-managed identities removes the previous complexity of managing cumbersome Public Key Infrastructure (PKI) architectures. Consequently, engineering teams of any size can apply cryptographic verification to their artifacts without slowing down the pace of continuous delivery.

Conclusion and Pros and Cons of Adopting SLSA and In-toto

Adopting continuous deployment pipelines with integrity verification via SLSA and in-toto represents a milestone in the security maturity of any software engineering organization. The pros are evident: near-total elimination of supply chain attacks, simplified regulatory compliance, end-to-end traceability, and a drastic increase in confidence regarding what runs in production. On the other hand, cons include the initial team learning curve, the need to adapt legacy CI/CD tooling, and a slight increase in maintenance complexity for key management and verification policies.

Ultimately, supply chain security is no longer a luxury reserved for massive tech companies; it has become a basic operational necessity in a highly connected digital ecosystem. Investing in pipelines that attest artifact provenance ensures that the speed provided by DevOps does not come with unacceptable risks. By transforming software integrity into an automated and verifiable requirement, organizations protect their systems, clients, and product reputation against increasingly sophisticated threats.