Skip to main content
RunBook Academy

LinuxXII · Repository Security and Supply ChainProvenance

Package provenance and SBOM

Intermediate⏱ ~10 minbashsyftgrypetrivy

What you'll learn

  • Generate an SBOM (Software Bill of Materials) for a package set
  • Use syft, grype, or trivy to scan for vulnerabilities
  • Verify package origin against an attestation
  • Plan for SBOM-based vulnerability management

Prerequisites

Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09

Not yet marked complete on this device.

A package manager tells you what is installed; an SBOM tells you what is in each package; a vulnerability scanner tells you which of those components have known CVEs. Together, they are the discipline that answers “what is on this host, where did it come from, and is any of it vulnerable?”.

SBOM — Software Bill of Materials

An SBOM is a structured inventory of every component in a package or container. The two main formats are SPDX and CycloneDX; both are machine-readable.

Read-only / Safesyft SBOM
$ syft /var/cache/apt/archives/openssh-server_*.deb 2>/dev/null | head -30
...

Illustrative output

FormatUse
SPDXLinux Foundation standard; widely supported by package managers
CycloneDXOWASP; widely supported by security tooling

Vulnerability scanning

Read-only / Safevulnerability scan
$ grype /var/cache/apt/archives/openssh-server_*.deb 2>/dev/null | head -20; trivy rootfs / 2>/dev/null | head -20
...

Illustrative output

Read-only / Safehost scanners
$ vuls scan openssh-server; lynis audit system
...

Illustrative output

Attestations and provenance

Modern supply chains include attestations — signed statements about how a package was built. The Sigstore project provides tooling for signing and verifying attestations:

Read-only / Safecosign verify
$ cosign verify openssh-server_*.deb --certificate-identity-regexp 'https://github.com/.*' --certificate-oidc-issuer 'https://token.actions.githubusercontent.com'
...

Illustrative output

Production workflow

  1. Generate SBOMs at build time for in-house packages; at install time for vendor packages
  2. Store SBOMs centrally with version information
  3. Subscribe to vulnerability feeds (NVD, distribution advisories, vendor security lists)
  4. Query the SBOM database when a CVE is published: which hosts are affected?
  5. Patch via the package manager; verify with a re-scan that the vulnerable package is gone
  6. Document the response in the runbook for post-incident review

Knowledge check

Knowledge check · 3 questions

  1. Q1. What is an SBOM?

  2. Q2. A signed SBOM is required to install a package on a modern Linux host.

  3. Q3. Which of the following are correct SBOM-based vulnerability management practices? Select all that apply.

Passing score: 75%. Answers are checked in this browser.