lockfile
A file that records the exact version of every dependency, including transitive ones, so every install gets the same set.
In more detail
Committing the lockfile means every developer machine and build server installs identical dependencies, and scanners can see exactly what is installed. Examples include package-lock.json for npm and pnpm-lock.yaml for pnpm; in Python, pip-compile can produce a fully pinned requirements.txt. Installing with a frozen lockfile fails if the lockfile and the dependency list disagree, instead of silently changing versions.
Example
pnpm install --frozen-lockfileRelated terms
- pinning — Fixing an exact version or digest of something you depend on so it cannot change without you noticing.
- pip-compile — A pip-tools command that resolves a short list of wanted packages into a fully pinned requirements.txt with every dependency.
- software composition analysis — Finding the open-source packages in your software and checking their exact versions against known vulnerability advisories.
- package.json — The JSON file at the root of every JavaScript package that records its name, version, dependencies, entry points and other settings.
- dependency — Anything a program needs in order to work, such as a library, a tool or another service.
- build cache — Saved results of earlier build steps that a build tool, such as Docker, reuses when nothing a step depends on has changed.
- npm — The package manager that comes with Node.js, plus the public registry where JavaScript packages are published.
- reproducible build — A build that produces the same result every time from the same inputs.
- --require-hashes — A pip option that refuses to install anything not pinned to one version and matching a hash recorded in the requirements file.
- transitive dependency — A package your code needs only because one of your own dependencies needs it.
Taught in
- Software Composition Analysis with Trivy — Cloud Security & DevSecOps Engineering
- Supply Chain Security: SBOMs & Cosign Signing — Cloud Security & DevSecOps Engineering
- Continuous IaC Drift Detection & State Protection — Cloud Security & DevSecOps Engineering
- Monorepo Architecture: Workspaces & Turborepo — Production Full-Stack Engineering
- Containerization Architecture: Multi-Stage Dockerfiles — Production Full-Stack Engineering
- Containerized Deployment: Multi-Stage Docker Builds — Next.js 15 & Modern App Router Architecture
- Dependency Risk And Typosquatting — Application Security & Threat Modeling for Engineers
- Lockfiles And Reproducible Builds — Application Security & Threat Modeling for Engineers
- Software Bill Of Materials — Application Security & Threat Modeling for Engineers
- Image Scanning And Trivy — Application Security & Threat Modeling for Engineers