Guide · CRAClock · EU Cyber Resilience Act
How to generate an SBOM from Pipfile.lock
By the Ingenious AI team · Published 14 November 2026 · Reviewed 14 November 2026
Short answer: Pipfile.lock is a resolved lockfile, so its SBOM is exact by construction: CRAClock parses both sections — default (runtime) and develop — and every entry becomes a CycloneDX component with its locked version (the lockfile's leading '=' stripped) and a pkg:pypi purl. If your Python product installs from a Pipfile.lock, the SBOM generated from it is the truest inventory you can produce, which is why the parser treats the lockfile as a first-class source alongside requirements.txt.
Generate your free SBOM + readiness pack → Compare two releases free · See pricing
What is a Pipfile.lock SBOM?
A Pipfile.lock SBOM is a CycloneDX inventory generated from a Pipenv lockfile's resolved dependency set. Because the lockfile exists to freeze exact versions, every component parsed from it carries a version — the parser reads the default and develop objects, takes each package's version (normalising the lockfile's '==' prefix), and emits purls of the form pkg:pypi/<lowercased-name>@<version>. It is the precision end of the manifest spectrum: where requirements.txt declares intent, Pipfile.lock records resolution.
Declared versus resolved: the two Python views
Python tooling offers two natural inventory sources. The requirements view declares what the project asks for, with whatever precision the author chose. The lockfile view records what a resolver actually selected — every package at one exact version, reproducible across installs. For vulnerability matching, the resolved view is strictly stronger: it removes the entire class of 'which version do we actually run?' uncertainty that range specifiers introduce.
CRAClock parses both because vendors live in both worlds, and because comparing them is itself diagnostic: a requirements SBOM showing unpinned components beside a lockfile SBOM showing the resolved truth tells a precise story about where the project's precision lives. But when a lockfile exists and governs installs, it should be the inventory of record — the artefact the scans, diffs and conformity citations use.
What the parser reads
The lockfile's structure maps cleanly onto SBOM components. The default section holds the runtime set; the develop section holds the development set; both are parsed, so the build-and-test toolchain is inventoried alongside the shipped libraries, with the same scope awareness the package.json parser applies. Each entry's version arrives in the lockfile's format ('==2.32.0') and is normalised to the bare version for the component and its purl.
The result has a property no other manifest here guarantees: a pinning ratio of 100%, reached not by discipline but by construction. The checklist's pinning item, computed from the SBOM, reflects it immediately — which makes the lockfile workflow the fastest route to a fully matchable inventory for a Python vendor starting from zero.
Why full precision changes the scanning conversation
With every component exactly versioned, OSV matching becomes a complete query: every component can be checked, every result is a definite statement about the shipped set, and a clean scan means the whole inventory was examined — not just the pinned fraction. Compare the requirements-range world, where a clean scan carries an asterisk shaped like every unpinned component. The lockfile SBOM removes the asterisk, and with it a category of meeting ('are we sure the scan covered...?') that small teams cannot afford to keep having.
Precision also sharpens change review. The SBOM diff between two lockfile-derived inventories shows exact version movements — upgrades, downgrades, additions — with no range noise. A downgrade, which the diff flags as a P2 signal because older versions re-admit fixed vulnerabilities, is only visible when both sides state exact versions; the lockfile makes that signal reliable.
Lockfiles and the release rhythm
A lockfile changes when dependencies are deliberately re-resolved, which gives the SBOM series a natural cadence: regenerate on every lock change, diff against the previous, and the product's composition history becomes a sequence of intentional events rather than continuous drift. Each lockfile update is already a decision point in the team's workflow; attaching SBOM generation and diff review to it costs minutes and converts a routine chore into the compliance record.
Keep the generated SBOMs with their serials in the vault, cited by the releases they describe. Because lockfiles are deterministic, any later question — 'what exactly was in the March release?' — has a two-part answer that can be produced on demand: the lockfile from source control, and the SBOM it generates, byte-stable in content. Few evidence questions in the whole CRA programme have so clean an answer.
When the lockfile is not the whole product
Honesty still applies: the lockfile inventories the Pipenv-managed environment. Dependencies installed outside it — system packages, manually placed wheels, a separate JavaScript frontend — live outside its view and need their own inventories or documented exceptions, as the SBOM-limitations guide sets out. The lockfile SBOM is the gold standard for its domain, not a claim about domains it cannot see.
Within that domain, though, prefer it without hesitation. A vendor whose Python stack resolves through Pipfile.lock already owns the hardest part of inventory precision; generating the SBOM is the small step that converts that private precision into a shareable, scannable, citable artefact.
Your 5-action checklist
- Paste Pipfile.lock into the free CRAClock job; confirm both default and develop sections appear in the component count.
- Verify the pinning item reads fully pinned — lockfile SBOMs are exact by construction, so anything less signals a parse surprise to investigate.
- Adopt the lockfile as the inventory of record: scans and diffs run against its SBOM.
- Regenerate and diff at every lockfile update; review downgrade signals before merging the lock change.
- Inventory anything installed outside the Pipenv environment separately, or record it as a documented exception.
Work through the list in order. The free CRAClock job on the home page produces the SBOM, the dated checklist and the reporting runbook that several of these actions depend on.
Worked example: the lockfile that answered in one scan
A fictional API vendor's Pipfile.lock generated an SBOM of 52 components — 38 default, 14 develop — all exactly versioned. Their first full-coverage scan returned 1 hit: a develop-section test tool with a vulnerability in a version range covering theirs. Because the component's scope was visible, the triage was proportionate: a pipeline exposure, fixed by a lock update the same day, not a product emergency — precision and scope together converting a potential all-hands moment into a routine ticket.
The lock update produced the natural sequel: regenerated SBOM, diff showing exactly 1 changed component, the change reviewed and filed. The vendor's conformity note for the quarter wrote itself from those artefacts — inventory current, one exposure found and remediated, change evidenced — a paragraph assembled from the system rather than composed for the occasion.
Keep going
- Free SBOM + readiness pack — paste a manifest, get the CycloneDX SBOM, checklist and runbook.
- SBOM change-to-impact analysis — diff two releases before you ship.
- CRAClock pricing — Free, Pro $29/month and Team $79/month.
- All CRAClock guides — the full library for small EU software vendors.
- CRAClock console — products, scans, incidents, vault and trust pages.
- What is an SBOM and why does the CRA require one?
- How to generate an SBOM from requirements.txt
- What is a CycloneDX SBOM?
- Should devDependencies be included in an SBOM?
- How to diff two SBOMs between releases
- Why pin dependencies to exact versions for CRA compliance?
- Why your CRA evidence must match your SBOM
Frequently asked questions
Why does the SBOM strip the '=' from lockfile versions?
The lockfile records versions as '==2.32.0'; the component's version is '2.32.0'. Normalising keeps purls and version matching in the ecosystem's canonical form. It is a formatting translation, not a change of meaning — the pin's exactness is preserved.
Are develop-section packages included?
Yes, as with package.json's devDependencies: the develop set is parsed and inventoried, because the build and test toolchain is part of the product's real dependency surface. Scope in the source is how consumers grade its alerts.
My product uses both requirements.txt and Pipfile.lock. Which SBOM wins?
The one describing what actually installs. If the lockfile governs deployment, it is the inventory of record; the requirements view can still be useful diagnostically. What matters is that scans, diffs and citations consistently use the governing artefact.
Does a lockfile SBOM make pinning discipline unnecessary?
It relocates it: the resolver did the pinning, and the team's discipline becomes keeping the lockfile current and reviewing its changes. The checklist's computed pinning item will read perfectly — the human work moves to the diff review, where it belongs.
What if a package appears in both default and develop?
It is inventoried as the lockfile states it; duplicates across sections reflect the lockfile's own structure. The diff and scan machinery works on the component set as generated — another reason to read the first lockfile SBOM's summary with your own eyes before automating around it.
CRAClock prepares drafts and evidence; regulatory submission is always performed by you in ENISA's Single Reporting Platform. This guide is general information about the duties CRAClock supports, not legal advice.