Packages, versions and supply chain
Note for AI agents: This page is baseline guidance, not an exact prescription. Read it, tell your owner what applies to their project, and get their approval before you change anything. Your project's own rules take precedence. If something important for this project is missing here, suggest it to your owner.
For agents
- Every dependency is code you run. Pick packages from official sources, use stable releases, and lock versions.
- From class L: exact versions, images by digest, actions by full commit ID, and a 7-day wait for brand-new releases (critical security fixes excepted, with reason and end date).
- Report any exception to the owner.
Which class?
This topic has items from class S. The blocks below are cumulative: read up to your own class.
- S: 2 items
- M: 4 items
- L: 5 items
- XL: 2 items
Audit checklist
Every project
- Packages come from official sources, stable versions only
- What: Packages and versions are chosen from official sources; the current stable release is used, not alpha or beta.
- How to check: Read the dependency file for pre-release tags (alpha, beta, rc, next); check each package on its official registry page.
- Evidence: Dependency file without pre-release versions.
- Every package choice has an official source
- What: Package names, versions and install commands are confirmed on the official registry or project page, which also protects against look-alike package names.
- How to check: Compare each dependency’s name with its official page.
- Evidence: Checked list with links.
+ If it has users, personal data or API keys (M)
- One package manager, lockfile committed
- What: Exactly one package manager is used and enforced; the lockfile is committed; installs are done from the lockfile (for example
--frozen-lockfile). - How to check: Look for a lockfile in the repository and a rule that forbids other managers; check the CI and Docker install commands.
- Evidence: Lockfile path; install command lines.
- What: Exactly one package manager is used and enforced; the lockfile is committed; installs are done from the lockfile (for example
- Each language ecosystem has its lock rule
- What: Every language in the project locks dependencies in its own way (for example
go.modandgo.sumand a pinned toolchain in Go; a lock file in Python). - How to check: List the languages and find the lock mechanism for each.
- Evidence: Lock files per language.
- What: Every language in the project locks dependencies in its own way (for example
- Native and platform packages use the platform tool
- What: Packages tied to a platform or framework version are installed with the framework’s own command so the versions match.
- How to check: Read install notes and the version compatibility table of the framework.
- Evidence: Install commands in docs.
- Open source licenses are shown
- What: A published app or site shows the name and license of each library (for example Settings → Open source licenses), generated from the lockfile; forbidden licenses fail a check.
- How to check: Find the licenses screen or file and how it is generated; look for a license check in CI.
- Evidence: Generated license list; CI step.
+ If it has an admin panel, file uploads, many users or a store app (L)
- Exact versions, 7-day rule, pinned images and actions
- What: Dependencies use exact versions (no
^or~); newly published versions wait at least 7 days before install (critical security fixes excepted, with a written reason and end date); Docker images are pinned by digest and CI actions by full commit ID; major upgrades are done one by one. - How to check: Read dependency files, Dockerfile and CI files; check the release dates of recent upgrades.
- Evidence: Dependency file lines; upgrade notes with release dates.
- What: Dependencies use exact versions (no
- A software bill of materials exists
- What: A bill of materials (SBOM) listing all dependencies is generated for each release.
- How to check: Find the SBOM generation step and output file (SPDX or CycloneDX).
- Evidence: SBOM file or CI artifact.
- Security scan exceptions are recorded and expire
- What: Each silenced scan warning is a machine-readable record (id, package, versions, level) that expires when the package or severity changes, lasts at most 30 days, and is listed in reports.
- How to check: Find the exceptions file; check expiry fields; compare with the report.
- Evidence: Exceptions file with dates and reasons.
- Update bot only for security patches
- What: The update bot (for example Dependabot) is enabled only for security updates, one grouped proposal per ecosystem.
- How to check: Read the bot configuration file.
- Evidence: Configuration file lines.
- Known vulnerable dependencies are tracked
- What: Dependencies are scanned for known vulnerabilities on a schedule and before release, and findings are triaged by severity.
- How to check: Run the ecosystem audit command (for example
npm audit,pip-audit,govulncheck) and read the CI scan step. - Evidence: Latest scan output; triage notes.
+ If it targets millions of users (XL)
- Single version catalog and install-script approval
- What: All versions live in one catalog file; packages that run install scripts need approval; the vulnerability scan fails on medium and above; a global version override is written per major line.
- How to check: Read the catalog file and package manager settings.
- Evidence: Catalog file; scan configuration.
- Forced version overrides are per major line
- What: When a sub-package version is forced for security, a separate fix is written for each major line so consumers are not moved across a major version silently.
- How to check: Read override settings in the package manager file.
- Evidence: Override entries with version ranges.
Common mistakes
- Installing a look-alike package with a similar name.
- Using
^or~ranges in a project that needs exact versions. - Installing a version published an hour ago.
- Updating several major versions at once.
- Silencing a vulnerability warning with no expiry or reason.
- Running install scripts of unknown packages without approval.
- Two package managers in one repository.
- Forcing a sub-package version across major lines with one selector.
Sources
- Software Supply Chain Security Cheat Sheet — OWASP Cheat Sheet Series
- Vulnerable Dependency Management Cheat Sheet — OWASP Cheat Sheet Series
- NPM Security Cheat Sheet — OWASP Cheat Sheet Series
- Concise Guide for Developing More Secure Software — OpenSSF
- SLSA: Supply-chain Levels for Software Artifacts — OpenSSF
- OpenSSF Scorecard — OpenSSF
- SPDX — Linux Foundation
- Secure Software Development Framework (SSDF) — NIST
- Dependabot security updates — GitHub Docs
- Dependabot options reference — GitHub Docs
- Secure use reference (Actions) — GitHub Docs
- Dependency graph — GitHub Docs
- Building best practices — Docker Docs
- Pro Build Guide v1.2: compiled team practices — Pro Build Guide