Third-party package dependencies · Locking & integrity

Allow only approved sources in lockfiles

When it fails: A lockfile change can introduce packages from an unexpected source.

CB-DEP-LOCK-004mediumdraftpartialprofile baseline

Status draft: not part of any release yet, may still change.

Description

An automated check on every change rejects lockfiles that resolve a package from a host, scheme or source type other than the approved registries.

Rationale

Lockfiles are long and rarely read in review. Swapping a resolved URL to an attacker's host is an easy way to hide a malicious package in an otherwise harmless change.

Impact

The check must be updated when a registry URL changes.

Audit

  1. Check that a lockfile source check runs on every change request.
  2. Check that it fails on a non-approved host or a non-registry source.

Automated: every check must pass. Scanners report each check by its id.

postmortem

every lockfile source is an approved registry ([harden] registries)

command: postmortem harden --json
control: CB-DEP-LOCK-004
coverage: auto

Remediation

  1. Add a check to the pipeline that parses each lockfile and compares every resolved source with the list of approved registries.

References

Mappings

FrameworkIDRelationNote
NIST SP 800-53 Rev. 55.1.1SR-3related

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

TaxonomyIDNote
MITRE ATT&CKT1195.001

People and lifecycle

AuthorsAlice
Introduced inv1.0.0
Created, updated2026-10-16, 2026-10-16