Description
Dependency caches are keyed on the lockfile hash. Builds of untrusted changes (external contributions, forks) cannot write to caches read by default-branch or release builds.
Rationale
A poisoned cache lets an attacker who can run one build insert packages into every following build, bypassing lockfile and registry controls.
Impact
Slightly lower cache hit rates.
Audit
- Review cache configuration of pipelines.
- Check cache keys include the lockfile hash and that untrusted builds cannot write to trusted caches.
Automated: every check must pass. Scanners report each check by its id.
postmortem
GitHub Actions cache keys and pull_request_target; other CI by hand
command: postmortem harden --json
control: CB-DEP-CI-004
coverage: partial
Remediation
- Key caches on the lockfile hash.
- Give untrusted builds read-only or separate caches.
References
- OWASP Top 10 CI/CD Security Risks OWASP, guide, accessed 2026-10-16
Mappings
| Framework | ID | Relation | Note |
|---|---|---|---|
| NIST SP 800-53 Rev. 55.1.1 | SI-7 | related |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
| Taxonomy | ID | Note |
|---|---|---|
| MITRE ATT&CK | T1195.001 |
Related controls
- related
CB-DEP-LOCK-003Verify package integrity against recorded hashes
People and lifecycle
| Authors | Alice |
| Introduced in | v1.0.0 |
| Created, updated | 2026-10-16, 2026-10-16 |