Description
Every application, service or other deployable artifact commits the lockfile produced by its package manager, listing the exact version of every direct and transitive dependency.
Libraries published for others to consume may leave the lockfile out of the published package, but should still commit it for their own tests and builds.
Rationale
Without a lockfile, the dependency tree is decided at build time by whatever the registry serves that minute. Two builds of the same commit can differ, and a new malicious release is picked up automatically.
Impact
Lockfile changes must be reviewed like code. Merge conflicts in lockfiles are more frequent.
Audit
- List deployable projects.
- Check each one has a committed, up-to-date lockfile for every ecosystem it uses.
Automated: every check must pass. Scanners report each check by its id.
postmortem
every manifest has its lockfile, committed
command: postmortem harden --json
control: CB-DEP-LOCK-001
coverage: auto
Remediation
- Generate the lockfile with the package manager and commit it.
- Remove lockfiles from ignore rules.
References
- Package Manager Best Practices OpenSSF, guide, accessed 2026-10-16
- SLSA specification v1.0 OpenSSF, standard, accessed 2026-10-16
Mappings
| Framework | ID | Relation | Note |
|---|---|---|---|
| NIST SP 800-53 Rev. 55.1.1 | CM-2 | related | |
| NIST SP 800-53 Rev. 55.1.1 | SR-4 | related |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
| Taxonomy | ID | Note |
|---|---|---|
| MITRE ATT&CK | T1195.001 | |
| Common Weakness Enumeration | CWE-1357 |
Related controls
- related
CB-DEP-LOCK-002Install from the lockfile without modifying it in builds
People and lifecycle
| Authors | Alice |
| Introduced in | v1.0.0 |
| Created, updated | 2026-10-16, 2026-10-16 |