If your team consumes packages and does not publish any, focus on what enters your builds: pin sources, commit lockfiles, review dependency changes, delay brand new releases, limit what install steps can run and prepare a response. Ten checks cover most of the exposure.
The checklist
- Know your sources. Write down every registry and mirror your builds can reach. Pip's documentation states that when several indexes are configured there is no priority among them, and the best matching version is chosen. More sources mean more ways to fetch the wrong package.
- Commit lockfiles and install from them in CI, so a build fetches exactly what you reviewed.
- Use hash checking where the tool supports it. Pip's secure installs guide describes hash-checking mode with the require-hashes option as protection against remote tampering.
- Review dependency changes in every pull request. GitHub's dependency review shows added, removed and updated dependencies, release dates and known vulnerabilities.
- Wait a short time before adopting new versions. Pnpm defaults its minimum release age to one day, and Dependabot applies a default three day cooldown to version updates, but not to security updates.
- Limit install-time code. The npm ignore-scripts option stops scripts in package.json files from running, and pnpm v10 disables automatic postinstall scripts in dependencies.
- Keep an inventory (SBOM) of direct and transitive packages.
- Watch for changes after the scan: new advisories, new publishers, removed versions.
- Separate build and deploy credentials, so an install step cannot reach production keys.
- Rehearse the response. Know how to find which builds used a bad version and how to rebuild.
Trade-offs to expect
Locking and delaying slow you down a little. Install script limits can break packages that need a build step, so list the ones you trust explicitly. Pnpm recommends allowing builds only for named dependencies.
How to roll it out
Do not try all ten in a week. Pick three: lockfiles with frozen installs, dependency review on pull requests and the delay. They cost little and cover several entry points. Add the rest over a quarter.
Try it yourself
Click through it at your own pace, or open it full screen. Watch how a pull request is held until a policy check passes.
Where Safeguard fits
Safeguard covers SBOM and dependency scanning, policies and gates for pull requests, and continuous monitoring, which map to steps four, seven and eight. A free scan will show your current inventory.
Quick check
Is a lockfile enough on its own?
No. It fixes what you install, but the first version you lock could already be bad. Pair it with review and delay.
Does a delay apply to security fixes?
Dependabot's default cooldown does not apply to security updates. Apply security fixes promptly after a quick check.
Sources
- pip: Getting started and index options
- pip: Secure installs
- pnpm: Mitigating supply chain attacks
- GitHub Docs: Dependabot options reference
- GitHub Docs: Dependency review
- npm Docs: npm install, ignore-scripts
Last reviewed: 19 October 2026.