<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.5">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-03-11T06:19:03+00:00</updated><id>/feed.xml</id><title type="html">SLSA</title><subtitle>SLSA: Security framework to ensure software supply chain integrity</subtitle><entry><title type="html">Supply Chain Robots, Electric Sheep, and SLSA</title><link href="/blog/2025/12/supply-chain-robots-slsa" rel="alternate" type="text/html" title="Supply Chain Robots, Electric Sheep, and SLSA" /><published>2025-12-18T00:00:00+00:00</published><updated>2025-12-18T00:00:00+00:00</updated><id>/blog/2025/12/supply-chain-robots-slsa</id><content type="html" xml:base="/blog/2025/12/supply-chain-robots-slsa"><![CDATA[<p>By Brett Smith, Distinguished Software Developer at SAS Institute</p>
<h2 id="why-is-securing-the-supply-chain-important">Why is securing the supply chain important?</h2>
<p>In my mind’s eye, the “electric sheep” are the products we build and sell to
generate revenue. To create “electric sheep”, we build “supply chain robots”
that dream of “electric sheep”. The robots are our automated pipelines, our
CI/CD systems, and our infrastructure. They construct the sheep, herd them along
the software development lifecycle (SDLC), and shepherd them to market.</p>
<p>That all sounds great but, there are wolves at the door. Smart digital wolves.
And they are not just trying to eat the electric sheep, they mean to reprogram
the robots, poison the assembly line, and turn our own infrastructure against
us. The reality of software supply chain security today is that we need supply
chain robots to protect everything from the digital wolves.</p>
<h2 id="why-this-matters">Why This Matters</h2>
<p>After a few major attacks, the US government decided to protect itself as
governments should. On May 12, 2021, the White House dropped Executive Order
14028 on Cybersecurity. And with that, if you wanted to sell to the federal
government, you had a whole new set of regulations to meet.</p>
<p>So you skim the Executive Order. It reads like an android interpretation of
lawyers and lawmakers notes on engineering security documentation. Excellent
vague bits like the following:</p>
<ul>
<li><strong>PO.5.1</strong>: Separate and protect each environment involved in software
development</li>
<li><strong>PO.5.2</strong>: Secure and harden development endpoints</li>
<li><strong>PW.6.1</strong>: Use compiler, interpreter, and build tools that offer security
features</li>
<li><strong>PW.6.2</strong>: Determine which tool features should be used and implement
approved configurations</li>
<li><strong>PS.1.1</strong>: Store all forms of code based on least privilege principles</li>
<li><strong>PS.3.2</strong>: Collect, safeguard, maintain, and share provenance data for all
software components</li>
</ul>
<p>For reference it sends you down the rabbit hole of NIST standards, which are
just as vague. The next step is to leverage your company’s ISO subscription to
start digging into ISO 27001. ISO 27002 guidelines give you a glimmer of hope
but still no real answers.</p>
<p>How do you turn this mountain of abstract policy into concrete action?</p>
<h2 id="slsa-from-confusion-to-clarity">SLSA: From Confusion to Clarity</h2>
<p>SLSA (pronounced “salsa”) is a comprehensive security framework for software
supply chains. Think of it as a maturity model - organizations can progressively
improve their security posture by advancing through levels. Each track focuses
on different aspects of the supply chain: Build focuses on artifact creation
integrity, while Source focuses on code trustworthiness. The framework is
designed to be practical and incrementally adoptable, allowing organizations to
start where they are and improve over time. Version 1.2 introduces the
reintegrated Source Track after focusing solely on Build in v1.0.</p>
<p>SLSA provides us with:</p>
<ul>
<li>A common vocabulary to talk about software supply chain security</li>
<li>A way to secure your incoming supply chain by evaluating the trustworthiness
of the artifacts you consume</li>
<li>An actionable checklist to improve your own software’s security</li>
<li>A way to measure your efforts toward compliance with the Secure Software
Development Framework (SSDF)</li>
</ul>
<p>The framework establishes three trust boundaries encouraging the right
standards, attestation, and technical controls, so we can harden the system from
these threats and risks. SLSA is a check-list of standards and controls to
prevent tampering, improve integrity, secure packages and infrastructure in your
projects, platform, and enterprises. It is about identifying and closing attack
vectors in the Supply Chain and proper governance of artifacts throughout the
chain.</p>
<p>Validating Artifact Integrity through verification is a key component of SLSA
which helps to:</p>
<ul>
<li>Prevent Integrity Attacks</li>
<li>Prevent Unauthorized Modifications</li>
<li>Validate Artifact Integrity</li>
<li>Close Attack Vectors</li>
</ul>
<p>Most importantly for our EO 14028 journey: SLSA translated policy requirements
into technical implementation steps.</p>
<h2 id="the-two-tracks-build-and-source">The Two Tracks: Build and Source</h2>
<p>The two tracks are complementary but independent. Build Track has levels L0-L3,
while Source Track has levels L1-L4. Organizations can advance on one track
without necessarily being at the same level on the other, though both are
important for comprehensive supply chain security. The Build Track addresses
threats during the compilation and packaging phase, while Source Track addresses
threats in code creation and management. Together, they provide end-to-end
visibility and protection from source code to deployed artifact.</p>
<h3 id="build-track-the-provenance-receipt">Build Track: The Provenance Receipt</h3>
<p>The Build Track uses provenance as a receipt for your software build. It answers
three critical questions:</p>
<ol>
<li><strong>Identity of the builder</strong> - Who or what built this?</li>
<li><strong>The build process used</strong> - How was it built?</li>
<li><strong>What inputs went into the build</strong> - What materials were used?</li>
</ol>
<p>This matters because many supply chain attacks happen during the build phase:
attackers compromise build systems, inject malicious code, or substitute
artifacts. Provenance creates an auditable trail.</p>
<p><strong>Build L0</strong>: No guarantees; you’re not doing SLSA yet</p>
<p><strong>Build L1</strong>: Provenance exists</p>
<ul>
<li>Build process must generate provenance describing how the artifact was built</li>
<li>Provenance generated and distributed</li>
<li>Prevents mistakes, but easy to bypass</li>
<li>Quick to implement with minimal workflow changes</li>
<li><em>This got us started on EO requirements for provenance data</em></li>
</ul>
<p><strong>Build L2</strong>: Hosted build platform</p>
<ul>
<li>Build service generates authenticated provenance</li>
<li>Provenance signed by the build platform itself</li>
<li>Requires explicit attack to forge</li>
<li>Strong build identity from hosted platform</li>
<li>Move to platforms like GitHub Actions, GitLab CI, or Google Cloud Build</li>
<li><em>This addressed PW.6.1 and PW.6.2: using hardened build tools</em></li>
</ul>
<p><strong>Build L3</strong>: Hardened builds</p>
<ul>
<li>Hardened build platform with strong isolation</li>
<li>Strong tamper protection during the build</li>
<li>Isolated build environments prevent cross-build contamination</li>
<li>Prevents insider threats and credential compromise</li>
<li>Build provenance prevents run-time artifact substitution</li>
<li><em>This satisfied PO.5.1 and PO.5.2: environment separation and hardening</em></li>
</ul>
<p>Build L3 became our target for most releases. It requires significant platform
investment but provides strong protection against sophisticated attacks.</p>
<p>Here are some things I would like to see in the future for Build Track beyond
L3:</p>
<ul>
<li>Pinned dependencies, which guarantee that each build runs on exactly the same
set of inputs.</li>
<li>Hermetic builds, which guarantee that no extraneous dependencies are used.</li>
<li>All dependencies listed in the provenance, which enables downstream verifiers
to recursively apply SLSA to dependencies.</li>
<li>Reproducible builds, which enable other build platforms to corroborate the
provenance.</li>
</ul>
<h3 id="source-track-trust-from-code-to-commit">Source Track: Trust from Code to Commit</h3>
<p>The Source Track addresses “How do we know this source code is what the
organization intended?” It focuses on the change management process: how code
gets into the repository and onto protected branches.</p>
<p><strong>Source L1</strong>: Version controlled</p>
<ul>
<li>Code in a modern version control system like Git</li>
<li>Foundation for operational maturity</li>
<li><em>This covered PS.1.1: proper storage of all code forms</em></li>
</ul>
<p><strong>Source L2</strong>: Source attestations and controls</p>
<ul>
<li>Source Control System generates tamper-resistant evidence</li>
<li>Contemporaneous documentation of revision creation</li>
<li>All changes recorded and tracked</li>
<li>Technical controls enforced</li>
<li><em>This ensured proper access control, change tracking, and delivered PS.3.2:
collecting and safeguarding provenance</em></li>
</ul>
<p><strong>Source L3</strong>: Protected references with continuous enforcement</p>
<ul>
<li>Protected branches and tags identified and secured</li>
<li>Technical controls continuously enforced on named references</li>
<li>Strong guarantees for change management on protected refs</li>
<li><em>This provided additional protection for production branches and release tags</em></li>
</ul>
<p><strong>Source L4</strong>: Two-party review</p>
<ul>
<li>Requires two trusted persons to review all changes</li>
<li>Makes unilateral malicious changes much harder</li>
<li><em>This became our gold standard for production code</em></li>
</ul>
<h2 id="conclusion-from-chaos-to-compliance">Conclusion: From Chaos to Compliance</h2>
<p>SLSA isn’t just a checklist, it is a comprehensive framework that addresses
supply chain security systematically. The two tracks, source code security and
build integrity, complement each other. No need to achieve the highest levels
immediately, start where you are and progress incrementally. The attestation
model is powerful. It creates verifiable evidence that can be validated by any
consumer without requiring trust in just one party.</p>
<p>Implementation details vary by ecosystem because what works for Python is
different from what works for Rust, but the principles remain consistent. Start
with Build L1 or Source L2 and progress from there. Both tracks are important
for comprehensive security, though you may prioritize one based on your specific
threats.</p>
<p>If you have a lot of electric sheep, you need a fleet of supply chain robots to
tend them. Build a platform to manage the chaos, herd the cats, eliminate the
unicorns, and eradicate the chaos from your Software Supply Chain.</p>
<p>SLSA is how we get from safe enough to being as resilient as possible, at any
link in the chain.</p>
<p>When we started this journey, Executive Order 14028 was nothing more than pages
of requirements with no clear implementation path. SLSA translated those
abstract requirements into concrete, measurable levels. Build Track mapped to
build tool requirements and environment hardening. Source Track mapped to access
control and provenance collection. As more requirements emerged from the EU,
Australia, India, and others, SLSA provided a consistent framework to address
them all.</p>
<p>The incremental nature of SLSA levels meant we could show progress, justify
investment, and continuously improve rather than attempting a massive
all-at-once transformation.</p>
<p>You now have an EO 14028 compliant pipeline. Use it for everything.</p>
<p>The pipeline builds the pipeline. Use SLSA as your roadmap. Build a platform to
manage the chaos.</p>
<p>And remember: compliance doesn’t equal security, but SLSA helps you achieve
both.</p>
<hr />
<p><em>Brett Smith is a Distinguished Software Developer at SAS Institute, where he
helps architect and secure supply chain pipelines for an Analytics, AI, and Data
Management company.</em></p>]]></content><author><name>Brett Smith</name></author><summary type="html"><![CDATA[By Brett Smith, Distinguished Software Developer at SAS Institute]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Announcing SLSA v1.2</title><link href="/blog/2025/11/announce-slsa-v1.2" rel="alternate" type="text/html" title="Announcing SLSA v1.2" /><published>2025-11-24T00:00:00+00:00</published><updated>2025-11-24T00:00:00+00:00</updated><id>/blog/2025/11/announce-slsa-v1.2</id><content type="html" xml:base="/blog/2025/11/announce-slsa-v1.2"><![CDATA[<p>Today we’re pleased to announce the release of <a href="/spec/v1.2/">SLSA Version 1.2</a>,
the latest version of the SLSA specification.</p>
<p>With the introduction of the <em>Source Track</em>, SLSA v1.2 represents a major
milestone in the development of SLSA. The Source Track covers threats from
the authoring and reviewing and management of source code. For more details on
how SLSA addresses these threats please refer to
<a href="/threats">Threats &amp; mitigations</a>.</p>
<p>Please, refer to the <a href="/spec/v1.2/whats-new">What’s new</a> section for further
details.</p>
<p>SLSA v1.2 is backwards compatible with SLSA v1.1.</p>
<p>The SLSA specification follows the <a href="https://github.com/CommunitySpecification/Community_Specification/blob/main/">Community Specification</a> lifecycle
going through several <a href="/spec-stages">stages of maturation</a>. This release is the
culmination of that process. During the development of SLSA v1.2 we received
and addressed <a href="https://github.com/slsa-framework/slsa/issues?q=is%3Aissue%20label%3A%22slsa%201.2-RC1%20feedback%22">feedback</a> from the community. We’d like to thank everyone that
took the time to review the release candidates and PRs and everyone that
contributed to its development.</p>
<p>After today’s release development of the SLSA specification
<a href="/current-activities">continues</a> with the development of the Build Environment
Track and the Dependency Track. Learn how you can
<a href="/community#get-involved">get involved</a> with their development.</p>]]></content><author><name>SLSA Community</name></author><summary type="html"><![CDATA[Today we’re pleased to announce the release of SLSA Version 1.2, the latest version of the SLSA specification.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Announcing SLSA v1.2 Release Candidate 2</title><link href="/blog/2025/11/slsa-v1.2-rc2" rel="alternate" type="text/html" title="Announcing SLSA v1.2 Release Candidate 2" /><published>2025-11-10T00:00:00+00:00</published><updated>2025-11-10T00:00:00+00:00</updated><id>/blog/2025/11/slsa-v1.2-rc2</id><content type="html" xml:base="/blog/2025/11/slsa-v1.2-rc2"><![CDATA[<p>Today we’re releasing for public review <a href="/spec/v1.2-rc2/">SLSA Version 1.2
RC2</a>, a Release Candidate of SLSA v1.2. We are seeking
comments on this specification by November 24th, 2025. This release addresses
most of the <a href="https://github.com/slsa-framework/slsa/issues?q=is%3Aissue%20label%3A%22slsa%201.2-RC1%20feedback%22">feedback</a> we received on <a href="/spec/v1.2-rc1/">RC1</a>.</p>
<p>With the introduction of the <em>Source Track</em>, SLSA v1.2 represents a major
milestone in the development of SLSA. Indeed, while SLSA v1.0 introduced
the notion of tracks with different levels focusing on different aspects of
the software supply chain, its scope was limited to the <em>Build Track</em>, a
narrower scope than what SLSA v0.1 covered. The <em>Source Track</em> picks up the
source management related requirements that v0.1 touched on but in a much
more complete and thorough way, comparable to what was done in the <em>Build
Track</em>.</p>
<p>Please, refer to the <a href="/spec/v1.2-rc2/whats-new">What’s new</a> section for
further details.</p>
<p>SLSA v1.2 is backwards compatible with SLSA v1.1.</p>
<p>The SLSA specification follows the <a href="https://github.com/CommunitySpecification/Community_Specification/blob/main/">Community Specification</a> lifecycle
going through several <a href="/spec-stages">stages of maturation</a>. The publication
of a candidate for <a href="/spec-stages#approved">Approved Specification</a> starts a 2 week review period
during which the community at large is invited to review the draft and
raise any issues. If you do find any issue, please, open an issue on
<a href="https://github.com/slsa-framework/slsa/issues">GitHub</a>. If no major issues are found during this review period the v1.2
RC2 draft will then be published as Version 1.2, the new <a href="/spec-stages#approved">Approved
Specification</a>, effectively replacing Version 1.1. Otherwise a v1.2 RC3
will be published instead.</p>]]></content><author><name>SLSA Community</name></author><summary type="html"><![CDATA[Today we’re releasing for public review SLSA Version 1.2 RC2, a Release Candidate of SLSA v1.2. We are seeking comments on this specification by November 24th, 2025. This release addresses most of the feedback we received on RC1.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">SLSA End-to-End With AMPEL &amp;amp; Friends</title><link href="/blog/2025/10/slsa-e2e-with-ampel" rel="alternate" type="text/html" title="SLSA End-to-End With AMPEL &amp;amp; Friends" /><published>2025-10-21T00:00:00+00:00</published><updated>2025-10-21T00:00:00+00:00</updated><id>/blog/2025/10/slsa-e2e-with-ampel</id><content type="html" xml:base="/blog/2025/10/slsa-e2e-with-ampel"><![CDATA[<p>This guest post walks through a practical, end-to-end SLSA implementation using
<a href="https://github.com/carabiner-dev/ampel">🔴🟡🟢 AMPEL</a> — the Amazing Multipurpose
Policy Engine (and L) — along with other tools in the supply chain security
ecosystem. You’ll see how each step in a project’s build can be protected
through attested data, using VSA receipts to capture and verify each step
integrity along the way.</p>
<h2 id="requirements">Requirements</h2>
<p>This example runs through the
<a href="https://github.com/carabiner-dev/demo-slsa-e2e/blob/main/.github/workflows/release.yaml">release workflow in the SLSA E2E demo repository</a>.
If you want to try running the verification steps yourself, download
<a href="https://github.com/carabiner-dev/ampel/releases/latest">the latest AMPEL binary</a>.
We also recommend downloading <a href="https://github.com/carabiner-dev/bnd">bnd</a> to
inspect the generated attestations.</p>
<p>We’ll walk through the steps in the workflow. When the workflow runs, all the verification
results are displayed on the run page on GitHub (<a href="https://github.com/carabiner-dev/demo-slsa-e2e/actions/runs/18217437602">example</a>).
If you look at the execution output (<a href="https://github.com/carabiner-dev/demo-slsa-e2e/actions/runs/18217437602/job/51869676510">example</a>),
you’ll notice that those steps that involve AMPEL are marked with its traffic
lights (🔴🟡🟢), those that use <code>bnd</code> are marked with its pretzel icon (🥨).</p>
<h2 id="meet-the-fritoto-project">Meet the Fritoto Project</h2>
<p>This walkthrough will analyze how the Fritoto project releases secure binaries.
Fritoto (a play on Friday + In-toto) is a utility that generates attestations
that inform if a software piece was built on a Friday. Why? Well… you don’t
deploy on Fridays, right? Fritoto’s attestations let you write policies to
prevent shipping software laced with Fridayness.</p>
<p>(Note that Fritoto is a joke project, but it is fully functional if you want to
attest those cursed EoW builds).</p>
<p>As a security tool, Fritoto has implemented a secure end-to-end build process,
starting with a hardened revision history and extending all the way to the
secure execution of its binaries.</p>
<p>Let’s inspect their hardened supply chain security architecture!</p>
<h2 id="it-all-starts-at-the-source">It all starts at the source…</h2>
<p>All security guardrails are worthless if attackers can inject malicious code into
the codebase. To ensure all changes going into the codebase are properly vetted,
the Fritoto team have secured their git repository with
<a href="https://github.com/slsa-framework/source-tool"><code>sourcetool</code></a>, the SLSA Source
Track CLI.</p>
<p>The SLSA Source tools allowed the project to
<a href="https://github.com/slsa-framework/source-tool/blob/main/GETTING_STARTED.md">onboard its repository in minutes</a>,
hardening the revision history and setting up tools to continuously check that
repository security controls are properly set. Once the SLSA Source workflows are
in place, each commit receives its own SLSA Source attestations, confirming
that all changes have been merged while the security controls were in place.</p>
<p>By checking the SLSA Source attestations, Fritoto makes sure all builds are run
on a commit guaranteed to be part of a revision history were all changes were
properly vetted.</p>
<p>Before allowing any other steps of the release process run, Fritoto leverages
AMPEL to enforce a policy that verifies the build point’s source attestations:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">🔴🟡🟢 Verify Build Point Commit to be SLSA Source Level 3+</span>
  <span class="na">uses</span><span class="pi">:</span> <span class="s">carabiner-dev/actions/ampel/verify@HEAD</span>
  <span class="na">with</span><span class="pi">:</span>
    <span class="na">subject</span><span class="pi">:</span> <span class="s2">"</span><span class="s">gitCommit:${{</span><span class="nv"> </span><span class="s">github.sha</span><span class="nv"> </span><span class="s">}}"</span>
    <span class="na">policy</span><span class="pi">:</span> <span class="s2">"</span><span class="s">git+https://github.com/carabiner-dev/policies#vsa/slsa-source-level3.json"</span>
    <span class="na">collector</span><span class="pi">:</span> <span class="s2">"</span><span class="s">note:https://github.com/${{</span><span class="nv"> </span><span class="s">github.repository</span><span class="nv"> </span><span class="s">}}@${{</span><span class="nv"> </span><span class="s">github.sha</span><span class="nv"> </span><span class="s">}}"</span>
    <span class="na">signer</span><span class="pi">:</span> <span class="s2">"</span><span class="s">sigstore::https://token.actions.githubusercontent.com::https://github.com/slsa-framework/source-actions/.github/workflows/compute_slsa_source.yml@refs/heads/main"</span>
    <span class="na">attest</span><span class="pi">:</span> <span class="no">false</span>

<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">🥨 Export source attestations</span>
  <span class="na">id</span><span class="pi">:</span> <span class="s">export-source-attestations</span>
  <span class="na">run</span><span class="pi">:</span> <span class="pi">|</span>
    <span class="s">bnd read note:${{ github.repository }}@${{ github.sha }} --jsonl &gt;&gt; .attestations/attestations.bundle.jsonl</span>
    <span class="s">echo "" &gt;&gt; .attestations/attestations.bundle.jsonl</span>

</code></pre></div></div>
<p>In this fragment of the
<a href="https://github.com/carabiner-dev/demo-slsa-e2e/blob/main/.github/workflows/release.yaml">release workflow</a>,
AMPEL pulls the commit’s VSA (Verification Summary Attestation) from the git
commit notes and verifies that the repository had Source Level 3 protections in place,
ensuring no rogue commits altered the code base.</p>
<p>Second, using bnd, we extract the attestations and add them to a jsonl (linear JSON)
bundle where we’ll collect all the build process’ security metadata.</p>
<h2 id="no-trust-no-go">No Trust, No Go</h2>
<p>Now that the source is trusted, the Fritoto release process checks its builder.
It uses <a href="https://images.chainguard.dev/directory/image/go/overview">Chainguard’s Go image</a>
to build binaries for the supported platforms. This image ships with some
attestations already built in, making it is easy to verify with AMPEL. We will
leverage its SLSA Build provenance attestation to make sure the image and the
Go compiler within come from
<a href="https://edu.chainguard.dev/compliance/slsa/slsa-chainguard/">Chainguard’s SLSA3 build system</a>.</p>
<p>To verify it, AMPEL pulls the provenance attestations attached to the image using
its <code>coci</code> (Cosign/OCI) collector driver. Then it runs them through the project’s
builder PolicySet. AMPEL will also generate a VSA capturing the results of the
verification which we’ll also save for later in our jsonl file.</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">🔴🟡🟢 Verify Builder Image</span>  
  <span class="na">uses</span><span class="pi">:</span> <span class="s">carabiner-dev/actions/ampel/verify@HEAD</span>  
  <span class="na">with</span><span class="pi">:</span>  
    <span class="c1"># The verification subjest: The image digest  </span>
    <span class="na">subject</span><span class="pi">:</span> <span class="s2">"</span><span class="s">${{</span><span class="nv"> </span><span class="s">steps.digests.outputs.builder</span><span class="nv"> </span><span class="s">}}"</span>
    <span class="c1"># Use the modified policy set</span>
    <span class="na">policy</span><span class="pi">:</span> <span class="s2">"</span><span class="s">git+https://github.com/${{</span><span class="nv"> </span><span class="s">github.repository</span><span class="nv"> </span><span class="s">}}#policies/fritoto-verify-builder.hjson"</span>
    <span class="c1"># Collect builder attestations attached to the image  </span>
    <span class="na">collector</span><span class="pi">:</span> <span class="s2">"</span><span class="s">coci:cgr.dev/chainguard/go"</span>  
    <span class="c1"># We don't specify the signer here as it's baked in the policy code, but</span>
    <span class="c1"># we could do it:</span>
    <span class="c1"># signer: "sigstore::https://token.actions.githubusercontent.com::https://github.com/slsa-framework/source-actions/.github/workflows/compute_slsa_source.ml@refs/heads/main"</span>
    <span class="na">attest</span><span class="pi">:</span> <span class="no">false</span>  
</code></pre></div></div>
<p><a href="https://github.com/carabiner-dev/demo-slsa-e2e/blob/cb5a32d292d1222e8d55a5d0d0585e2da0efe7a1/.github/workflows/release.yaml#L98-L109">Check the source</a>.</p>
<h3 id="the-build-image-policyset">The Build Image PolicySet</h3>
<p>A PolicySet is a group of policies that AMPEL applies together. Fritoto’s
<a href="https://github.com/carabiner-dev/demo-slsa-e2e/blob/main/policies/fritoto-verify-builder.hjson">build image PolicySet</a>
performs the <a href="/spec/v1.0/verifying-artifacts">verifications suggested in the SLSA spec</a> by reusing three
policies from AMPEL’s community repository:</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="w">   </span><span class="nl">"policies"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
        </span><span class="p">{</span><span class="w">
            </span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"slsa-builder-id"</span><span class="p">,</span><span class="w">
            </span><span class="nl">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
                </span><span class="nl">"location"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nl">"uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"git+https://github.com/carabiner-dev/policies#slsa/slsa-builder-id.json"</span><span class="w"> </span><span class="p">}</span><span class="w">
            </span><span class="p">},</span><span class="w">
            </span><span class="nl">"meta"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nl">"controls"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nl">"framework"</span><span class="p">:</span><span class="w"> </span><span class="s2">"SLSA"</span><span class="p">,</span><span class="w"> </span><span class="nl">"class"</span><span class="p">:</span><span class="w"> </span><span class="s2">"BUILD"</span><span class="p">,</span><span class="w"> </span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LEVEL_3"</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="p">}</span><span class="w">  
        </span><span class="p">},</span><span class="w">
        </span><span class="p">{</span><span class="w">
            </span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"slsa-build-type"</span><span class="p">,</span><span class="w">
            </span><span class="nl">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
                </span><span class="nl">"location"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nl">"uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"git+https://github.com/carabiner-dev/policies#slsa/slsa-build-type.json"</span><span class="w"> </span><span class="p">}</span><span class="w">
            </span><span class="p">},</span><span class="w">  
            </span><span class="nl">"meta"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nl">"controls"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nl">"framework"</span><span class="p">:</span><span class="w"> </span><span class="s2">"SLSA"</span><span class="p">,</span><span class="w"> </span><span class="nl">"class"</span><span class="p">:</span><span class="w"> </span><span class="s2">"BUILD"</span><span class="p">,</span><span class="w"> </span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LEVEL_3"</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="p">}</span><span class="w">
        </span><span class="p">},</span><span class="w">
        </span><span class="p">{</span><span class="w">
            </span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"slsa-build-point"</span><span class="p">,</span><span class="w">
            </span><span class="nl">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
                </span><span class="nl">"location"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nl">"uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"git+https://github.com/carabiner-dev/policies#slsa/slsa-build-point.json"</span><span class="w"> </span><span class="p">}</span><span class="w">
            </span><span class="p">},</span><span class="w">
            </span><span class="nl">"meta"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">  
                </span><span class="nl">"controls"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nl">"framework"</span><span class="p">:</span><span class="w"> </span><span class="s2">"SLSA"</span><span class="p">,</span><span class="w"> </span><span class="nl">"class"</span><span class="p">:</span><span class="w"> </span><span class="s2">"BUILD"</span><span class="p">,</span><span class="w"> </span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"LEVEL_3"</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">],</span><span class="w">
                </span><span class="nl">"enforce"</span><span class="p">:</span><span class="w"> </span><span class="s2">"OFF"</span><span class="w">
            </span><span class="p">}</span><span class="w">
        </span><span class="p">}</span><span class="w">
    </span><span class="p">]</span><span class="w">
</span></code></pre></div></div>
<p>The policies are referenced remotely but if you look at each policy, you’ll see
that they
<a href="https://github.com/carabiner-dev/policies/blob/main/slsa/slsa-build-type.json">verify the build type</a>,
<a href="https://github.com/carabiner-dev/policies/blob/main/slsa/slsa-builder-id.json">look for the expected builder ID</a>, and
<a href="https://github.com/carabiner-dev/policies/blob/main/slsa/slsa-build-point.json">verify the build point</a> (although this one is not enforced in the policy set for now,
as the build point is missing from the image attestation).</p>
<p>The policy set defines the contextual data required by each policy. Also, you’ll
notice that the signer identities are verified and “baked” into the policyset code:</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="w">  </span><span class="nl">"identities"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
      </span><span class="p">{</span><span class="w">  
          </span><span class="nl">"sigstore"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">  
              </span><span class="nl">"issuer"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://token.actions.githubusercontent.com"</span><span class="p">,</span><span class="w">  
              </span><span class="nl">"identity"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://github.com/chainguard-images/images/.github/workflows/release.yaml@refs/heads/main"</span><span class="w">  
          </span><span class="p">}</span><span class="w">  
      </span><span class="p">}</span><span class="w">  
  </span><span class="p">]</span><span class="w">
</span></code></pre></div></div>
<p>By codifying the signer identities and contextual values in the policy, you can
make them immutable when you sign the policy.</p>
<!-- markdownlint-disable MD026 -->
<h2 id="moaar-data">Moaar Data!</h2>
<p>As part of their build process, the Fritoto builder creates additional attestations
to ensure the build is safe to ship to its users and increase the transparency
of the released assets. All of these additional attestations will describe data
about the build commit, they will be collected and checked before releasing the
binaries.</p>
<p>The following additional attestations are produced before the build:</p>
<h3 id="sbom">SBOM</h3>
<p>First, to keep track of all dependencies, the build process builds an SPDX
Software Build of Materials. The release workflow uses Carabiner’s
<a href="https://github.com/carabiner-dev/unpack">unpack</a> utility as it generates an
attested SBOM natively but you can use any SBOM generator such as Syft or Trivy
and then tie the SBOM to the commit in an attestation with <code>bnd predicate</code>.</p>
<h3 id="checking-for-vulnerabilities-and-dealing-with-them">Checking for Vulnerabilities (and dealing with them)</h3>
<p>Next, the build process generates an attestation of an OSV vulnerability scan.
It is wrapped and signed as an attestation.</p>
<p>But alas! OSV scanner found that the project is susceptible to CVE-2020-8911 and
CVE-2020-8912 (BTW, we’ve <a href="https://github.com/carabiner-dev/demo-slsa-e2e/blob/cb5a32d292d1222e8d55a5d0d0585e2da0efe7a1/go.mod#L5-L6">injected these vulns</a>
on purpose for this demo 😇). Later in the release process, AMPEL will gate on
any detected vulnerabilities before shipping the binaries, so we need to address
them or the policy will fail. How? Well, we <strong>VEX</strong>!</p>
<p>VEX, the
<a href="https://www.cisa.gov/resources-tools/resources/minimum-requirements-vulnerability-exploitability-exchange-vex">Vulnerability Exploitability Exchange</a> lets software
authors and other stakeholders communicate if a software piece is affected by a
vulnerability.</p>
<p>As these CVEs are <a href="https://github.com/carabiner-dev/demo-slsa-e2e/blob/cb5a32d292d1222e8d55a5d0d0585e2da0efe7a1/main.go#L16-L21">known not to be exploitable in Fritoto</a>,
the release engineers issue two OpenVEX attestations assessing the project as
<a href="https://github.com/openvex/spec/blob/main/OPENVEX-SPEC.md#status-labels"><code>not_affected</code></a>
by them. They do this using <a href="https://github.com/openvex/vexctl">vexctl</a> the
OpenVEX CLI that manages VEX documents, and then signing them into attestations
using bnd. In the demo, the VEX documents are generated on the fly and will be
published in the attestations bundle.</p>
<h3 id="show-me-those-tests">Show me Those Tests!</h3>
<p>Next up, Fritoto leverages <a href="https://github.com/carabiner-dev/beaker">beaker</a>,
an experimental tool from Carabiner Systems that runs your project’s tests and
generates a standard
<a href="https://github.com/in-toto/attestation/blob/main/spec/predicates/test-result.md">test-results</a>
attestation from the tests run. Since it is just a standard statement, the same
policy works with a tests-result attestation from any other tool.</p>
<p>Again, this statement will describe the test run at the specific build point,
that is, it will have the commit’s sha as its subject.</p>
<h2 id="lets-build-that-castle">Let’s Build that Castle</h2>
<p>It is time to run the build. But before doing so, we need to verify that the
conditions snapshotted in all the attested data check out with out expectations.
AMPEL will gate the build by
<a href="https://github.com/carabiner-dev/demo-slsa-e2e/blob/main/policies/fritoto-gate-build.hjson">applying a preflight PolicySet</a>
to all the collected attestations, stopping the workflow if anything goes wrong.</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="c1"># Gate the build enforcing the preflight policy</span>
  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">🔴🟡🟢 Run Release Pre-flight Verification</span>
    <span class="na">uses</span><span class="pi">:</span> <span class="s">carabiner-dev/actions/ampel/verify@HEAD</span>
    <span class="na">with</span><span class="pi">:</span>  
      <span class="na">subject</span><span class="pi">:</span> <span class="s2">"</span><span class="s">sha1:${{</span><span class="nv"> </span><span class="s">github.sha</span><span class="nv"> </span><span class="s">}}"</span>
      <span class="na">policy</span><span class="pi">:</span> <span class="s2">"</span><span class="s">git+https://github.com/${{</span><span class="nv"> </span><span class="s">github.repository</span><span class="nv"> </span><span class="s">}}#policies/fritoto-gate-build.hjson"</span>
      <span class="na">collector</span><span class="pi">:</span> <span class="s2">"</span><span class="s">jsonl:.attestations/attestations.bundle.jsonl"</span>
      <span class="na">attest</span><span class="pi">:</span> <span class="no">false</span>
</code></pre></div></div>
<p>In this case, AMPEL collects the attestations with its jsonl collector from the
file that the release process has been assembling on each step. You’ll notice
that the policy set is referenced remotely; this ensures that the policy code
cannot be changed during the build process. Note that while AMPEL policies and
policy sets can be signed, we are using them unsigned in the demo to see their
code more easily.</p>
<p>We won’t go into the policy details, but you can check the policy set code and
see that it reuses three community polices that:</p>
<ol>
<li><a href="https://github.com/carabiner-dev/policies/blob/main/sbom/sbom-exists.json">Check the SBOM was generated</a>,</li>
<li><a href="https://github.com/carabiner-dev/policies/blob/main/test-results/tests-pass.json">Verify that all unit tests passed</a>,
and</li>
<li><a href="https://github.com/carabiner-dev/policies/blob/main/openvex/no-exploitable-vulns-osv.json">Ensure no exploitable vulnerabilities are present</a>.</li>
</ol>
<p>As we mentioned before, the OSV scan returned two CVEs, but thanks to the OpenVEX
attestations, the release is allowed to run because the
<a href="https://github.com/carabiner-dev/policies/blob/main/openvex/no-exploitable-vulns-osv.json">non-exploitable vulnerabilities policy</a>
leverages the
<a href="https://github.com/carabiner-dev/policies/blob/0816f604293d448e7ce0800d82134c15bf9bb3dc/openvex/no-exploitable-vulns-osv.json#L7-L9">VEX transformer</a>
in AMPEL. This transformer reads attested VEX statements and suppresses any
non-exploitable vulnerabilities according to the signed VEX data.</p>
<p>Next, the workflow runs the build using the verified image. After running the
build script, we’ll have the binaries of the Fritoto attester for various
platforms ready to ship.</p>
<h2 id="generating-slsa-build-provenance">Generating SLSA Build Provenance</h2>
<p>After the build is done, the workflow will assemble the binaries’ SLSA Build
provenance attestation using the
<a href="https://github.com/kubernetes-sigs/tejolote">Kubernetes Tejolote attester</a>.
Tejolote queries the build system and extracts data about the jobs that produced
the artifacts, their build environment, and their configuration:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">🌶️ Generate SLSA Provenance Attestation</span>  
    <span class="na">id</span><span class="pi">:</span> <span class="s">tejolote</span>
    <span class="na">run</span><span class="pi">:</span> <span class="pi">|</span>  
      <span class="s"># Generate the provenance attestation with the Tejolote attester  </span>
      <span class="s">tejolote attest github://${{github.repository}}/"${GITHUB_RUN_ID}" \</span>
        <span class="s">--artifacts file:$(pwd)/bin/ \</span>
        <span class="s">--output .attestations/provenance.json --slsa="1.0" \</span>
        <span class="s">--vcs-url=cgr.dev/chainguard/go@${{ steps.digests.outputs.builder }}</span>

      <span class="s"># Sign the provenance attestation  </span>
      <span class="s">bnd statement .attestations/provenance.json &gt;&gt; .attestations/attestations.bundle.jsonl  </span>
      <span class="s">echo "" &gt;&gt; .attestations/attestations.bundle.jsonl</span>

</code></pre></div></div>
<p>This step adds the provenance attestation to the same jsonl bundle with the
rest of the attestations which we will publish along with the artifacts.</p>
<p>Note that for demonstration purposes, the build process is running Tejolote in
the same job, which is not ideal (or SLSA 3 compliant). Tejolote is designed to
run outside of the workflow; it observes the build system running and attests
when the build is done. But for the demo, it will do for now.</p>
<h2 id="final-check-before-release">Final Check Before Release</h2>
<p>Finally, Fritoto performs a SLSA Build and Source verification on the built
binaries to ensure everything securely ties together. To spare downstream
consumers from doing the same heavy checks, the project will issue separate
VSAs, one for each binary, which can be later used to check that every
verification up to this point actually took place and the results passed as
expected (see End User Verification).</p>
<p>Here, the workflow runs <code>ampel verify</code> on each binary, applying the
<a href="https://github.com/carabiner-dev/demo-slsa-e2e/policies/fritoto-gate-publish.hjson"><code>fritoto-gate-publish.hjson</code></a>,
and attests the results in individual VSAs:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">🔴🟡🟢 Verify All Artifacts and Generate VSAs</span>  
    <span class="na">id</span><span class="pi">:</span> <span class="s">artifact-vsas</span>  
    <span class="na">run</span><span class="pi">:</span> <span class="pi">|</span>  
            <span class="s">echo "$HOME/.carabiner/bin" &gt;&gt; $GITHUB_PATH  </span>
            <span class="s">ls -l bin/  </span>
            <span class="s">for binfile in $(ls bin/\*);   </span>
              <span class="s">do ampel verify "$binfile" \</span>
                <span class="s">--policy "git+https://github.com/${{ github.repository }}#policies/fritoto-gate-publish.hjson" \</span>
                <span class="s">--collector jsonl:.attestations/attestations.bundle.jsonl \</span>
                <span class="s">--attest-results --attest-format=vsa --results-path=vsa.tmp.json \</span>
                <span class="s">--format=html &gt;&gt; $GITHUB_STEP_SUMMARY;</span>

              <span class="s">bnd statement vsa.tmp.json &gt;&gt; .attestations/attestations.bundle.jsonl;  </span>
              <span class="s">echo "" &gt;&gt; .attestations/attestations.bundle.jsonl;  </span>
              <span class="s">rm -f vsa.tmp.json;  </span>
            <span class="s">done  </span>
</code></pre></div></div>
<h3 id="the-pre-release-policyset">The Pre-Release PolicySet</h3>
<p>The <code>fritoto-gate-publish</code> policy set performs the following checks:</p>
<ol>
<li>All the SLSA Build verifications of the binaries themselves as recommended on the spec.</li>
<li>Verifies the dependency VSAs produced from the previous verifications, namely:
<ul>
<li>That the build image is <code>SLSA_BUILD_LEVEL3</code></li>
<li>That the git commit used as build point is <code>SLSA_SOURCE_3</code></li>
</ul>
</li>
</ol>
<p>By verifying the VSAs, we don’t have to do all the checks for the image and
source again!</p>
<h3 id="a-multitude-of-subjects">A Multitude of Subjects</h3>
<p>Verifying this step is special as we will mix attestations that describe
different components of the build process: the built binaries (from the build
provenance), the git commit (the source VSAs), and the builder image (from the
VSAs generated by AMPEL when it verified the container). Now, the new VSAs we
are about to produce will have each fritoto binary as their subject… how do
we check all those subjectes from a single policy set? The answer: Chain them!</p>
<h4 id="chaining-subjects">Chaining Subjects</h4>
<p>To support this scenario, AMPEL supports the notion of <em>chained subjects</em>. The
chain connects an initial subject (the Fritoto binary) to another resource,
such as the build image or the source commit.</p>
<p>To connect the binary in the policy to the image and its build point commit, the
Fritoto team wrote <em>selectors</em> that act as carabiners clipping the binary to both
by extracting data from the build provenance attestation. Here is an example,
shortened for illustration (this is the HJSON variant with comments):</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="nx">chain</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
        <span class="na">predicate</span><span class="p">:</span> <span class="p">{</span>
            <span class="na">type</span><span class="p">:</span> <span class="dl">"</span><span class="s2">https://slsa.dev/provenance/v1</span><span class="dl">"</span><span class="p">,</span>
            <span class="c1">// The selector chains the attestation. It looks in the</span>
            <span class="c1">// resolvedDependencies dection of the build provenance</span>
            <span class="c1">// for the buildPointRepo context value defined above.</span>
            <span class="na">selector</span><span class="p">:</span> <span class="dl">'''</span><span class="s1">
                predicates[0].data.buildDefinition.resolvedDependencies.map(
                  dep, dep.uri.startsWith(context.buildPointRepo + </span><span class="dl">'</span><span class="p">@</span><span class="dl">'</span><span class="s1">), dep
                )[0]
            </span><span class="dl">'''</span>
        <span class="p">}</span>
    <span class="p">}</span>
  <span class="p">]</span>
</code></pre></div></div>
<p>This selector code extracts the URI from the <code>resolvedDependencies</code> field in the
build provenance when it matches the repository name. AMPEL then synthesizes a
new in-toto subject from the extracted data and re-fetches the new subject’s
attestations, evaluating the policy on the commit instead of the binary.</p>
<h3 id="attesting-the-verification">Attesting the Verification</h3>
<p>After running the prerelease policy, AMPEL generates a SLSA VSA for each binary,
attesting to everything we’ve seen so far. Here is an example:</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"predicateType"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://slsa.dev/verification_summary/v1"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"predicate"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
    </span><span class="nl">"dependencyLevels"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
      </span><span class="nl">"SLSA_BUILD_LEVEL_3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"SLSA_SOURCE_3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="w">
    </span><span class="p">},</span><span class="w">
    </span><span class="nl">"inputAttestations"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"digest"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
          </span><span class="nl">"sha256"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2f0f9f9a37f20449875d851b74cfaaaeaccb954a71c8d1ce78fba7bcbfb7990f"</span><span class="p">,</span><span class="w">
          </span><span class="nl">"sha512"</span><span class="p">:</span><span class="w"> </span><span class="s2">"f045158113f9cc8cd298c3903d5eb94aef5113c09f00e69d01e045aae71d015a9d6d535591d92571048c952807ed9f9cc4a3b9f877efc46fc76ad076c83b61e0"</span><span class="w">
        </span><span class="p">},</span><span class="w">
        </span><span class="nl">"uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"jsonl:.attestations/attestations.bundle.jsonl#12"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"digest"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
          </span><span class="nl">"sha256"</span><span class="p">:</span><span class="w"> </span><span class="s2">"6e437c982c3eb448f08feee2549829923f7b61da2d485fbe34571436c27b1ef7"</span><span class="p">,</span><span class="w">
          </span><span class="nl">"sha512"</span><span class="p">:</span><span class="w"> </span><span class="s2">"de594ea3853663abf58d804ee4d5eca056a7eb193a5694abce4f8d1c15025f073a39319bf45f14a5d0bff1b24188917e6a5a58d774a8c820b25a1639dd2b70bb"</span><span class="w">
        </span><span class="p">},</span><span class="w">
        </span><span class="nl">"uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"jsonl:.attestations/attestations.bundle.jsonl#6"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"digest"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
          </span><span class="nl">"sha256"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ebf2acb09c2febca789fd30ab4badbdb73d574caa7a747387cc47d68e10204e7"</span><span class="p">,</span><span class="w">
          </span><span class="nl">"sha512"</span><span class="p">:</span><span class="w"> </span><span class="s2">"fff6203a5b0a183c0ca0bd7793a6b8de7450d557f57ccb663ac9f136b0de3fc8acdb7cc4f52e8932b774924e0fc331410a314a12f6d4af874013a3c4dd958873"</span><span class="w">
        </span><span class="p">},</span><span class="w">
        </span><span class="nl">"uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"jsonl:.attestations/attestations.bundle.jsonl#1"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"digest"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
          </span><span class="nl">"sha256"</span><span class="p">:</span><span class="w"> </span><span class="s2">"d78b94aec61b5d8e1fcf1f4b3a486748d52d1de45072530f95908d5798e26c9a"</span><span class="p">,</span><span class="w">
          </span><span class="nl">"sha512"</span><span class="p">:</span><span class="w"> </span><span class="s2">"7003ca97a7519986d80737596a6da22dbefc4101e3082c67f647566f5a87670ebd7ecfb1cf6bf7c38d934122f0e57ef35a4d9dd93e29cc802e5fe76492db05c9"</span><span class="w">
        </span><span class="p">},</span><span class="w">
        </span><span class="nl">"uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"jsonl:.attestations/attestations.bundle.jsonl#3"</span><span class="w">
      </span><span class="p">}</span><span class="w">
    </span><span class="p">],</span><span class="w">
    </span><span class="nl">"policy"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
      </span><span class="nl">"digest"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
        </span><span class="nl">"sha256"</span><span class="p">:</span><span class="w"> </span><span class="s2">"175812c1dd152826cdd604aa14a35674c2f5073ef7a822cf8a2dde02026c03bd"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"sha512"</span><span class="p">:</span><span class="w"> </span><span class="s2">"195fcb1023068374c404bf679ce7697e80b45e7a8736d58bb64e89fea5d9f5afa8cfcbc4411a83acd6c18131e7198f717e045d7649388599700008272c12e342"</span><span class="w">
      </span><span class="p">}</span><span class="w">
    </span><span class="p">},</span><span class="w">
    </span><span class="nl">"resourceUri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://github.com/carabiner-dev/demo-slsa-e2e/releases/download/v0.1.8/fritoto-linux-amd64"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"slsaVersion"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1.1"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"timeVerified"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2025-10-10T01:14:42.461212072Z"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"verificationResult"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PASSED"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"verifiedLevels"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
      </span><span class="s2">"SLSA_BUILD_LEVEL_2"</span><span class="w">
    </span><span class="p">],</span><span class="w">
    </span><span class="nl">"verifier"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
      </span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://carabiner.dev/ampel@v1"</span><span class="w">
    </span><span class="p">}</span><span class="w">
  </span><span class="p">},</span><span class="w">
  </span><span class="nl">"_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://in-toto.io/Statement/v1"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"subject"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
    </span><span class="p">{</span><span class="w">
      </span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"fritoto-linux-amd64"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"bin/fritoto-linux-amd64"</span><span class="p">,</span><span class="w">
      </span><span class="nl">"digest"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
        </span><span class="nl">"sha256"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3e6d22582191fb4b22632907f3b24a22629325e32b6cd4fe9692a63938819983"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"sha512"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3f06fb85ff6aef9d2a86590ab83a8b9c14dacc85e29e4d273993b01426a752fc2fe0ead6c22dcaac1ed31ec50e9cbadea63b4e2daf3c58cfc63df398e343dc5e"</span><span class="w">
      </span><span class="p">}</span><span class="w">
    </span><span class="p">}</span><span class="w">
  </span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<p>Notice in the VSA the subject is the darwin/arm64 binary and how its
<code>SLSA_BUILD_LEVEL_2</code> level is recorded, but also the verified levels of its
dependencies. The important parts in this document are:</p>
<ul>
<li>The verifier (<a href="https://carabiner.dev/ampel@v1">https://carabiner.dev/ampel@v1</a>) that tells you what tool performed the verification</li>
<li>The subject (the fritoto-linux-amd64 binary)</li>
<li>The verification result (<code>PASSED</code>)</li>
<li>The verified levels of the binary (<code>SLSA_BUILD_LEVEL_2</code>)</li>
<li>The verified SLSA levels of the dependencies (<code>dependencyLevels</code>):
<ul>
<li>One <code>SLSA_BUILD_LEVEL_3</code> (the go container image)</li>
<li>One <code>SLSA_SOURCE_3</code> (the build point commit, protected with the SLSA source tools)</li>
</ul>
</li>
</ul>
<p>This VSA can be used to communicate to users all the verifications performed on
the binaries, they can act as guarantees that the released assets were built in
a secure environment.</p>
<h2 id="end-user-verification">End User Verification</h2>
<p>Now that the Fritoto project has produced VSAs for all its binaries, the project
users should be able to use them! Especially since Fritoto is a “security”
(wink wink) tool that runs in CI. So how can a user verify the executables?</p>
<p>To verify the Fritoto binaries, users only need the
<a href="https://github.com/carabiner-dev/ampel/releases/latest">latest release of AMPEL</a>
installed. AMPEL can check the binary directly or verify its hash (as published
on the project’s
<a href="https://github.com/carabiner-dev/demo-slsa-e2e/releases/latest">release page</a>).
The Fritoto team has published a
<a href="https://github.com/carabiner-dev/demo-slsa-e2e/blob/main/policies/check-artifacts.json">policy to verify the project’s binaries</a>.
You don’t need to download the policy or the attestations; AMPEL can fetch them
for you when it needs them using the releases collector driver:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># Download the binary from GitHub:</span>
curl <span class="nt">-LO</span> https://github.com/carabiner-dev/demo-slsa-e2e/releases/download/v0.1.8/fritoto-linux-amd64

<span class="c"># Verify it using the fritoto-check-artifacts policy which uses the VSA.</span>
ampel verify fritoto-linux-amd64 <span class="se">\</span>
      <span class="nt">--policy</span> <span class="s2">"git+https://github.com/carabiner-dev/demo-slsa-e2e#policies/fritoto-check-artifacts.json"</span> <span class="se">\</span>
      <span class="nt">--collector</span> release:carabiner-dev/demo-slsa-e2e@v0.1.8
</code></pre></div></div>
<p>The results in the terminal show the checks performed on the VSA with their
respective verification results:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>+--------------------------------------------------------------------------------------------------------------------+
| ⬤⬤⬤AMPEL: Evaluation Results                                                                                       |
+-------------------------+-------------------------+--------+-------------------------------------------------------+
| PolicySet               | fritoto-check-artifacts | Date   | 2025-10-09 19:25:06.805181588 <span class="nt">-0600</span> CST               |
+-------------------------+-------------------------+--------+-------------------------------------------------------+
| Status: ● PASS          | Subject                 | - sha256:884aa2480316522ff74cebf2eb2ca16d...                   |
+-------------------------+-------------------------+--------+-------------------------------------------------------+
| Policy                  | Controls                | Status | Details                                               |
+-------------------------+-------------------------+--------+-------------------------------------------------------+
| slsa-build-deps-level-3 | BUILD-LEVEL_3           | ● PASS | All verified dependencies are SLSA_BUILD_LEVEL_3+     |
| vsa-verify-verifier     | -                       | ● PASS | Attestation was issued by trusted verifier            |
| vsa-verify-resourceuri  | -                       | ● PASS | VSA verification of expected resource URI             |
| slsa-build-level-2      | BUILD-LEVEL_2           | ● PASS | VSA attesting a SLSA_BUILD_2+ compliance verification |
+-------------------------+-------------------------+--------+-------------------------------------------------------+

</code></pre></div></div>
<h3 id="checking-the-attestation-bundle">Checking the Attestation Bundle</h3>
<p>The Fritoto project releases a lot of security metadata along with its binaries. The attestations bundle contains 17
statements, if you want to see what is in there, you can use
<a href="https://github.com/carabiner-dev/bnd">bnd, the attestations multitool</a>:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bnd <span class="nb">read </span>release:carabiner-dev/demo-slsa-e2e@v0.1.8
</code></pre></div></div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>🔎  Query Results:
<span class="nt">-----------------</span>

Attestation <span class="c">#0</span>
✉️  Envelope Media Type: application/vnd.dev.sigstore.bundle.v0.3+json
🔏 Signer identity: sigstore::https://token.actions.githubusercontent.com::https://github.com/slsa-framework/source-actions/.github/workflows/compute_slsa_source.yml@refs/heads/main
📃 Attestation Details:
   Predicate Type: https://github.com/slsa-framework/slsa-source-poc/source-provenance/v1-draft
   Attestation Subjects:
   - gitCommit: cb5a32d292d1222e8d55a5d0d0585e2da0efe7a1


Attestation <span class="c">#1</span>
...
</code></pre></div></div>
<p>This command displays details of the release attestations: who signed them, their
subjects, and their type. Using bnd you can extract the attestations or view the
predicates or unpack them to single files.</p>
<p>Exploring the secure data should give you an idea of the kinds of policies that
can be written, and since all the tools used here are open source, you can use
them in your projects too! If you write something cool, consider contributing it to
<a href="https://github.com/carabiner-dev/policies">AMPEL’s community policies</a>
for others to reuse!</p>
<h2 id="conclusion">Conclusion</h2>
<p>This case study went through the basic steps of a secure build leveraging the SLSA
model:</p>
<ol>
<li>We checked the source code attestations</li>
<li>We checked the builder attestations</li>
<li>We performed checks on our project and attested the results.</li>
<li>We checked the results of 1-3 before triggering the build and produced a VSA of the verification.</li>
<li>We verified the resulting binaries before releasing them and produced VSAs to capture the verification results.</li>
<li>We published all the signed security metadata in a bundle along with the binaries.</li>
<li>Finally, showed how end users can check the binaries using the verification summaries. If they wish, they can also perform the complete verification themselves, as all the data and policies are open and available.</li>
</ol>
<p>The
<a href="https://github.com/carabiner-dev/demo-slsa-e2e">example project repository</a>
is open source, feel free to suggest improvements or fix any bugs,
just not the CVEs,please ;)</p>
<h2 id="resources">Resources</h2>
<p>This is a list of the tools used in the demo, most of them have GitHub actions
you can use, check the
<a href="https://github.com/carabiner-dev/demo-slsa-e2e/blob/main/.github/workflows/release.yaml">Fritoto release workflow</a>
for examples.</p>
<p>Fritoto, the SLSA e2e demo:<br>
<a href="https://github.com/carabiner-dev/demo-slsa-e2e">https://github.com/carabiner-dev/demo-slsa-e2e</a></p>
<p>🔴🟡🟢 AMPEL, The Amazing Multipurpose Policy Engine (and L)<br>
<a href="https://github.com/carabiner-dev/ampel">https://github.com/carabiner-dev/ampel</a></p>
<p>🥨 bnd, the attestation multitool<br>
<a href="https://github.com/carabiner-dev/bnd">https://github.com/carabiner-dev/bnd</a></p>
<p>sourcetool, SLSA Source’s CLI to secure your git history<br>
<a href="https://github.com/slsa-framework/source-tool">https://github.com/slsa-framework/source-tool</a></p>
<p>Tejolote, The kubernetes SLSA Build Attestter<br>
<a href="https://github.com/kubernetes-sigs/tejolote">https://github.com/kubernetes-sigs/tejolote</a></p>
<p>OSV Scanner, Vulnerability scanner leveraging OSV data<br>
<a href="https://github.com/google/osv-scanner">https://github.com/google/osv-scanner</a></p>
<p>Vexctl, OpenVEX’s tool to manage vex documents<br>
<a href="https://github.com/openvex/vexctl">https://github.com/openvex/vexctl</a></p>
<p>Beaker, Test run attester<br>
<a href="https://github.com/carabiner-dev/beaker">https://github.com/carabiner-dev/beaker</a></p>
<p>Unpack, experimental dependency extractor<br>
<a href="https://github.com/carabiner-dev/unpack">https://github.com/carabiner-dev/unpack</a></p>]]></content><author><name>Adolfo García Veytia (puerco)</name></author><summary type="html"><![CDATA[This guest post walks through a practical, end-to-end SLSA implementation using 🔴🟡🟢 AMPEL — the Amazing Multipurpose Policy Engine (and L) — along with other tools in the supply chain security ecosystem. You’ll see how each step in a project’s build can be protected through attested data, using VSA receipts to capture and verify each step integrity along the way.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">SLSA End-to-End: Request for examples</title><link href="/blog/2025/07/slsa-e2e" rel="alternate" type="text/html" title="SLSA End-to-End: Request for examples" /><published>2025-07-22T00:00:00+00:00</published><updated>2025-07-22T00:00:00+00:00</updated><id>/blog/2025/07/slsa-e2e</id><content type="html" xml:base="/blog/2025/07/slsa-e2e"><![CDATA[<p>This is a request for examples (RFE) for an end-to-end
implementation of the Supply-chain Levels for Software Artifacts
(<a href="slsa.dev">SLSA</a>) framework. The goal is to create a comprehensive
demonstration of how SLSA can be used to secure the software supply chain, from
source code to end-user consumption. These implementations will serve as a
reference for the community, showcasing best practices and providing a clear
adoption path for organizations looking to improve their software supply chain
security.</p>
<p>We’re looking for examples in the form of blog posts that document the entire
end-to-end story with working implementations that people can try for
themselves.</p>
<h2 id="timeline">Timeline</h2>
<p>There’s no specific deadline, but a reasonable goal would be to have example
implementations published by September 30th, 2025.</p>
<h2 id="stages">Stages</h2>
<p>For the purposes of the end-to-end story we’ve broken the SDLC into 5 stages
which we’d expect an end-to-end implementation to cover: Source, Build,
Verification, Publication, and Use.</p>
<h3 id="source">Source</h3>
<p>The source stage covers applying SLSA requirements to source code management leveraging the
SLSA Source Track
<a href="/spec/v1.2-rc1/tracks##source-track">proposed in SLSA 1.2 RC1</a>.</p>
<p>Implementations should:</p>
<ul>
<li><strong>Protect a source repo with the SLSA Source Track:</strong> Implement SLSA Source
Level 3 for source control, including measures like branch protection,
mandatory code review, and protection against tampering with the source code
history. Use existing implementations if desired.
<ul>
<li><strong>Record Source Provenance:</strong> Generate and store SLSA source provenance
attestations for all source code, capturing information about the author,
committer, and the specific commit hash.</li>
<li><strong>Issue Source VSA:</strong> Generate a Verification Summary Attestation (VSA) for the
source code, which cryptographically guarantees the integrity and provenance
of the code.</li>
</ul>
</li>
</ul>
<p style="text-align: right">
Potential tools: <a href="https://github.com/slsa-framework/slsa-source-poc">slsa-source-poc</a>, <a href="https://gittuf.dev">gittuf</a></p>
<h3 id="build">Build</h3>
<p>The build stage covers applying SLSA requirements to the way software is
built and how the dependencies used in a build are managed. It leverages the
<a href="/spec/v1.1/">SLSA Build track</a>, and the draft
<a href="/spec/draft/#build-environment-track">Build Environment</a> and
<a href="/spec/draft/#dependency-track">Dependency</a> tracks.</p>
<p>Implementations should:</p>
<ul>
<li><strong>Generate Build Provenance:</strong> Generate SLSA build Level 3-compliant build
provenance, which includes information about the build environment, the
specific build steps, and the inputs and outputs of the build process.</li>
<li><strong>Generate Build Environment attestations</strong>: (Optional) Generate SLSA BuildEnv
L2-compliant BuildEnv attestations, which includes integrity information about
the build environment at the start of the build. If trusted hardware is available,
additionally generate L3-compliant BuildEnv attestations.</li>
<li><strong>Generate an SBOM:</strong> (Optional) Generate a Software Bill of Materials (SBOM)
in a standard format (e.g., SPDX, CycloneDX) that lists all the components and
dependencies of the built artifact.</li>
<li><strong>Generate additional attestations:</strong> (Optional) Generate any additional
attestations to capture evidence of steps that occur during the
build stage that will be verified during the verification stage.</li>
<li><strong>Collect VSAs for all dependencies (source and binary) (as listed in resolvedDependencies):</strong> For each dependency,
retrieve and store its VSA to verify its origin and integrity.
<ul>
<li><strong>Optionally (additionally) verify VSA during build and fail build if
absent/doesn’t meet requirements:</strong> Implement a build-time check to
verify the validity of each dependency’s VSA (<a href="/spec/v1.2-rc1/verifying-source#how-to-verify-slsa-a-source-revision">source</a>, <a href="/spec/v1.1/verification_summary#how-to-verify">other</a>)
and fail the dependency does not meet the defined security policy.</li>
</ul>
</li>
<li><strong>Scan for vulns:</strong> (Optional) Integrate a vulnerability scanner into the
build process to identify known vulnerabilities in the code and its
dependencies and generate evidence of that scan.
<ul>
<li><strong>Check for triage:</strong> Implement a process for triaging identified
vulnerabilities, allowing for the suppression of false positives and the
tracking of remediation efforts. Generate evidence that triage occurred.</li>
</ul>
</li>
</ul>
<p style="text-align: right">
Potential tools: <a href="https://github.com/actions/attest-build-provenance">GitHub provenance generation</a>, <a href="https://github.com/slsa-framework/slsa-github-generator">SLSA GitHub Generator</a>, <a href="https://konflux-ci.dev">Konflux</a>, <a href="https://cloud.google.com/build/docs/securing-builds/generate-validate-build-provenance">Google Cloud Build</a>, <a href="https://github.com/google/osv-scanner">osv scanner</a> (vuln scanning), <a href="https://github.com/carabiner-dev/vexflow">vexflow</a>, <a href="https://hermetoproject.github.io/hermeto">hermeto</a></p>
<h3 id="verification">Verification</h3>
<p>The verification stage covers the point at which a built software artifact is
<a href="/spec/draft/verifying-artifacts">verified against expectations</a>.
This will go beyond the basics identified in verifying build artifacts and
include verifying Source, Build Environment, and Dependency information.</p>
<p>Implementations should:</p>
<ul>
<li><strong>Allow software producers to define expectations used during verification
(i.e. a policy):</strong> Provide a mechanism for software producers to define a
security policy that specifies the requirements for a successful verification.</li>
<li><strong>Verification:</strong> Implement a verification process that checks the following:
<ul>
<li><strong>Check build provenance:</strong>
<ul>
<li><strong>Comes from the expected builder:</strong> Verify that the build was performed
by a trusted and authorized builder.</li>
</ul>
</li>
<li><strong>Build was run in the expected build environment (optional):</strong> Verify that
the build ran in a good known build environment as advertised by the trusted
builder.
<ul>
<li><strong>From the expected build entrypoint:</strong> Verify that the build was
initiated from the correct and expected entry point.</li>
<li><strong>Each source dependency has:</strong></li>
<li><strong>A valid source VSA:</strong> Verify the integrity and provenance of each
source dependency by
<a href="/spec/v1.2-rc1/verifying-source#how-to-verify-slsa-a-source-revision">checking its VSA</a>.</li>
<li><strong>(optionally) has a desired source level:</strong> Verify that each source
dependency meets the minimum SLSA source level defined in the security
policy.</li>
</ul>
</li>
<li><strong>Check SBOM:</strong> Check that an SBOM from the expected tooling exists.</li>
<li><strong>Check vulnerability attestation and triage:</strong> Verify that all identified
vulnerabilities have been triaged and that the remediation status is
acceptable according to the security policy.</li>
<li><strong>Check any additional policy rules (optional):</strong> Verify that the
package meets any additional rules as dictated by the policy using
the provided attestations as evidence.</li>
</ul>
</li>
<li><strong>Issue VSA including:</strong>
<ul>
<li><strong>SLSA Build Level:</strong> The VSA should include the SLSA build level that the
artifact has achieved.</li>
<li><strong>SLSA BuildEnv level:</strong> The VSA should include the SLSA BuildEnv level
that artifact has achieved.</li>
<li><strong>Minimum SLSA Source Level of all sources:</strong> The VSA should include the
minimum SLSA source level of all the source code used in the build. This can
optionally include any dependencies if they are built from source.</li>
<li><strong>SLSA dependency level:</strong> The VSA should include the SLSA dependency level,
which reflects the security posture of the dependencies.</li>
</ul>
</li>
</ul>
<p style="text-align: right">
Potential tools: <a href="https://github.com/carabiner-dev/ampel">Ampel</a>, <a href="https://conforma.dev">Conforma</a>, <a href="https://github.com/slsa-framework/slsa-verifier">slsa-verifier</a></p>
<h3 id="publication">Publication</h3>
<p>The publication stage covers the point at which a software artifact is made
available to consumers.</p>
<p>Implementations should ensure that:</p>
<ul>
<li><strong>A valid VSA for the published artifact exists</strong>
<ul>
<li>Implement a mechanism to prevent the publication of artifacts that do not
have a valid VSA.</li>
</ul>
</li>
<li><strong>Consumers can fetch VSAs for published artifacts</strong>
<ul>
<li>Provide a mechanism for consumers to easily fetch the VSA for any published
artifact.</li>
</ul>
</li>
</ul>
<h3 id="use">Use</h3>
<p>The use stage covers the point at which a consumer is going to use the artifact.</p>
<p>Implementations should:</p>
<ul>
<li><strong>Fetch the artifact &amp; VSA:</strong> Provide tooling that allows consumers to
download both the artifact and its corresponding VSA.</li>
<li><strong>Verify the VSA:</strong> The tooling should automatically verify the VSA against
the artifact to ensure its integrity and authenticity following
<a href="/spec/v1.1/verification_summary#how-to-verify">the SLSA guidance</a>.</li>
<li><strong>Fail if VSA fails verification:</strong> The tooling should fail and alert the user
if the VSA does not pass the verification process, preventing the use of a
potentially compromised artifact.</li>
</ul>
<p style="text-align: right">
Potential tools: <a href="https://github.com/carabiner-dev/drop">Drop</a>, <a href="https://github.com/slsa-framework/slsa-verifier">slsa-verifier</a></p>
<h2 id="extras">Extras</h2>
<p>Some implementations may wish to go above and beyond what’s been requested.</p>
<p>That may include:</p>
<ul>
<li><strong>Advanced policy enforcement</strong>: providing a more nuanced ability to set
policy for advanced users.</li>
<li><strong>Integration with other security tools</strong></li>
<li><strong>Support for additional attestation formats</strong></li>
<li><strong>Support for attestations from different producers:</strong> The implementation may
be able to consume and verify attestations from different producers, such as
different builders, source control systems, and SBOM generators.</li>
</ul>
<h2 id="submission">Submission</h2>
<p>Submissions should document:</p>
<ul>
<li><strong>How they work:</strong> Explains the end-to-end workflow of the implementation.</li>
<li><strong>How they leverage existing standards:</strong> Note which standards or existing
projects are used in the submission.</li>
<li><strong>How can a user adopt this workflow themselves:</strong> A step-by-step guide that
allows users to set up and use the implementation in their own environment.
This can link to existing documentation of any technology used.</li>
<li><strong>The policy management process for the software producer:</strong> A document that
explains how to create, manage, and enforce security policies.</li>
<li><strong>Gaps and future areas of improvement:</strong> A document that identifies the
current limitations of the implementation and suggests areas for future
improvement.</li>
<li><strong>A working example:</strong> A complete, working example of the implementation.</li>
</ul>
<p>To submit your example end-to-end implementations please either send a PR
creating the blog post yourself
(<a href="https://github.com/slsa-framework/slsa/pull/1435">example</a>) or
<a href="https://github.com/slsa-framework/slsa/issues">create an issue</a> with the title
“SLSA e2e: …”. If your example is too large for either of these formats,
you may put the remaining walkthrough content in an external resource
(i.e. a git repository) and link to it.</p>
<p>If you have any questions, or would like any feedback on your proposal, please
reach out in <a href="https://slack.openssf.org/">Slack</a> or by
<a href="https://github.com/slsa-framework/slsa/issues">creating an issue</a>.</p>]]></content><author><name>Andrew McNamara, Tom Hennen</name></author><summary type="html"><![CDATA[This is a request for examples (RFE) for an end-to-end implementation of the Supply-chain Levels for Software Artifacts (SLSA) framework. The goal is to create a comprehensive demonstration of how SLSA can be used to secure the software supply chain, from source code to end-user consumption. These implementations will serve as a reference for the community, showcasing best practices and providing a clear adoption path for organizations looking to improve their software supply chain security.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Announcing SLSA v1.2 Release Candidate 1</title><link href="/blog/2025/06/slsa-v1.2-rc1" rel="alternate" type="text/html" title="Announcing SLSA v1.2 Release Candidate 1" /><published>2025-06-20T00:00:00+00:00</published><updated>2025-06-20T00:00:00+00:00</updated><id>/blog/2025/06/slsa-v1.2-rc1</id><content type="html" xml:base="/blog/2025/06/slsa-v1.2-rc1"><![CDATA[<p>Today we’re releasing for public review <a href="/spec/v1.2-rc1/">SLSA Version 1.2
RC1</a>, a Release Candidate of SLSA v1.2. We are seeking
comments on this specification by July 18th, 2025.</p>
<p>With the introduction of the <em>Source Track</em>, SLSA v1.2 represents a major
milestone in the development of SLSA. Indeed, while SLSA v1.0 introduced
the notion of tracks with different levels focusing on different aspects of
the software supply chain, its scope was limited to the <em>Build Track</em>, a
narrower scope than what SLSA v0.1 covered. The <em>Source Track</em> picks up the
source management related requirements that v0.1 touched on but in a much
more complete and thorough way, comparable to what was done in the <em>Build
Track</em>.</p>
<p>Please, refer to the <a href="/spec/v1.2-rc1/whats-new">What’s new</a> section for
further details.</p>
<p>SLSA v1.2 is backwards compatible with SLSA v1.1.</p>
<p>The SLSA specification follows the <a href="https://github.com/CommunitySpecification/Community_Specification/blob/main/">Community Specification</a> lifecycle
going through several <a href="/spec-stages">stages of maturation</a>. The publication
of a candidate for <a href="/spec-stages#approved">Approved Specification</a> starts a 2 week review period
during which the community at large is invited to review the draft and
raise any issues. If you do find any issue, please, open an issue on
<a href="https://github.com/slsa-framework/slsa/issues">GitHub</a>. If no major issues are found during this review period the v1.2
RC1 draft will then be published as Version 1.2, the new <a href="/spec-stages#approved">Approved
Specification</a>, effectively replacing Version 1.1. Otherwise a v1.2 RC2
will be published instead.</p>]]></content><author><name>SLSA Community</name></author><summary type="html"><![CDATA[Today we’re releasing for public review SLSA Version 1.2 RC1, a Release Candidate of SLSA v1.2. We are seeking comments on this specification by July 18th, 2025.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Source Track Sprint Recap</title><link href="/blog/2025/04/slsa-source-sprint" rel="alternate" type="text/html" title="Source Track Sprint Recap" /><published>2025-04-29T00:00:00+00:00</published><updated>2025-04-29T00:00:00+00:00</updated><id>/blog/2025/04/slsa-source-sprint</id><content type="html" xml:base="/blog/2025/04/slsa-source-sprint"><![CDATA[<p>Last week the three of us met to try to make more progress on the source track.  Async collaboration can work well for some things, but on “squishier” topics a higher-bandwidth engagement can be really helpful.  All our work was against the draft version of the spec and before anything becomes official it will go through <a href="https://github.com/slsa-framework/governance/blob/main/5._Governance.md#4-specification-development-process">the approval process</a>.  We’d love your feedback on what we accomplished and discussed (summarized below), so please <a href="/community#:~:text=welcome%20your%20contributions.-,How%20to%20contribute,-For%20questions%2C%20suggestions">let us know</a> what you think!</p>
<p>The biggest changes made or proposed include:</p>
<ul>
<li>Adding a <a href="/spec/draft/source-requirements#:~:text=%E2%9C%93-,Tag%20Hygiene,-If%20the%20SCS">‘Tag Hygiene’ requirement</a> that requires tags that get used externally to be immutable. (<a href="https://github.com/slsa-framework/slsa/issues/1296">issue</a>)
<ul>
<li>We discussed, but did not yet include, having a requirement that these tags also must come from protected branches. (<a href="https://github.com/slsa-framework/slsa/issues/1353">issue</a>)</li>
</ul>
</li>
<li>Adding <a href="https://github.com/slsa-framework/slsa/pull/1350">Level 4 - Two-Party Review</a> which will require branches at this level to require two people to approve of changes.</li>
<li>Clarification of the <a href="/spec/draft/source-requirements#source-control-system:~:text=Enforced%20change%20management%20process">Enforced Change Management Process</a>
<ul>
<li>This is meant to allow organizations to enforce <em>their own</em> requirements on what changes can be merged into protected branches.</li>
</ul>
</li>
</ul>
<p>You can find <a href="https://github.com/slsa-framework/slsa/pulls?q=is%3Apr+label%3Asource-track+updated%3A2025-04-24+updated%3A2025-04-23+updated%3A2025-04-25+">all the changes merged and proposed during the sprint here</a>.</p>
<h2 id="source-poc">Source PoC</h2>
<p>As a part of our process we reviewed how the SLSA Source PoC claims to <a href="https://github.com/slsa-framework/slsa-source-poc/blob/main/REQUIREMENTS_MAPPING.md">meet the requirements</a> (<a href="https://github.com/slsa-framework/slsa-source-poc/blob/main/DESIGN.md">design</a>) to see if we agree on the approach (this helps make sure we’re all thinking the same thing about the requirements!) and if we can find any gaps in what it’s doing.  The verdict was quite positive!  It seems like a reasonable model that can allow implementation of the SLSA Source Track for GitHub users and will hopefully serve as a model that users of <em>other</em> source control platforms can use to implement their own Source Track compliant SCS (with or without the help of the platform they rely on).  There are some limitations from this approach and it does make some things more difficult.  So it may also result in some feature requests for source platforms that could make controls even stronger. (<a href="https://github.com/slsa-framework/slsa-source-poc/issues/138">issue</a>)</p>
<p>Of course the Source PoC isn’t done yet and the design and implementation will need some updates to match the changes made this week, and whatever the spec winds up being when approved.  It also needs some TLC before it’s <em>safe</em> and <em>easy</em> to use.  <a href="https://github.com/ossf/tac/issues/474">This approved proposal</a> for funding from the OpenSSF TAC will help there.</p>
<h2 id="why-two-party-review">Why two-party review?</h2>
<p>Two-party review is a controversial topic within the SLSA community and as a result was deferred due to an inability to get agreement on if it should be included.  We’re taking another shot at it now because the recently revamped <a href="/threats">slsa.dev/threats</a> page makes it clear that two-party review is the strongest control we have against many of the threats listed for <a href="/spec/v1.1/threats#:~:text=(B)%20Modifying%20the%20source,-An%20adversary%20without">threat B - Modifying the source</a>.</p>
<p>As noted by some, this is one of the first controls enterprises enable while also being a control that can be very difficult for small projects to enable. To account for this we are making this the highest source level as 1-3 are much more easily attained by single-maintainer projects. Those projects can advance as far as possible without adopting two-party review.</p>
<p>To further reduce the burden of this requirement we suggest that reviews cover ‘security relevant properties’ to allow reviewers to focus on the most pressing aspects of code-review and avoid the perception that these reviews require discussion of ‘trivial’ issues such as variable names. Of course, organizations may still set a higher bar for review if they wish.</p>
<h2 id="next-steps">Next steps</h2>
<p>We discussed some other changes but didn’t get time to include them.</p>
<h3 id="slsa-properties-that-are-independent-of-level">SLSA ‘properties’ that are independent of level</h3>
<p>There are some security-relevant properties that don’t neatly fit into a level, that affect <em>multiple</em> levels, or that producers might like to claim in a different order (e.g. a producer might want to attest that they conduct TWO_PARTY_REVIEW before they can claim they use a Source Control System that meets all the requirements of Source Level 3).<br />
SLSA “Properties” would be a mechanism for enforcing and communicating these claims that is independent of any implementation.  (<a href="https://github.com/slsa-framework/slsa/issues/1355">issue</a>)</p>
<h3 id="defining-how-to-verify-source">Defining how to verify source</h3>
<p>With the release of the Source Track, we will establish clear guidelines for how SCS can issue tamper-resistant claims about revisions.
We need to add better documentation on how consumers should verify those claims. How can a consumer verify a revision is the SLSA level they expect?  How can they verify that the revision came from the repo/branch/tag they expect? How can they verify that the policy is still what they want? How can they verify that the policy continuity is still intact?</p>
<p>We also need to document how the Source track and the Build track fit together.  Most users consume source indirectly in the form of artifacts built from that source.  (<a href="https://github.com/slsa-framework/slsa/issues/1356">issue</a>)</p>
<h3 id="get-ready-for-release">Get ready for release</h3>
<p>We’d like to get the source track released (or at least in a release-candidate) in June ahead of <a href="https://events.linuxfoundation.org/open-source-summit-north-america/">OSS NA</a>.  To do that we’ll need to evaluate open issues and address them as needed, comb through the spec to make sure the language is right and all the links work.  Most importantly we’ll need to get and address feedback from the community.  We made a lot of progress, but there’s still a lot to do!</p>]]></content><author><name>Andrew McNamara (Red Hat), Tom Hennen (Google), Zachariah Cox (GitHub)</name></author><summary type="html"><![CDATA[Last week the three of us met to try to make more progress on the source track. Async collaboration can work well for some things, but on “squishier” topics a higher-bandwidth engagement can be really helpful. All our work was against the draft version of the spec and before anything becomes official it will go through the approval process. We’d love your feedback on what we accomplished and discussed (summarized below), so please let us know what you think!]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">SLSA v1.1 is now Approved!</title><link href="/blog/2025/04/slsa-v1.1" rel="alternate" type="text/html" title="SLSA v1.1 is now Approved!" /><published>2025-04-21T00:00:00+00:00</published><updated>2025-04-21T00:00:00+00:00</updated><id>/blog/2025/04/slsa-v1.1</id><content type="html" xml:base="/blog/2025/04/slsa-v1.1"><![CDATA[<p>Today we’re releasing <a href="/spec/v1.1/">SLSA Version 1.1</a> as the latest
<a href="/spec-stages#approved">Approved Specification</a> of SLSA, effectively replacing Version 1.0.</p>
<p>Following the <a href="https://github.com/CommunitySpecification/Community_Specification/blob/main/">Community Specification</a> lifecycle, the <a href="/spec/v1.1-rc2/">SLSA v1.1 Release
Candidate 2</a> specification went through a 2-week review
period during which no major issues were raised. As a result, <a href="/spec/v1.1/">SLSA
v1.1</a> is now being published as an <a href="/spec-stages#approved">Approved Specification</a>.</p>
<p>This release brings several changes aimed at enhancing the clarity and
usability of the v1.0 specification. It also introduces
backwards-compatible clarifications to the SLSA threat model, attestation
model and verification procedure. This includes the addition of verifier
metadata to the Verification Summary Attestation (VSA) format. Please,
refer to the <a href="/spec/v1.1/whats-new">What’s new</a> section for further
details.</p>
<p>SLSA 1.1 is backwards compatible with SLSA 1.0.</p>
<p>So what’s next? The SLSA specification group has been busy developing
several new tracks covering critical areas of the software supply chain. Read more about them here in the <a href="/spec/v1.1/future-directions">future directions</a> section. Come <a href="/community">join the group</a> and contribute to the next version of SLSA!</p>]]></content><author><name>SLSA Community</name></author><summary type="html"><![CDATA[Today we’re releasing SLSA Version 1.1 as the latest Approved Specification of SLSA, effectively replacing Version 1.0.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Announcing SLSA v1.1 Release Candidate 2</title><link href="/blog/2025/04/slsa-v1.1-rc2" rel="alternate" type="text/html" title="Announcing SLSA v1.1 Release Candidate 2" /><published>2025-04-04T00:00:00+00:00</published><updated>2025-04-04T00:00:00+00:00</updated><id>/blog/2025/04/slsa-v1.1-rc2</id><content type="html" xml:base="/blog/2025/04/slsa-v1.1-rc2"><![CDATA[<p>Today we’re releasing the <a href="/spec/v1.1-rc2/">SLSA Version 1.1 RC2</a> for
public review. We are seeking comments on these spec changes by April
18, 2025. This release brings several changes aimed at enhancing the
clarity and usability of the original specification. It also introduces
backwards-compatible clarifications to the SLSA threat model, attestation
model and verification procedure. This includes the addition of verifier
metadata to the Verification Summary Attestation (VSA) format. Please,
refer to the <a href="/spec/v1.1-rc2/whats-new">What’s new</a> section for further
details.</p>
<p>What does this update mean for SLSA implementors? Good news! This means
that SLSA 1.1 is backwards compatible with SLSA 1.0.</p>
<p>Although this is a relatively minor update, the SLSA specification group
has also been busy developing several new tracks covering areas such as
source and build environment. We had originally hoped to release these 1.1
improvements as part of larger update but in the end we felt that the 1.1
release was warranted.</p>
<p>So what’s next? The SLSA specification follows the <a href="https://github.com/CommunitySpecification/Community_Specification/blob/main/">Community Specification</a>
lifecycle going through several <a href="/spec-stages">stages of maturation</a>. The
publication of a candidate for <a href="/spec-stages#approved">Approved Specification</a> starts a 2 week
review period during which the community at large is invited to review the
draft and raise any issues. If you do find any issue, please, open an issue
on <a href="https://github.com/slsa-framework/slsa/issues">GitHub</a>. If no major issues are found during this review period the
V1.1 RC2 draft will then be published as Version 1.1, the new
<a href="/spec-stages#approved">Approved Specification</a>, effectively replacing Version 1.0.</p>]]></content><author><name>SLSA Community</name></author><summary type="html"><![CDATA[Today we’re releasing the SLSA Version 1.1 RC2 for public review. We are seeking comments on these spec changes by April 18, 2025. This release brings several changes aimed at enhancing the clarity and usability of the original specification. It also introduces backwards-compatible clarifications to the SLSA threat model, attestation model and verification procedure. This includes the addition of verifier metadata to the Verification Summary Attestation (VSA) format. Please, refer to the What’s new section for further details.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Defender’s Perspective: Dependency Confusion and Typosquatting Attacks</title><link href="/blog/2024/08/dep-confusion-and-typosquatting" rel="alternate" type="text/html" title="Defender’s Perspective: Dependency Confusion and Typosquatting Attacks" /><published>2024-08-13T00:00:00+00:00</published><updated>2024-08-13T00:00:00+00:00</updated><id>/blog/2024/08/dep-confusion-and-typosquatting</id><content type="html" xml:base="/blog/2024/08/dep-confusion-and-typosquatting"><![CDATA[<p><em>Dependency confusion</em> and <em>typosquatting</em> attacks are very similar in their nature. They both exploit the weakness in the way many package managers identify packages using only their names. Successfully exploiting this weakness enables the attacker to run arbitrary code at install time or at application’s run time. These attacks are scalable, portable, and extremely cost-effective to carry out—making them very appealing to malicious actors.</p>
<p>This blog post explores the attacks from the defender’s perspective and highlights how SLSA can be used to help defend against them. It also describes some additional capabilities which might be required to mitigate this and other supply chain risks more robustly.</p>
<h2 id="what-is-dependency-confusion">What is Dependency Confusion?</h2>
<p>The convenience of package registries has been recognized by developers and organizations worldwide as an effective way to manage and distribute internally developed software packages using existing tooling. One common approach involves running an internal, private instance of a package registry to distribute internal dependencies and configuring <strong><em>all</em></strong> build processes to first look for a package in the private registry and only if it is not found there going to the public instance of the package registry to fetch it<sup class="footnote-ref"><a href="#fn1" id="fnref1">1</a></sup>.</p>
<p>This works but is fragile. If someone in the organization attempts to build software that uses internal packages but doesn’t correctly configure the build to use the private registry instance first then the package installer will attempt to fetch internal packages from the public registry instance. Under normal circumstances this will return an error, as the internal package name would not be present in the public instance.</p>
<h3 id="the-attack">The Attack</h3>
<p>The attacker begins by performing reconnaissance to acquire names of internal packages. This can be done using a number of techniques, e.g., trawling through organization’s open source repositories, inspecting shipped software or simply guessing the names. Once the attacker has the names of internal packages, they register these targeted packages with the public registry and release a new version with a malicious payload. At this point the attacker has to wait for one of the misconfigured builds to run and use the attacker’s package — resulting in compromise. Effective use of this technique is described in detail in blog posts such as <a href="https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610">Dependency Confusion: How I Hacked Into Apple, Microsoft and Dozens of Other Companies</a>.</p>
<h2 id="what-is-typosquatting">What is Typosquatting?</h2>
<p>The workflow for developers to add a new dependency to a software project commonly involves modification of a manifest file to list the new package by its name and version. The package name is usually manually typed in, copied/pasted from the web, or added by the IDE. Most of the input modes that involve humans are prone to transcription errors and typos, ranging from missing hyphens, lookalike characters, to transposed letters. Under normal circumstances the build would fail if a non-existent dependency is requested.</p>
<h3 id="the-attack-1">The Attack</h3>
<p>The attacker pre-registers (or “squats”) a large number of package names with commonly seen typos in them—usually using popular package names as the starting point—and waits for victims to install their packages. The attack is opportunistic since, unlike dependency confusion, it doesn’t target a specific organization. Notably, however, unlike dependency confusion, this attack has the potential to result in a more severe and hard to detect compromise. Public availability of packages that attackers target for squatting enables them to distribute original copies of the targeted packages and only deliver malicious payload at a later date by releasing an update. This attack vector can result in applications incorporating and using the attacker’s package in production.</p>
<p>There are a number of potential vectors that attackers can use as the source of names to squat on to increase the chances of success, e.g. package names popular in other ecosystems, variants of the package name used by Linux distributions or OSS package names “hallucinated” by LLMs.</p>
<h2 id="mitigations">Mitigations</h2>
<p>The fragility of just using package names as the way to identify software packages is hopefully obvious by now. Let’s first explore common recommendations(<a href="https://fossa.com/blog/dependency-confusion-understanding-preventing-attacks/">1</a>, <a href="https://www.activestate.com/blog/how-to-prevent-dependency-confusion/">2</a>). to mitigate <em>dependency confusion</em> attacks and their limitations:</p>
<ul>
<li><strong>Namespacing:</strong> Some package registries support namespacing, sometimes called scoping or organization support. This feature enables organizations to claim a namespace in the public registry for their internal dependencies. This prevents attackers from registering internal names, as they are not authorized to publish to the organization’s namespace. Confidentiality concerns would likely prevent large organizations, that are usually targeted by the dependency confusion attacks, from hosting internal dependencies in the public instance; claiming the namespace is, however, sufficient to prevent attackers from exploiting dependency confusion. Namespacing is not supported by all package registries, and moreover the solution is not very robust as trust is placed into another forgeable identifier outside of the organization’s control.</li>
<li><strong>Registering internal names in the public registry:</strong> a common practical workaround for registries that lack namespacing support is for organizations to do what the attackers do and claim internal package names in the public registry instance to prevent attackers from doing so. This recommendation doesn’t address the root cause of dependency confusion attacks and requires ongoing coordination and synchronization of the names between public and private registries, which is fragile.</li>
<li><strong>Pinning or hash validation:</strong> some client-side tooling supports pinning or locking of dependencies by hash. Both internal and external dependencies will be listed in the lockfile. Effectively preventing a dependency confusion attack using lockfiles requires all updates to the lock file to ensure that hashes for internal packages match the list of authorized hashes for that package. Not all ecosystems universally support pinning with lockfiles, and even those that do may lack the functionality to manage and distinguish between internal and external dependencies.</li>
</ul>
<p>In case of <em>typosquatting</em> attacks the mitigation is not very straightforward and for the most part requires intervention at the point when developers are adding a new dependency. Effective mitigation could involve presenting the developer with metadata about the package being added (e.g. number of dependents, downloads) and prompting them to verify and ensure that the package being installed is the one that developer intended. This unscalable approach is prone to human errors, which can happen for reasons ranging from time pressure and fatigue to the lack of security expertise and simple misreading of key parts of metadata.</p>
<h3 id="slsa">SLSA</h3>
<p>Now let’s look at how SLSA’s <strong>existing</strong> controls can can be used to prevent each of the attacks.</p>
<h4 id="dependency-confusion">Dependency Confusion</h4>
<p>A much more robust way to address dependency confusion is to use SLSA. SLSA build provenance contains metadata about an artifact, which includes the URL of the source repository and identifies the build system that produced the artifact. This metadata enables secure binding of the package name and version to the canonical source repository and its build system, which is referred to as <a href="/spec/v1.0/verifying-artifacts#forming-expectations">expectations forming</a> in SLSA.</p>
<p>Let’s examine how SLSA build provenance prevents successful dependency confusion exploitation:</p>
<ol>
<li>Organization defines a policy for its internal packages by binding each package to the authorized builder and the expected canonical source repository.</li>
<li>Organization’s internal packages are built with a SLSA-compliant build system, which produces SLSA build provenance.</li>
<li>SLSA build provenance is <a href="/spec/v1.0/distributing-provenance">distributed along with the artifact</a>, e.g. by the internal registry instance.</li>
<li>Upon installation of the internal packages their build provenance is verified aginst the policy defined earlier. The verification ensures that the internal packages were built by the authorized build system using source code from the canonical source repository.</li>
</ol>
<p>Attackers are unable to forge SLSA Level 2+ build provenance thus all dependency confusion attempts will be immediately detected due to a different canonical source repository or builder ID. Native support for SLSA build provenance and its verification in ecosystems like npm will enable this robust form of protection against dependency confusion attacks.</p>
<h4 id="typosquatting">Typosquatting</h4>
<p>Dealing with typosquatting attacks is trickier because at the time of the attack the developer is adding a new dependency, potentially interacting with it for the first time. Trust on first use (TOFU) is a common approach to bootstrapping trust and <a href="/spec/v1.0/verifying-artifacts#forming-expectations">forming expectations</a>, however, since it’s impossible to know the developer’s intent, all tooling can do is present them with the metadata about the package they are adding. Unfortunately that metadata could be for the attacker’s impostor package.</p>
<p>Effective mitigation of typosquatting attacks requires ongoing integration of heuristics to proactively flag packages that appear like typosquatting attempts into all workflows that add new dependencies. Heuristics could range from evaluation over static data (e.g. package age) to ones requiring more time and resources (e.g. graph resolution or dynamic analysis). Managed ingestion, described below, is one very efficient and effective way to deploy such protections across larger enterprises.</p>
<h3 id="managed-ingestion">Managed Ingestion</h3>
<p>Effective OSS supply chain security risk management hinges on an organization’s ability to control what OSS can be used in an organization’s products. This concept is not new, as it mirrors the approach taken in food supply chain management, where control over the ingredients included in food products is paramount. The concept is also reflected in <a href="https://github.com/ossf/s2c2f">OpenSSF’s s2c2f framework</a>, which highlights control over ingestion in organizations as a crucial first step towards securing their software supply chains.</p>
<p>For a typical build process this means control over resolution of the OSS dependency graph and retrieval of the resolved dependencies from the Internet. Historically both processes lacked explicit control and transparency leading to a significant level of trust being placed in package managers and their associated registries.</p>
<p>Managed ingestion describes a dedicated deliberate process that happens separately from the build and involves an organization importing and assessing OSS packages before making them available to developers internally. While there is more than one way to implement managed ingestion, combining managed ingestion with existing artifact management solutions creates a very potent capability that provides organizations with control over the graph resolution and an opportunity for centralized supply chain risk management. Native support for different package ecosystems provided by most modern artifact management solutions ensures compatibility with most existing build and dependency management tools.</p>
<p>In this context, based on practical experience, managed ingestion needs to provide the following capabilities:</p>
<ul>
<li><strong>Implementation of an ingestion delay</strong> for new versions of OSS packages. A simple but very effective mitigation against a number of supply chain attacks.</li>
<li><strong>Mitigation of availability concerns</strong> ensuring organizations are able to build and deploy even if upstream infrastructure is down.</li>
<li><strong>Mitigation of dependency confusion attacks</strong> by flagging upstream packages whose names clash with internal package names or that fail SLSA build provenance verification.</li>
<li><strong>Mitigation of typosquatting</strong> attacks by flagging upstream packages based on heuristics.</li>
<li>Opportunity to <strong>deploy existing content scanning tools on OSS packages</strong> to flag known indicators of maliciousness or unexpected changes (e.g. changes in capabilities reported by <a href="https://github.com/google/capslock">CAPSLOCK</a>).</li>
</ul>
<p>The process of using OSS packages via registries presents a lot of risks beyond typosquatting and dependency confusion—and requires the same level of attention and control as the build process itself. Managed ingestion is the fundamental capability required to successfully manage OSS supply chain risk. As part of the ongoing <a href="https://github.com/slsa-framework/slsa/issues/961">SLSA dependencies track</a> effort we will work to formalize these concepts, including <a href="https://github.com/slsa-framework/slsa/issues/1105">those from s2c2f</a>, within the SLSA specification.</p>
<!-- Footnotes themselves at the bottom. -->
<h2 id="notes">Notes</h2>
<section class="footnotes">
<ol>
<li id="fn1">
<p>Multi-registry behaviour is ecosystem and configuration specific, e.g. PyPI configured with the discouraged –extra-index-url flag would pick the highest version if a package is present in private and public instance. Overall the mechanics of the attack remain the same. <a href="#fnref1" class="footnote-backref">↩</a></p>
</li>
</ol>
</section>]]></content><author><name>Meder Kydyraliev (Google)</name></author><summary type="html"><![CDATA[Dependency confusion and typosquatting attacks are very similar in their nature. They both exploit the weakness in the way many package managers identify packages using only their names. Successfully exploiting this weakness enables the attacker to run arbitrary code at install time or at application’s run time. These attacks are scalable, portable, and extremely cost-effective to carry out—making them very appealing to malicious actors.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/images/icons/android-chrome-192x192.png" /><media:content medium="image" url="/images/icons/android-chrome-192x192.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>