Posted in Cloud & Infrastructure

Software Supply Chain Security in 2026: SBOMs, Syft, Grype, and in-toto Explained

“Supply chain security” used to mean physical logistics. In software, it now means a specific, practical question: can you prove what’s actually inside the artifact you’re about to deploy, whether any of it is known to be vulnerable, and whether the process that built it was tampered with along the way? Four pieces of free, open-source tooling answer those questions in combination: Syft generates a Software Bill of Materials (SBOM), Grype scans that SBOM for known vulnerabilities, in-toto attests to and verifies the build process itself, and SLSA provides the framework for judging how strong those build-time guarantees actually are. This is an explainer on how they fit together, written and checked directly against each project’s own documentation.

At a Glance

Tool / standardWhat it isMaintainer / governanceLicense / cost
SBOM (SPDX, CycloneDX)A structured inventory of a software artifact’s componentsSPDX: the Linux Foundation (ISO/IEC 5962:2021). CycloneDX: OWASP Foundation (also ECMA-424)Free, open standards
SyftCLI tool/library that generates SBOMs from container images and filesystemsAnchore (open-source project, commercial support optional)Free, Apache-2.0
GrypeCLI vulnerability scanner that consumes SBOMs (including Syft’s) or scans images/filesystems directlyAnchore (open-source project, commercial support optional)Free, Apache-2.0
in-totoFramework/attestation format for recording and verifying each step of a supply chain so tampering is detectableCloud Native Computing Foundation (CNCF, graduated project)Free, open-source
SLSAA leveled framework (L0–L3) for how trustworthy a build’s provenance isOpenSSF, under a vendor-neutral cross-organization steering group (Linux Foundation specification)Free, open specification

Short Verdict

None of these tools compete with each other — they stack. SBOMs (via Syft) tell you what’s in an artifact. Grype tells you whether any of that is a known vulnerability. in-toto tells you whether the process that produced the artifact can be trusted. SLSA tells you how strong that trust actually is, on a scale anyone can audit against. A team adopting software supply chain security in 2026 should expect to run all four pieces together, not pick one.

What an SBOM Is

A Software Bill of Materials is a structured, machine-readable list of every component — open-source library, OS package, language dependency — that makes up a piece of software, roughly analogous to an ingredients list. Two open standards dominate:

  • SPDX is maintained by the Linux Foundation and is also published as the international standard ISO/IEC 5962:2021. Per spdx.dev, it’s designed to represent systems of software components as SBOMs, and its scope has grown to include AI, data, and security references as well.
  • CycloneDX is maintained by the OWASP Foundation (with Ecma International’s TC54 committee) and is also published as ECMA-424. Per cyclonedx.org, it’s framed as a “full-stack” BOM standard covering not just software but hardware (HBOM), cryptographic assets (CBOM), AI/ML models, and vulnerability data formats like VEX (Vulnerability Exploitability eXchange).

Neither format is “better” in the abstract — they’re both free, open, and widely supported; which one you use is usually dictated by what your regulator, customer, or downstream scanning tool expects. This is also the natural next step after the risk covered in our earlier piece on AI package hallucinations and slopsquatting: an accurate SBOM is one of the few reliable ways to catch a dependency that shouldn’t be there before it ships.

How Syft Generates SBOMs

Syft is an open-source CLI tool and Go library, maintained by Anchore, that generates an SBOM from a container image, a directory, or an archive. According to the project’s own GitHub page, it supports a wide range of package ecosystems out of the box — Alpine (apk), Debian (dpkg), RPM, Go, Python, Java, JavaScript, Ruby, Rust, PHP, .NET, and more — and can output SPDX, CycloneDX, or its own Syft JSON format, including writing more than one format at once.

# Install Syft
curl -sSfL https://get.anchore.io/syft | sudo sh -s -- -b /usr/local/bin

# Generate an SBOM for a container image, printed as a table
syft alpine:latest

# Generate a CycloneDX-format SBOM for a local project directory
syft ./my-project -o cyclonedx-json

# Write both SPDX and CycloneDX SBOMs to files in one run
syft alpine:latest -o spdx-json=./sbom.spdx.json -o cyclonedx-json=./sbom.cdx.json

Syft is licensed Apache-2.0 and is entirely free to run yourself; Anchore separately sells commercial support and a hosted platform built on top of it, but the open-source tool has no paywall.

How Grype Scans SBOMs for Vulnerabilities

Grype, also maintained by Anchore and also Apache-2.0 licensed, is the matching vulnerability scanner. It can scan a container image or filesystem directly, but it’s designed to work especially well against an SBOM Syft already produced — Grype’s own GitHub page highlights that feeding it a Syft SBOM (rather than re-scanning the raw image) enables faster vulnerability detection, since the inventory step is already done.

# Scan a container image directly
grype alpine:latest

# Scan an existing Syft SBOM instead of re-inventorying the image
grype sbom:./sbom.cdx.json

# Pipe a Syft SBOM straight into Grype
syft alpine:latest -o cyclonedx-json | grype

Per Grype’s documentation, it supports the same broad set of OS and language package ecosystems as Syft (Alpine, Debian, Ubuntu, RHEL, Oracle Linux, Amazon Linux, plus Ruby, Java, JavaScript, Python, .NET, Go, PHP, Rust), and it layers prioritization signals on top of raw CVE matches — EPSS (Exploit Prediction Scoring System) and CISA’s KEV (Known Exploited Vulnerabilities) list — plus support for OpenVEX, so teams can suppress matches they’ve already determined aren’t actually exploitable in their context. In short: Syft answers “what’s in here,” Grype answers “is any of that dangerous, and how urgently.”

What in-toto Adds: Verifying the Build Process Itself

Syft and Grype both operate on the finished artifact. Neither one can tell you whether the build pipeline that produced that artifact was itself compromised — whether an attacker slipped in a malicious step, substituted a dependency mid-build, or tampered with the output before it was signed. That’s the gap in-toto closes.

in-toto is a CNCF graduated project, created and led by Prof. Santiago Torres-Arias at Purdue University under Linux Foundation governance. Per in-toto.io, the framework’s goal is to protect a software product’s integrity “from initiation to end-user installation” — not just the final release step, because, as the project’s own site puts it, a package can already be compromised long before it reaches a repository. It does this by making every step in a supply chain (who ran it, what it did, in what order) transparent and checkable: a supply chain owner can define which steps are expected and by whom, and consumers can verify, after the fact, that the steps that actually happened match that expectation.

A key technical detail, confirmed directly against SLSA’s own blog on the relationship between the two projects: in-toto isn’t only an attestation file format. It defines a lightweight “Statement” envelope that names the artifact in question and a “predicate type” describing the specific claim being made about it — this could be a build-step link, a test result, an SBOM (in SPDX or CycloneDX form), or a SLSA provenance record. On top of that, in-toto also defines a verification model: the supply chain owner signs a layout naming authorized actors and expected steps, and that layout is checked against the attestations actually produced. SLSA’s own framing is explicit: “in-toto isn’t just a format of attestations.”

Where SLSA Fits

SLSA (Supply-chain Levels for Software Artifacts) is not a tool you run — it’s a framework for grading how trustworthy a build’s provenance actually is. It’s developed under OpenSSF by a vendor-neutral, cross-organization steering group (with Google, IBM, Intel, and Red Hat among the listed participants), and published as an open specification under the Community Specification License.

Per slsa.dev’s own level descriptions, the build track has four levels:

  • L0 — No guarantees. No requirements at all; the implicit baseline for ad hoc or local builds.
  • L1 — Provenance exists. The build process is consistent and generates provenance describing how the artifact was built, but that provenance may be unsigned and is easy to forge or bypass.
  • L2 — Hosted build platform. The build runs on dedicated hosted infrastructure, and the platform itself signs the provenance, protecting against post-build tampering.
  • L3 — Hardened builds. The build platform isolates runs from each other and keeps signing secrets inaccessible even to user-defined build steps, protecting against tampering during the build itself.

Provenance — “what entity built the artifact, what process they used, and what the inputs were” in SLSA’s own words — is the central artifact at every level; higher levels simply make that provenance harder to forge or bypass. And per SLSA’s own blog post explaining the relationship, SLSA Provenance (the predicate at https://slsa.dev/provenance/v1) is itself carried inside an in-toto Statement — SLSA defines what the build claim should contain, and in-toto supplies the signed, verifiable envelope and verification process that claim travels in. This pairs naturally with the CI/CD hardening practices in our earlier pieces on Sigstore, SLSA, and provenance attestation and the broader CI/CD supply-chain security checklist, both of which cover the pipeline-hardening side that complements the artifact-level tooling discussed here.

Comparison Table

Question it answersTool/standardOutput
What components are in this artifact?SyftSBOM (SPDX, CycloneDX, or Syft JSON)
Are any of those components known-vulnerable?GrypeVulnerability match list, prioritized with EPSS/KEV, filterable with VEX
Was the build process itself tampered with?in-totoSigned layout + link/attestation metadata, independently verifiable
How strong is the build’s provenance, on a comparable scale?SLSAA level (L0–L3) describing build-platform trust, carried as an in-toto-wrapped provenance attestation

Trade-offs

  • SBOM format choice has real downstream friction. SPDX and CycloneDX are both free and widely accepted, but regulators, customers, and scanning tools don’t always agree on which they expect — generating both (as Syft lets you do in a single command) sidesteps the argument.
  • An SBOM is a snapshot, not a guarantee. Syft tells you what’s declared in the artifact; it can’t tell you whether the build that produced it was itself compromised — that’s what in-toto and SLSA are for, not a gap in Syft.
  • Grype’s accuracy depends on database freshness and ecosystem coverage, and no vulnerability scanner eliminates false positives/negatives entirely — EPSS and KEV scoring help triage, but they don’t replace judgment.
  • in-toto’s guarantees require actually running verification, not just generating attestations. Signing a layout and producing link metadata does nothing if nobody checks the finished chain against it before deploying.
  • SLSA levels describe build-platform trust, not application security. A SLSA L3 artifact can still contain a vulnerable dependency — that’s precisely why SLSA, Syft, and Grype are complementary rather than substitutes for one another.

Who Should Care

  • Platform/DevOps teams building CI/CD pipelines who need a repeatable way to produce and scan SBOMs on every build, not just at release time.
  • Security and compliance teams responding to customer or regulatory SBOM requirements (increasingly common in US federal and critical-infrastructure procurement) who need a free, standards-compliant way to generate them.
  • Open-source maintainers who want to give downstream users verifiable proof of how a release was built, not just a changelog.
  • Anyone evaluating AI-generated code or AI coding assistants, where an accurate, automatically generated SBOM is one of the few practical checks against a hallucinated or substituted dependency making it into a shipped artifact.

Bottom Line

None of this tooling costs money, and none of it is optional in any meaningful sense anymore for teams shipping software that others depend on. Syft and Grype are a five-minute CLI install that immediately answers “what’s in this artifact and is any of it dangerous.” in-toto and SLSA are the layer above that, answering the harder question of whether the artifact’s own creation can be trusted — and increasingly, that’s the question customers and regulators are starting to ask for proof of, not just an assurance.

FAQ

Do I have to choose between SPDX and CycloneDX?
Not with Syft — it can output both formats from the same scan in one command, so many teams generate both and let downstream consumers pick.

Are Syft and Grype really free?
Yes. Both are Apache-2.0 licensed open-source projects maintained by Anchore, installable and runnable with no license key. Anchore sells separate commercial support and a hosted platform, but the CLI tools themselves are not gated.

Can Grype scan something other than a Syft SBOM?
Yes — it can scan a container image or filesystem directly without a pre-generated SBOM, though per Anchore’s own documentation, feeding it an existing Syft SBOM is faster since the inventory step is already done.

Is in-toto the same thing as SLSA?
No. SLSA defines the specific claim (“provenance”) and a maturity scale (L0–L3) for how trustworthy that claim is; in-toto defines the signed envelope/attestation format that provenance (and other claims, like SBOMs or test results) travels in, plus the layout-based verification model used to check it. SLSA’s own blog is explicit that SLSA provenance is carried inside an in-toto attestation, not a competing format.

What SLSA level should a typical team target first?
SLSA’s own materials describe L1 (provenance exists, even if unsigned) as the first on-ramp, moving to L2 (hosted, platform-signed builds) as a realistic target for most CI/CD setups; L3’s isolation and secret-handling requirements are aimed at build platforms themselves, not typical application teams.

Sources

Posted in Artificial Intelligence

AI Package Hallucinations and Slopsquatting: The New Supply-Chain Risk from AI Coding Assistants

Ask an AI coding assistant for a Python snippet, and there’s a real, measured chance it will tell you to pip install a package that doesn’t exist. That’s not a hypothetical: the peer-reviewed USENIX Security 2025 study that first measured this at scale found that 19.7% of over 2.2 million AI-generated code samples recommended at least one non-existent package, and attackers have already started registering those exact hallucinated names with malicious payloads inside them, waiting for someone to copy-paste the AI’s suggestion. Security researchers call this “slopsquatting” — a term coined by Seth Larson, developer-in-residence at the Python Software Foundation — and in 2026 it’s one of the more concrete, quantifiable risks specific to AI coding assistants, distinct from the general “review AI code carefully” advice that applies to everything else an LLM writes.

At a Glance

FactDetail
What it isAn attacker registers a package name that LLMs are observed to hallucinate (invent) when generating code, so that developers who copy-paste AI-suggested install commands pull real, attacker-controlled malware
Term coined bySeth Larson, developer-in-residence at the Python Software Foundation, by analogy with “typosquatting”
Original measured rate (2024/2025)19.7% of 2.23 million AI-generated code samples across 16 models contained at least one hallucinated package (Spracklen et al., USENIX Security 2025)
2026 frontier-model rate3.6%–5.0% of package mentions and 2.2%–3.4% of generations hallucinated across five 2026 frontier models, per an independent replication study
Real-world exploitation observedAt least 23 AI-hallucinated package names were found to have previously hosted actual malware before registries removed them; researchers observed roughly 1% of hallucinated names get registered by someone within six months of exposure
Primary defensesPackage-existence verification before install, committed and hash-verified lockfiles, SCA/allowlist tooling, human review of AI-suggested dependencies

What Slopsquatting Actually Is

Slopsquatting is a supply-chain attack that depends entirely on a quirk of how LLMs generate code: when asked to solve a problem, a model will sometimes invent a plausible-sounding package name that doesn’t exist — the kind of name a real package in that ecosystem might have — because the model is predicting statistically likely tokens, not looking anything up. If a developer (or an autonomous coding agent) trusts that suggestion and runs pip install or npm install on it, nothing happens — unless an attacker has already registered that exact name on PyPI or npm with malicious code inside it. At that point, the “nothing exists here” gap an LLM hallucinated into existence becomes a real, exploitable foothold. This is distinct from typosquatting (registering a misspelled variant of a real package name) because the attacker isn’t guessing at human typos — they’re exploiting a documented, measurable pattern in how specific LLMs fail, often by generating large volumes of code with those models first to find out exactly which fake names they tend to invent.

What the Research Actually Found

The foundational study here is Spracklen et al.’s “We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs,” presented at USENIX Security 2025. The researchers generated 2.23 million code samples in Python and JavaScript across 16 different models and found that 440,445 of them (19.7%) recommended at least one hallucinated package, comprising 205,474 unique fabricated names. The breakdown matters for anyone picking a model: commercial models averaged a 5.2% hallucination rate versus 21.7% for open-source models — open-source models hallucinated roughly four times as often — and the best-performing individual model, GPT-4 Turbo, hallucinated in 3.59% of samples, while the best open-source model tested, DeepSeek at 1.3B parameters, still hallucinated 13.63% of the time. Python (15.8%) hallucinated less than JavaScript (21.3%) on average, though a model’s tendency to hallucinate correlated across both languages.

Two findings from that study are specifically what makes slopsquatting practical as an attack rather than just an annoyance. First, persistence: when the researchers reran the same prompt 10 times against the same model, 43% of hallucinated package names reappeared in all 10 runs, and 58% reappeared more than once — meaning a meaningful share of hallucinations aren’t one-off flukes, they’re reliable, repeatable outputs an attacker can specifically target by querying the same models themselves. Second, specificity: 81% of distinct hallucinated names were produced by only one model, meaning each model has its own, largely distinct set of fabricated names — which is exactly the kind of fingerprint that lets an attacker generate a target list by simply querying popular coding models at scale and registering whatever they consistently invent.

A 2026 independent replication, run against five current frontier models across 199,840 Python and JavaScript generations, found the rate has narrowed but not disappeared: 3.6%–5.0% of package mentions and 2.2%–3.4% of full generations were hallucinated, which the paper’s authors describe as “the 2026 frontier sits at the level of 2024’s commercial models” — in other words, today’s best models have converged toward where 2024’s best commercial models already were, rather than solving the problem outright, and the gap between open-weight and closed models that the original study found has also largely disappeared. The same 2026 study used an accidental six-month public exposure of its own hallucinated-name list as a natural experiment and found that about 1% of hallucinated names were registered by someone within that window — at the same rate whether or not the list had been published, suggesting opportunistic registration happens regardless of visibility. Most concerning: the researchers found at least 23 of the hallucinated names they tested had previously hosted actual malware that package registries had already removed, and one hallucinated name was registered with malware during the study’s own run window.

How This Differs From General “AI Code Security” Advice

Broader frameworks like OWASP’s AI Security Verification Standard treat AI-generated dependencies as one item among many requiring human review and automated scanning — useful, but not specific to this failure mode. Slopsquatting is narrower and more mechanical: it doesn’t require the AI-generated code itself to have a logic bug, a missing authorization check, or any of the subtler mistakes general AI-code-security guidance focuses on. The entire attack succeeds or fails on one yes/no question — does this exact package name exist, and if so, is it the real one — which is why the mitigations below are comparatively simple and mechanical compared to, say, reviewing AI-generated authentication logic.

Real-World Mitigations

Verify package existence and provenance before install. Before running an install command an AI assistant suggested, confirm the package actually exists in the target registry, was registered well before your project started, and has a publisher with an established track record — a newly registered package with no history is a meaningful red flag regardless of how plausible its name sounds. Commercial tools like Socket, Snyk, and Aikido automate this check and can be wired directly into CI.

Commit lockfiles and verify them on every install. A lockfile pins exact versions and content hashes for every dependency, including transitive ones, so a build can’t silently pull in a different package than the one a human actually reviewed and approved. The critical step most teams skip is verifying the lockfile’s hashes during automated installs — not just having a lockfile, but enforcing it:

# Python: install only exact, hash-verified versions from requirements.txt
# requirements.txt must list a --hash=sha256:... entry for every package
pip install --require-hashes -r requirements.txt

# Node.js: install exactly what's in package-lock.json; fails if it's out of sync
npm ci

# A requirements.txt line with a pinned hash looks like this:
# requests==2.32.3 \
#     --hash=sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dc6

pip install --require-hashes refuses to install anything that isn’t in the lockfile with a matching hash, and npm ci (as opposed to npm install) refuses to modify package-lock.json at all — both turn “the AI suggested a new package” into a build failure that demands a human decision, rather than a silent, successful install.

Regenerate dependency trees from an approved lockfile, not from scratch. If an AI coding agent or assistant proposes adding a new dependency, that addition should go through the same review and approval step as any other dependency change — updating the lockfile deliberately — rather than letting an agent run an uncontrolled install command directly against a live environment.

Restrict what autonomous coding agents can install. For agents with any package-management ability, allowlist specific, pre-approved packages and route anything else to human review; if that isn’t practical for your workflow, disable automated package installation in agentic environments entirely until you can add that gate.

Flag newly registered packages in CI. Configure software composition analysis (SCA) tooling to flag any dependency registered in the 30–90 days before it was first introduced into your codebase — this window catches both slopsquatting and more conventional typosquatting without needing to know in advance which specific name is fake.

Trade-Offs

  • Pros: the core mitigations (hash-verified lockfiles, package-existence checks, CI allowlisting) are mechanical, automatable, and don’t require judging AI-generated logic — they’re genuinely effective against this specific, narrow attack vector and most teams can adopt them without a major process overhaul.
  • Cons: strict hash verification and lockfile enforcement can slow down legitimate dependency updates and requires deliberate process for adding anything new; newly-registered-package flagging produces false positives for genuinely new, legitimate libraries; and no mitigation here helps if a developer runs an AI-suggested install command manually, outside of CI, on a personal or unmanaged machine.

Who This Matters Most For

Teams using AI coding assistants or autonomous coding agents with any ability to run install commands — whether that’s a human copy-pasting Copilot/Claude/Cursor suggestions or an agent executing pip install autonomously as part of a task — are the direct audience here, especially teams working in ecosystems (Python and JavaScript specifically are the best-studied) and especially teams using open-source or self-hosted models, which the original research found hallucinate roughly four times as often as leading commercial models.

Who Should Look Elsewhere

Teams looking for broader guidance on reviewing AI-generated code in general — authorization logic, injection vulnerabilities, secrets handling — should look at OWASP’s AI-assisted secure coding guidance or a SAST tool comparison instead; this piece deliberately stays narrow on the package-hallucination problem specifically. Teams whose build pipelines already enforce hash-verified lockfiles and have no path for agents to run arbitrary installs have likely already closed most of this attack surface and may get more value focusing elsewhere.

Bottom Line

Slopsquatting is one of the more precisely measured risks in the AI-coding-assistant landscape: researchers can and have quantified exactly how often specific models invent package names, how persistently they repeat the same fabrications, and how often attackers have already weaponized the gap. The rate has improved — 2026’s best frontier models hallucinate at roughly a quarter the rate of 2024’s open-source models — but it hasn’t gone away, and the fix isn’t waiting for models to improve further. It’s treating every AI-suggested dependency as unverified until a lockfile, a hash check, or a human confirms it’s real.

FAQ

Who coined the term “slopsquatting”? Seth Larson, developer-in-residence at the Python Software Foundation, coined it by analogy with “typosquatting,” to describe attackers registering package names that AI models are observed to hallucinate.

How common is package hallucination today? The original 2024/2025 USENIX study found a 19.7% overall rate across 16 models. An independent 2026 replication against five current frontier models found 3.6%–5.0% of package mentions hallucinated — lower, but still a real, non-trivial rate, and roughly equivalent to where 2024’s best commercial models already stood.

Has slopsquatting actually been exploited, or is it theoretical? It’s been observed in practice. Researchers found at least 23 AI-hallucinated package names that had previously hosted real malware before being removed from registries, and one hallucinated name was registered with malware during a 2026 study’s own observation window.

Does using a lockfile fully solve this problem? It substantially reduces the risk for anything going through an enforced CI pipeline (via hash verification and commands like npm ci or pip install --require-hashes), but it doesn’t protect a developer who manually runs an AI-suggested install command outside that pipeline, on a personal machine or in an ad hoc script.

Are open-source models worse than commercial ones for this specific risk? Yes, according to the original research: open-source models averaged a 21.7% hallucination rate versus 5.2% for commercial models — roughly four times higher — though the gap has narrowed in more recent model generations per the 2026 replication study.

Sources

Related reading on this site: What OWASP’s Guidance Says About Securing AI-Generated Code in 2026 and Secure CI/CD Pipelines: A Practical Checklist for Supply-Chain Security in 2026.