# SBOM and Provenance > SBOMs inventory what an artifact contains; provenance and signatures (SLSA, Sigstore, npm/PyPI attestations) prove which pipeline built it from which source. Neither proves the source or the pipeline was clean. ## How it works ### SBOM - A machine-readable component inventory. CISA's **2025 Minimum Elements for SBOM** (update to the 2021 NTIA minimum elements, comments closed Oct 3, 2025) requires a machine-processable format such as SPDX or CycloneDX. The EU **Cyber Resilience Act** requires manufacturers to create and maintain SBOMs in a standardized machine-readable format. - **VEX** (Vulnerability Exploitability eXchange) is the companion: a machine-readable statement that a listed vulnerable component is or isn't exploitable in this product, turning SBOM + CVE matching into prioritization instead of noise (Allan Friedman). AI BOMs extend the idea to models and datasets. - Primary value is incident response: "are we running X@version anywhere?" across builds and cloud workloads. ### Provenance and SLSA SLSA v1.2 is organized into **tracks** with levels; the Build track currently has L1–L3. An artifact's SLSA level is independent of its dependencies' levels (no transitive guarantee). | Build level | Requirement | Still allows | |---|---|---| | L0 | nothing | everything | | L1 | provenance exists | forged provenance (unsigned) | | L2 | signed provenance, hosted build service | tampering during the build, insiders, cross-project contamination | | L3 | hardened, isolated builds; signing keys isolated from user-controlled build steps | a malicious source repo or compromised maintainer account | GitHub's reference design reaches SLSA 3 for Go with GitHub Actions + Sigstore: **Fulcio** issues a short-lived cert bound to the workflow's OIDC identity, **Cosign** signs, **Rekor** logs it to a transparency log; no long-lived signing keys to manage. ### Registry-native attestations - **npm provenance**: published from GitHub Actions via OIDC, linking a tarball to its repo, commit and workflow; GitHub paired this with mandatory 2FA for high-impact packages. >16,000 packages published with provenance at the time of the Sigstore post. - **PyPI attestations**: a per-project Security tab shows PyPI Publish and SLSA Build Provenance attestations with links to the transparency log, and warns on incomplete provenance, a differing source repository, or a changed publishing workflow (all signals of a hijack). A release "has no provenance" when none of its files carries an attestation. - **GitHub Artifact Attestations**: SLSA provenance and/or signed SBOMs for anything built in Actions. ## Techniques / commands Generate, sign, scan, verify in CI: ```bash syft dir:. -o cyclonedx-json > sbom.json grype sbom:sbom.json cosign sign --key cosign.key myregistry.local/app:1.0.0 cosign sign-blob --key cosign.key sbom.json cosign verify --key cosign.pub myregistry.local/app:${TAG} ``` Verify npm provenance with cosign ≥2.4.0 (bundle format), pinning the expected issuer **and** the exact repo/workflow: ```bash cosign verify-blob-attestation --bundle npm-provenance.sigstore.json --new-bundle-format \ --certificate-oidc-issuer="https://token.actions.githubusercontent.com" \ --certificate-identity-regexp="^https://github.com/npm/node-semver/.github/workflows/release-integration.yml.?" \ semver-7.6.3.tgz ``` GitHub Artifact Attestations: `gh attestation download --repo cli/cli <artifact>` then the same `cosign verify-blob-attestation`; for private repos use GitHub's Fulcio root (`gh attestation trusted-root`) with `--trusted-root ... --use-signed-timestamps --insecure-ignore-sct`. ## Where it fails (notable cases) - **bee-js 13.3.0 / Swarm Desktop 0.56.2**: two hijacked GitHub accounts ran the project's **own** release workflows. An unsigned commit changed the `prepare` script into a loader; the npm publish environment had no required reviewers and no tag policy, so the package shipped with **valid npm provenance** (~75 minutes live). A manually dispatched pre-release workflow holding Apple/Windows signing certs produced signed, notarized trojanized desktop builds. Swarm Foundation's own post-mortem: the attacker held a maintainer's credentials **and** the release bot's token, which together let the pipeline build, sign and publish with no second person approving; every release now needs a human approval in a protected release environment. A community AUR package rebuilt 0.56.2 from the malicious source for ~24 h, extending exposure beyond official channels. The project verified other releases by rebuilding stable JS packages from source and comparing them byte-for-byte with what the registries serve ([[raw/ethswarm.org/swarm-incident-malicious-bee-js-13-3-0-and-swarm-desktop-0-56-2-15953|Swarm Foundation]]). - **Microsoft `agent-framework` 1.26.1/1.26.2 (PyPI, 17 Nov 2026)**: Wiz assesses the attacker compromised a client certificate and private key for Microsoft's ESRP release pipeline; a first publish from an AWS address was rejected by ESRP IP filtering, a second from Microsoft address space succeeded (Microsoft has not confirmed root cause). SafeDep's point: 1.26.0 had no PyPI attestation either, so the absence of one didn't distinguish the malicious wheels. **Provenance only helps when the legitimate history has it**, and a valid publisher credential identifies a key, not who is using it ([[raw/medium.com/the-credential-was-valid-the-publisher-was-not-15854|VeritasChain]]). - **[email protected] and related `cacheable`/`ecto` releases**: malicious code was present in the tagged repo state, then built and attested by GitHub Actions; provenance was valid. Payload: `preinstall` → `setup.mjs` → `Math_Symbol.js`, plus IDE hooks (`.vscode/tasks.json`, `.claude/setup.mjs`). - **[email protected]** ([[Shai-Hulud Worm]]): the worm republished through the real pipeline, so the release carried valid build provenance. "Provenance tells you a package was built by the project's CI from the project's repository. It can't tell you that the repository itself was clean." - **"Your SBOM is fan fiction"**: build-time SBOMs describe the lockfile and image layers, not the running host: hand-installed software, stale `libssl.so.3` still mapped by an unrestarted nginx, `dlopen`'d plugins. Runtime BOMs from `/proc` maps close that gap. - Adoption: 69% cite lack of knowledge/expertise as the top SBOM adoption barrier (Dark Reading, citing Kloeg et al.). ## Defenses (how to use these controls correctly) - Verify provenance against a **policy** (expected repo, workflow path, ref/tag), not just "has a signature"; alert on PyPI's differing-repo / workflow-changed warnings. - Harden the thing provenance vouches for: required reviewers on publish environments, tag protection, protected release branches, no signing credentials in `workflow_dispatch` workflows, narrowly scoped release-bot tokens. See [[GitHub Actions Security]]. - Make two-person release approval structural, not optional: a stolen maintainer login plus a bot token should not be enough to publish ([[raw/ethswarm.org/swarm-incident-malicious-bee-js-13-3-0-and-swarm-desktop-0-56-2-15953|Swarm Foundation]]). - Attest every release from the start, so a missing or changed attestation is itself a signal ([[raw/medium.com/the-credential-was-valid-the-publisher-was-not-15854|VeritasChain]]). - Pair provenance with time: soak/cooldown rules (e.g. 72 h before serving a new version) catch hijacked-but-attested releases that are usually pulled within hours. - Ship SBOM + VEX; supplement with runtime inventory for long-lived hosts. - Keep SBOMs searchable across the estate for incident response (e.g. [[XZ Utils Backdoor]], [[tj-actions changed-files Compromise]]). ## Related - [[Software Supply Chain Security]] - [[CI-CD Pipeline Attacks|CI/CD Pipeline Attacks]] - [[GitHub Actions Security]] - [[Malicious Packages]] · [[Shai-Hulud Worm]] - [[Dependency Confusion]] · [[Typosquatting]] - [[XZ Utils Backdoor]] ## Sources - [[raw/cisa.gov/cisa-2025-minimum-elements-for-sbom-4034|CISA 2025 Minimum Elements for SBOM]] - [[raw/darkreading.com/sboms-in-2026-some-love-some-hate-much-ambivalence-4471|SBOMs in 2026: Some Love, Some Hate, Much Ambivalence]] - [[raw/securityweek.com/software-transparency-is-changing-allan-friedman-on-sbom-ai-boms-and-w-14096|Software Transparency Is Changing: Allan Friedman on SBOM, AI BOMs and VEX]] - [[raw/slsa.dev/about-slsa-spec-v1-2-4473|About SLSA (spec v1.2)]] - [[raw/slsa.dev/slsa-supply-chain-levels-for-software-artifacts-2766|SLSA - Supply-chain Levels for Software Artifacts]] - [[raw/slsa.dev/sbom-slsa-accelerating-sbom-success-with-slsa-4476|SBOM + SLSA: Accelerating SBOM success with SLSA]] - [[raw/practical-devsecops.com/slsa-framework-the-definitive-guide-for-securing-your-software-supply-2761|SLSA Framework: The Definitive Guide]] - [[raw/github.blog/slsa-3-compliance-with-github-actions-and-sigstore-4035|SLSA 3 Compliance with GitHub Actions and Sigstore]] - [[raw/blog.sigstore.dev/cosign-verification-of-npm-provenance-and-github-attestations-4036|cosign Verification of npm Provenance and GitHub Attestations]] - [[raw/nathanberg.io/supply-chain-security-in-ci-sboms-slsa-and-sigstore-2765|Supply Chain Security in CI: SBOMs, SLSA, and Sigstore]] - [[raw/rescana.com/github-enhances-npm-security-with-mandatory-2fa-and-provenance-to-comb-9095|GitHub Enhances npm Security with Mandatory 2FA and Provenance]] - [[raw/helpnetsecurity.com/pypi-makes-release-attestations-easier-to-find-with-new-security-tab-13908|PyPI makes release attestations easier to find with new security tab]] - [[raw/medium.com/signed-provenanced-and-malicious-hijacked-accounts-shipped-malware-in-14298|Signed, Provenanced and Malicious: bee-js 13.3.0 and Swarm Desktop 0.56.2]] - [[raw/snyk.io/inside-the-keyv-npm-compromise-preinstall-malware-trusted-provenance-a-11080|Inside the keyv npm Compromise: preinstall Malware, Trusted Provenance, and IDE Hooks]] - [[raw/hextrap.io/tensorlake-0-5-144-a-worm-with-valid-provenance-and-the-firewall-rule-12277|[email protected]: A Worm With Valid Provenance]] - [[raw/yeet.cx/your-sbom-is-fan-fiction-12194|Your SBOM Is Fan Fiction]] - [[raw/ethswarm.org/swarm-incident-malicious-bee-js-13-3-0-and-swarm-desktop-0-56-2-15953|Swarm incident: malicious bee-js 13.3.0 and Swarm Desktop 0.56.2]] - [[raw/medium.com/the-credential-was-valid-the-publisher-was-not-15854|The Credential Was Valid. The Publisher Was Not.]]