LinuxXII · Repository Security and Supply ChainProvenance
Package provenance and SBOM
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
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.
$ syft /var/cache/apt/archives/openssh-server_*.deb 2>/dev/null | head -30...Illustrative output
| Format | Use |
|---|---|
| SPDX | Linux Foundation standard; widely supported by package managers |
| CycloneDX | OWASP; widely supported by security tooling |
Vulnerability scanning
$ grype /var/cache/apt/archives/openssh-server_*.deb 2>/dev/null | head -20; trivy rootfs / 2>/dev/null | head -20...Illustrative output
$ 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:
$ cosign verify openssh-server_*.deb --certificate-identity-regexp 'https://github.com/.*' --certificate-oidc-issuer 'https://token.actions.githubusercontent.com'...Illustrative output
Production workflow
- Generate SBOMs at build time for in-house packages; at install time for vendor packages
- Store SBOMs centrally with version information
- Subscribe to vulnerability feeds (NVD, distribution advisories, vendor security lists)
- Query the SBOM database when a CVE is published: which hosts are affected?
- Patch via the package manager; verify with a re-scan that the vulnerable package is gone
- Document the response in the runbook for post-incident review
Knowledge check
Knowledge check · 3 questions
Q1. What is an SBOM?
Q2. A signed SBOM is required to install a package on a modern Linux host.
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.