Install dependencies in a step without secrets

When it fails: Dependencies are installed in an environment that holds secrets. A malicious package can read deploy keys, cloud credentials and publish tokens as soon as it is installed.

CB-DEP-CI-001highdraftpartialprofile baseline

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

Description

The pipeline step that downloads and installs dependencies has no access to deployment credentials, cloud credentials, signing keys or publish tokens. Those are only given to later steps that need them.

Rationale

Install-time code, and test code from dependencies, run with whatever the environment holds. Separating installation from secrets limits what a malicious package can steal.

Impact

Pipelines may need to be split into several jobs or steps with different secrets.

Audit

  1. Review the environment of install steps in each pipeline.
  2. Check that no secret other than read-only registry access is available.

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

postmortem

GitHub Actions install steps vs secrets in their env; other CI by hand

command: postmortem harden --json
control: CB-DEP-CI-001
coverage: partial

Remediation

  1. Move secrets to the steps that need them.
  2. Split installation and deployment into separate jobs if secrets are job-wide.

References

Mappings

FrameworkIDRelationNote
NIST SP 800-53 Rev. 55.1.1AC-6related
NIST SP 800-53 Rev. 55.1.1SA-15related

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

Threats mitigated

  • related CB-DEP-EXEC-001 Block install-time scripts except for an allowlist
  • related CB-DEP-CI-002 Use read-only registry credentials in pipelines

People and lifecycle

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