Third-party package dependencies · Dependency vetting

Ship only production dependencies

When it fails: Development and test dependencies are installed in production artifacts.

CB-DEP-VET-004lowdraftpartialprofile baseline

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

Description

Development, test and build-only dependencies are declared separately from runtime ones, and production artifacts (images, packages, bundles) contain only runtime dependencies.

Rationale

Development dependencies are often the largest part of the tree. Shipping them grows the attack surface of the running system for no benefit.

Impact

Dependency groups must be maintained correctly.

Audit

  1. Check that manifests separate runtime and development dependencies.
  2. Inspect a production artifact and check that development dependencies are absent.

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

postmortem

dev tools in production deps; the last Dockerfile stage omits dev deps

command: postmortem harden --json
control: CB-DEP-VET-004
coverage: partial

Remediation

  1. Move development dependencies to the development group.
  2. Install only runtime dependencies in the production build step.

References

Mappings

FrameworkIDRelationNote
NIST SP 800-53 Rev. 55.1.1CM-7related

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

People and lifecycle

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