Cluster 8 · Ecosystem Audit · Python · PEP 740 · --require-hashes

Python requirements.txt, Hash Pinning & PyPI SBOM Audit Guide

Eliminate unpinned Python dependencies and zero-hash manifests: compile requirements.txt with --require-hashes or uv.lock, generate CycloneDX/SPDX SBOMs, and audit PyPI CVEs.

Notice: Informational engineering guidance for security & procurement readiness — not legal advice. Backed by live telemetry from our N=30 B2B SaaS SBOM Supply-Chain Benchmark.
Zero Telemetry · Strict CSP (connect-src 'none')

1. Compliance Scope, Stack & Current Controls

SOC 2 · VSAQ · EO 14028 · EU CRA
Target Compliance & Procurement Frameworks
Language Ecosystems & Packaging Formats
Current Engineering & SBOM Controls (Check What You Have Today)
Disclaimer: Informational engineering guidance for security & procurement preparation — not legal advice.
High Deal-Delay Risk
0 / 100 (F)
BLOCKED — REMEDIATE BEFORE SEND

Passing: 0 · Action Items: 11 · Frameworks: 3 · Ecosystems: 2

SBOM-CORE-01: Commit deterministic lockfiles across all production services CRITICAL ACTION
[Pinning & Lockfiles] Unpinned manifests blind static CVE scanners: in RungLab's N=30 SBOM benchmark, 14/30 (46.7%) repos relied on floating SemVer ranges (937 specs), masking CVEs until lockfile resolution.
SBOM-CORE-02: Emit CycloneDX 1.5/1.6 or SPDX 2.3 JSON with PURLs & SHA-256 digests CRITICAL ACTION
[SBOM Artifacts] Generate release SBOMs via `syft` or `@cyclonedx/cdxgen` from resolved lockfiles/images. In RungLab's N=30 audit, 24/30 (80.0%) raw manifest scans had zero SHA-256 hashes.
SBOM-CORE-03: Enforce OSV / CVE & CISA KEV remediation SLAs before release CRITICAL ACTION
[Vulnerability & KEV Gate] Scan every release against api.osv.dev & CISA KEV: 50.0% (15/30) of benchmarked B2B SaaS repos carried live OSV CVEs and 6.7% (2/30) shipped active CISA KEV exploits.
SBOM-CORE-04: Screen transitive dependencies for AGPL/GPL copyleft & NOASSERTION gaps HIGH ACTION
[License Governance] Check transitive deps before legal redlines: 20.0% (6/30) of benchmarked repos triggered weak/strong copyleft flags (including AGPL-3.0-or-later via mupdf in SaaS code) and 100% had unknown licenses in raw manifests.
SBOM-CORE-05: Sign releases and SBOMs with Sigstore Cosign or SLSA v1 provenance HIGH ACTION
[Artifact Provenance] Attach keyless GitHub Actions OIDC Cosign signatures (`id-token: write`) and SLSA provenance so buyers can verify SBOM integrity.
FW-SOC2-CC7: Map SBOM scans & CVE remediation tickets to SOC 2 CC7.1, CC8.1 & CC9.2 HIGH ACTION
[SOC 2 Type II] Auditors require repeatable evidence over an observation window: retain timestamped release SBOMs (CC8.1 change management), OSV/KEV scan logs + patch PRs (CC7.1 vulnerability management), and third-party open-source inventory (CC9.2).
FW-VSAQ-SIG: Pre-package VSAQ / SIG Lite open-source inventory & copyleft attestation HIGH ACTION
[VSAQ / SIG Lite] Enterprise buyers ask whether you maintain a complete FOSS bill of materials, patch critical CVEs within SLA, and prohibit unapproved copyleft components. Pair a CycloneDX SBOM with pre-filled VSAQ/SIG answers.
FW-NTIA-14028: Verify all 7 NTIA Minimum Elements (Supplier, Name, Version, PURL, Graph, Author, Timestamp) HIGH ACTION
[EO 14028 / NTIA] Federal & regulated buyers reject flat dependency lists missing dependency relationships (`dependencies[]` in CycloneDX / `relationships[]` in SPDX) or SBOM `metadata.timestamp` / `authors`.
DIST-SAAS: Audit network-interaction copyleft triggers (AGPL-3.0 / SSPL) HIGH ACTION
[Cloud SaaS Distribution] While GPL-2.0/3.0 typically triggers on binary distribution, AGPL-3.0 requires source disclosure over network interaction — flagged in SaaS PDF/document stacks like mupdf (AGPL-3.0-or-later).
ECO-PYTHON: Pin Python requirements with --require-hashes or uv.lock + generate SPDX/CDX HIGH ACTION
[Python / PyPI] Plain `requirements.txt` lacks transitive graphs and SHA-256 digests. Compile with `pip-compile --generate-hashes` or `uv lock`, and export SBOM via `cyclonedx-py` or `syft`.
ECO-DOCKER: Attach Buildx --sbom=true & digest-pinned Cosign attestations to OCI images HIGH ACTION
[Containers / OCI] Base OS layers (`alpine`, `debian`) introduce CVEs missing from app lockfiles. Emit BuildKit SPDX attestations and scan `@sha256:` image digests with Syft/Trivy.
Exportable Procurement Readiness Checklist (Markdown)
# Enterprise SBOM & SOC 2 Procurement Readiness Checklist — Python / FastAPI AI Service

> Informational engineering guidance for security & procurement preparation — not legal advice.

- **Readiness Score:** 0/100 (Grade F) — **BLOCKED — REMEDIATE BEFORE SEND**
- **Buyer Friction Risk:** High Deal-Delay Risk
- **Target Frameworks:** SOC 2 Type II, VSAQ / SIG Lite, EO 14028 / NTIA
- **Language Ecosystems:** Python / PyPI (requirements.txt / uv.lock), Containers / OCI (Buildx / Syft)
- **Distribution Model:** Cloud SaaS (Hosted Multi-Tenant Web / API)
- **Controls Summary:** 0 Passing / 11 Action Items

## Actionable Controls & Procurement Evidence Checklist

- [ ] **SBOM-CORE-01 (CRITICAL) — Commit deterministic lockfiles across all production services** [Pinning & Lockfiles]
  - Unpinned manifests blind static CVE scanners: in RungLab's N=30 SBOM benchmark, 14/30 (46.7%) repos relied on floating SemVer ranges (937 specs), masking CVEs until lockfile resolution.
- [ ] **SBOM-CORE-02 (CRITICAL) — Emit CycloneDX 1.5/1.6 or SPDX 2.3 JSON with PURLs & SHA-256 digests** [SBOM Artifacts]
  - Generate release SBOMs via `syft` or `@cyclonedx/cdxgen` from resolved lockfiles/images. In RungLab's N=30 audit, 24/30 (80.0%) raw manifest scans had zero SHA-256 hashes.
- [ ] **SBOM-CORE-03 (CRITICAL) — Enforce OSV / CVE & CISA KEV remediation SLAs before release** [Vulnerability & KEV Gate]
  - Scan every release against api.osv.dev & CISA KEV: 50.0% (15/30) of benchmarked B2B SaaS repos carried live OSV CVEs and 6.7% (2/30) shipped active CISA KEV exploits.
- [ ] **SBOM-CORE-04 (HIGH) — Screen transitive dependencies for AGPL/GPL copyleft & NOASSERTION gaps** [License Governance]
  - Check transitive deps before legal redlines: 20.0% (6/30) of benchmarked repos triggered weak/strong copyleft flags (including AGPL-3.0-or-later via mupdf in SaaS code) and 100% had unknown licenses in raw manifests.
- [ ] **SBOM-CORE-05 (HIGH) — Sign releases and SBOMs with Sigstore Cosign or SLSA v1 provenance** [Artifact Provenance]
  - Attach keyless GitHub Actions OIDC Cosign signatures (`id-token: write`) and SLSA provenance so buyers can verify SBOM integrity.
- [ ] **FW-SOC2-CC7 (HIGH) — Map SBOM scans & CVE remediation tickets to SOC 2 CC7.1, CC8.1 & CC9.2** [SOC 2 Type II]
  - Auditors require repeatable evidence over an observation window: retain timestamped release SBOMs (CC8.1 change management), OSV/KEV scan logs + patch PRs (CC7.1 vulnerability management), and third-party open-source inventory (CC9.2).
- [ ] **FW-VSAQ-SIG (HIGH) — Pre-package VSAQ / SIG Lite open-source inventory & copyleft attestation** [VSAQ / SIG Lite]
  - Enterprise buyers ask whether you maintain a complete FOSS bill of materials, patch critical CVEs within SLA, and prohibit unapproved copyleft components. Pair a CycloneDX SBOM with pre-filled VSAQ/SIG answers.
- [ ] **FW-NTIA-14028 (HIGH) — Verify all 7 NTIA Minimum Elements (Supplier, Name, Version, PURL, Graph, Author, Timestamp)** [EO 14028 / NTIA]
  - Federal & regulated buyers reject flat dependency lists missing dependency relationships (`dependencies[]` in CycloneDX / `relationships[]` in SPDX) or SBOM `metadata.timestamp` / `authors`.
- [ ] **DIST-SAAS (HIGH) — Audit network-interaction copyleft triggers (AGPL-3.0 / SSPL)** [Cloud SaaS Distribution]
  - While GPL-2.0/3.0 typically triggers on binary distribution, AGPL-3.0 requires source disclosure over network interaction — flagged in SaaS PDF/document stacks like mupdf (AGPL-3.0-or-later).
- [ ] **ECO-PYTHON (HIGH) — Pin Python requirements with --require-hashes or uv.lock + generate SPDX/CDX** [Python / PyPI]
  - Plain `requirements.txt` lacks transitive graphs and SHA-256 digests. Compile with `pip-compile --generate-hashes` or `uv lock`, and export SBOM via `cyclonedx-py` or `syft`.
- [ ] **ECO-DOCKER (HIGH) — Attach Buildx --sbom=true & digest-pinned Cosign attestations to OCI images** [Containers / OCI]
  - Base OS layers (`alpine`, `debian`) introduce CVEs missing from app lockfiles. Emit BuildKit SPDX attestations and scan `@sha256:` image digests with Syft/Trivy.

## Fast Verification & Dossier Export
- Free Zero-Upload SBOM & KEV Audit: https://sbom.runglab.dev
- $39 6-File SOC 2 & VSAQ/SIG Procurement Dossier (Creem): https://www.creem.io/product/prod_3fpeHbtnRsnuSxvU9s2oGg
- PayPal Invoice-on-Delivery ($39 single-repo / $79 multi-repo): [email protected]
- Official MCP Registry (`dev.runglab/devtools` -> `audit_sbom_manifest`): https://mcp-server.runglab.dev/mcp
- Empirical N=30 SBOM Benchmark: https://tools.runglab.dev/research/b2b-saas-sbom-supply-chain-benchmark-2026/
VendorReady SBOM · Zero Upload $39 SOC 2 Procurement Dossier

Turn Lockfiles & SBOMs Into Buyer-Ready SOC 2 & VSAQ Evidence

In our N=30 B2B SaaS SBOM Benchmark, 46.7% of open-core repos failed procurement gates (2/30 shipped CISA KEVs). Run a free zero-upload scan at sbom.runglab.dev, order the $39 6-File SOC 2 & VSAQ/SIG Dossier (Creem or PayPal invoice-on-delivery via [email protected]), or automate via Official MCP Server dev.runglab/devtools (audit_sbom_manifest).

Controls, Specifications & Procurement Evidence Matrix

Control / Requirement Target Standard / Mechanism Audit & Engineering Rationale
Unpinned requirements.txt Missed transitive CVEs & 0 hashes In N=30 study, permitio/opal had 8/8 floating ranges & 0 OSV matches vs phasehq/console (11 CVEs)
pip-compile --generate-hashes Exact == pins + SHA-256 digests Enforced at install time via pip install --require-hashes -r requirements.txt
uv.lock / Poetry lock Cross-platform deterministic graph Exports locked transitive wheels, hashes, and markers cleanly
SBOM Generator cyclonedx-py / syft Emits pkg:pypi/<name>@<version> PURLs + PyPI license metadata

Compile Hash-Pinned Python Lockfile & Export CycloneDX 1.6 SBOM

python-sbom.sh
# Option A: pip-tools deterministic hash pinning
pip-compile --generate-hashes --output-file=requirements.txt pyproject.toml
pip install --require-hashes --no-deps -r requirements.txt

# Option B: uv lock + CycloneDX export
uv lock --locked
uv export --format requirements-txt --all-extras > requirements.locked.txt
cyclonedx-py requirements requirements.locked.txt --of JSON --sv 1.6 -o python-sbom.cdx.json

Audit Python Wheel Provenance (PEP 740) & Runtime CVEs

python-ci-audit.yml
- name: Audit Python Environment via pip-audit & OSV
  run: |
    pip install pip-audit
    pip-audit -r requirements.locked.txt --format cyclonedx-json --output sbom.cdx.json

Key Engineering & Procurement Takeaways

  • Plain `requirements.txt` files frequently omit transitive packages, SHA-256 digests, and license metadata — leaving Python repos at 100% unknown licenses in raw manifest scans.
  • In RungLab's N=30 study, the pinned `requirements.txt` repo (`phasehq/console`) immediately surfaced 11 fixable OSV vulnerabilities, whereas the unpinned `requirements.txt` (`permitio/opal`) had 8/8 floating ranges.
  • Using `uv.lock` or `pip-compile --generate-hashes` paired with `pip install --require-hashes` simultaneously hardens CI against dependency confusion and unlocks accurate SBOM generation.

Common Deal-Blocking Pitfalls to Avoid

  • Listing `fastapi>=0.110` in requirements.txt without locking transitive `starlette`, `pydantic`, or `urllib3` versions.
  • Running `cyclonedx-py environment` inside a dirty local virtualenv that includes global developer tools instead of a clean CI build container.
  • Forgetting native C-extension OS libraries inside Python Docker images (e.g., `libssl`, `pillow` dependencies) when answering container SBOM questionnaires.

More Enterprise SBOM & SOC 2 Procurement Guides

← Back to SBOM & SOC 2 Readiness Hub · 2026 N=30 SBOM Benchmark → · 14×14 SPDX License Matrix → · CycloneDX / Sigstore Validator → · VendorReady SBOM ($39 Dossier) →

Frequently Asked Questions

Does a plain requirements.txt satisfy enterprise SBOM requirements?

No. Enterprise buyers expect CycloneDX or SPDX JSON containing resolved transitive packages, SHA-256 digests, PURLs (`pkg:pypi/...`), and license fields — use `pip-compile --generate-hashes` or `uv.lock` plus `cyclonedx-py`.

Why did raw Python manifests show 100% unknown licenses in the N=30 benchmark?

Neither `requirements.txt` nor PyPI lockfiles embed package license identifiers locally; SBOM tools like Syft or CycloneDX-py inspect installed wheel `METADATA` or PyPI registry APIs to populate SPDX licenses.

How can I audit my requirements.txt right now?

Paste or drop your requirements.txt into sbom.runglab.dev for an instant zero-upload OSV/KEV audit and pinning score, and pair with our PyPI Trusted Publishing guide (/supply-chain-security/pypi-trusted-publishing/).