Guide · CRAClock · EU Cyber Resilience Act
Why pin dependencies to exact versions for CRA compliance?
By the Ingenious AI team · Published 14 November 2026 · Reviewed 14 November 2026
Short answer: Because matching is exact or it is nothing. OSV vulnerability records describe affected version ranges; checking your product means comparing your components' exact versions against them. A dependency declared as a range (or not pinned at all) has no exact version to compare — CRAClock's SBOM records it without one, its scans cannot match it, and the readiness checklist counts it against the pinning item. Pinning converts your inventory from a list of intentions into a list of facts, and it is the cheapest security upgrade in this entire programme.
Generate your free SBOM + readiness pack → Compare two releases free · See pricing
What is dependency pinning?
Dependency pinning is the practice of declaring each dependency at one exact version — == in requirements.txt, an exact version string in package.json, or a resolver-locked version in Pipfile.lock — rather than a range of acceptable versions. For CRA purposes pinning is what makes the SBOM a factual inventory and live vulnerability matching possible. CRAClock surfaces it directly: the free job's summary counts pinned components, and the readiness checklist carries pinning as a computed item, done only when every component carries an exact version.
The matching argument, in one paragraph
A vulnerability record says: versions of component X before 2.32.3 are affected. Your scanner can use that sentence only if it knows your version of X. If your manifest says 'X, something in the 2.x line', the scanner faces a set, not a version, and any answer it gives is a guess wearing a result's clothes. Multiply by every unpinned component and the scan's silence becomes meaningless — it might mean 'not affected' or 'not checkable', and a security process that cannot distinguish those two states has a hole exactly where it believes it has a control.
Pinning removes the ambiguity at the source. The manifest states the version; the SBOM records it; the match is a comparison of facts. This is why pinning appears in a compliance checklist at all: it is not tidiness, it is the precondition for the vulnerability-handling duty to function.
Reproducibility: the second dividend
Pinned dependencies make builds reproducible: the same manifest yields the same component set on every machine and every rebuild. That property pays outside compliance — debugging ('works on my machine' shrinks when the machines provably run identical components), incident analysis (the version in production is a fact, not a reconstruction), and change control (a version changes only when someone changes the pin, an act that shows in review).
The CRA angle sharpens it further: when a vulnerability is announced, the question 'which of our releases contain the affected version?' is answerable from pinned SBOMs by inspection. From unpinned history it is answerable, if at all, by archaeology across build logs. Pinning is therefore both a forward control (matching) and a backward one (scoping), and the same discipline serves both.
Pinning per ecosystem
In requirements.txt, pin with == and generate the file from the environment that runs (the freeze discipline), so pins describe a tested reality. In package.json, prefer exact version strings for runtime dependencies, or let the lockfile be the resolution of record and align the manifest to it; remember the SBOM claims a version only for exact specifiers. In Pipfile.lock, the resolver has already pinned everything — the discipline there is keeping the lock current and reviewing its diffs.
Each ecosystem's workflow differs, but the invariant is one sentence: for every component, somewhere in your source of truth, exactly one version is stated. Audit against that sentence. Any component failing it is a named, countable gap — CRAClock's summary literally counts them — and closing the count to zero is a finite, mechanical project, usually measured in an afternoon.
What pinning is not
Pinning is not freezing forever. Pins are meant to move — deliberately, in reviewed steps, with the SBOM diff showing the movement and scans checking the destination version before it ships. The anti-pattern pinning opposes is not change but unrecorded change: the range that admits a new version silently on the next install, altering the product's risk without altering any document. A pinned product changes its components the way it changes its code: on purpose, in the open.
Nor is pinning a substitute for updating. A pinned vulnerable version is precisely known and precisely vulnerable; the match will say so, which is the point. Pinning gives you the information; the remediation process — prioritised by the diff and scan machinery — does the fixing. Teams sometimes fear pinning because it makes exposure undeniable; that discomfort is the control working.
Pinning as a scored, visible habit
What gets measured gets maintained, and pinning is unusually measurable: parsed components, pinned components, ratio. CRAClock puts the number in the free job's summary and the checklist's computed item, so drift is visible the moment a new unpinned dependency lands. The team rule that sustains it is one line long — no dependency merges unpinned — enforced by the same review that reads the SBOM diff.
Close the loop commercially as well: the pinning ratio is a sentence customers understand ('58 of 58 components carry exact versions') and it belongs in the evidence story the trust page summarises. Few compliance properties are simultaneously a security control, an engineering virtue and a procurement answer; pinning is all three, which is why this programme returns to it from so many directions.
Your 5-action checklist
- Run the free CRAClock job and read your pinning gap as a number: parsed components minus pinned components.
- Pin every gap at the version you actually run — == in requirements.txt, exact strings in package.json, resolver output in the lockfile.
- Regenerate the SBOM and confirm the ratio reaches 100%; investigate any component that still lacks a version.
- Add the team rule: no new dependency merges unpinned, checked in the same review as the SBOM diff.
- Re-check the ratio monthly; a falling ratio is drift, and drift is the earliest warning the inventory can give.
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: from 44 of 61 to 61 of 61
A fictional vendor's first SBOM counted 61 components with 44 pinned — a 72% ratio nobody had known they had. The 17 gaps clustered exactly where intuition would not have looked: not in the carefully managed core libraries, but in utilities added quickly during a launch week, each declared with a friendly range and forgotten. The scan that week could speak about 44 components; about the other 17 it could only be silent, and the team realised their 'clean scans' had always carried that silent asterisk.
Pinning the 17 took one engineer one afternoon, working from the running environment's actual versions. The regenerated SBOM read 61 of 61, the checklist's pinning item flipped to done with that evidence line, and the next scan — the first complete one in the product's history — found 1 genuinely affected component among the formerly invisible 17. The team pinned that lesson next to the number: the gap had not been hypothetical.
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?
- What is the risk of unpinned dependencies?
- How to generate an SBOM from requirements.txt
- How to generate an SBOM from package.json
- How to generate an SBOM from Pipfile.lock
- What should a CRA readiness checklist include?
- How does live CVE monitoring work for a small vendor's products?
Frequently asked questions
Does pinning mean we can never upgrade?
The opposite: pins make upgrades deliberate and reviewable. A pin changes in a commit, the SBOM diff shows it, scans check the new version. What pinning ends is silent change — versions drifting in through ranges without a decision or a record.
We inherited a manifest full of ranges. Where do we start?
From the running environment: capture the versions actually installed (freeze/lock), write them back as exact pins, regenerate the SBOM, and let the first complete scan triage what it finds. The order matters — pin the truth first, then remediate from facts.
Is a lockfile enough if the manifest still has ranges?
For inventory purposes, the lockfile is a valid source of exact versions — CRAClock parses Pipfile.lock as a first-class source. The remaining risk is process: if installs ever bypass the lockfile, ranges rule again. Aligning manifest and lockfile removes that footgun.
Why does the checklist compute pinning instead of asking?
Because it can be computed from the SBOM, and computed statuses cannot be flattered. The vendor answers only what the tool cannot see (accounts, processes); everything the artefact proves, the artefact states. That separation is what makes the checklist's score quotable.
Do development dependencies need pinning too?
They are held to the same standard in the inventory: a devDependency without an exact version is equally unmatchable, and build-chain exposure is real exposure. The scope label grades their urgency; it does not exempt them from precision.
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.