Auditing Dependency Risk
Core principle
A dependency alert is evidence to investigate, not a complete risk decision. Prioritize by what is actually installed, reachable, privileged, exposed, and fixable in this application.
Scope rule
Audit only the project's authorized dependency graph, build chain, repositories, registries, and CI configuration. Prefer lockfile/SBOM evidence and the package ecosystem's established audit tooling. Do not execute untrusted package scripts merely to inspect a dependency.
Workflow
- Identify the dependency sources of truth: manifests, lockfiles, workspace configuration, containers/base images where relevant, generated SBOMs, package registries, and CI install commands.
- Separate direct, transitive, development, build-time, and runtime dependencies. Record where each high-risk component is used rather than treating the entire graph as equally exposed.
- Run the ecosystem's existing audit/advisory tooling when available and capture exact package, installed version, advisory/CVE, affected range, fixed range, and dependency path.
- Triage each material advisory by:
- exploit preconditions and vulnerable feature/path;
- runtime versus development/build exposure;
- data/privilege/network access available to the component;
- whether untrusted input can reach the vulnerable behavior;
- known fix or mitigation availability.
- Review provenance and integrity controls: lockfile enforcement, immutable/pinned CI installs, registry configuration, package name/source ambiguity, checksum/signature/provenance support, and unexpected install scripts.
- Review dependency hygiene without equating age with vulnerability. Flag abandoned or opaque components when lack of maintenance materially increases future response risk.
- Choose the smallest safe remediation: patch/minor upgrade, dependency override, vulnerable feature removal, configuration mitigation, replacement, or temporary documented acceptance. Avoid blind major-version upgrades.
- Verify after remediation by regenerating the dependency graph/audit output and running the affected application's tests/build/security checks.
- Record residual risk and a re-check trigger for accepted findings, especially when no fixed version exists.
Finding format
For each material dependency risk, capture:
- package and resolved version;
- direct/transitive path and usage context;
- advisory/source;
- vulnerable behavior and reachability evidence;
- application impact and privileges;
- fix/mitigation options and compatibility risk;
- verification evidence;
- residual risk and owner.
Quality checks
Do not:
- equate CVSS alone with application risk;
- mark a dependency safe only because it is transitive or dev-only;
- upgrade broad portions of the graph without proving necessity;
- suppress advisories without documenting reachability and residual risk;
- treat a clean vulnerability scan as proof that the supply chain is trustworthy.
Verification
After the chosen remediation, confirm the vulnerable resolved version/path is gone or mitigated, the lockfile is deterministic, and the application's relevant tests/build still pass. Keep evidence of any intentionally accepted risk.
References
1---2name: auditing-dependency-risk3description: Use when a project needs software-supply-chain or third-party dependency risk assessed from manifests, lockfiles, advisories, provenance, maintenance signals, and realistic runtime exposure before upgrades or release.4---56# Auditing Dependency Risk78## Core principle9A dependency alert is evidence to investigate, not a complete risk decision. Prioritize by what is actually installed, reachable, privileged, exposed, and fixable in this application.1011## Scope rule12Audit only the project's authorized dependency graph, build chain, repositories, registries, and CI configuration. Prefer lockfile/SBOM evidence and the package ecosystem's established audit tooling. Do not execute untrusted package scripts merely to inspect a dependency.1314## Workflow151. Identify the dependency sources of truth: manifests, lockfiles, workspace configuration, containers/base images where relevant, generated SBOMs, package registries, and CI install commands.162. Separate direct, transitive, development, build-time, and runtime dependencies. Record where each high-risk component is used rather than treating the entire graph as equally exposed.173. Run the ecosystem's existing audit/advisory tooling when available and capture exact package, installed version, advisory/CVE, affected range, fixed range, and dependency path.184. Triage each material advisory by:19 - exploit preconditions and vulnerable feature/path;20 - runtime versus development/build exposure;21 - data/privilege/network access available to the component;22 - whether untrusted input can reach the vulnerable behavior;23 - known fix or mitigation availability.245. Review provenance and integrity controls: lockfile enforcement, immutable/pinned CI installs, registry configuration, package name/source ambiguity, checksum/signature/provenance support, and unexpected install scripts.256. Review dependency hygiene without equating age with vulnerability. Flag abandoned or opaque components when lack of maintenance materially increases future response risk.267. Choose the smallest safe remediation: patch/minor upgrade, dependency override, vulnerable feature removal, configuration mitigation, replacement, or temporary documented acceptance. Avoid blind major-version upgrades.278. Verify after remediation by regenerating the dependency graph/audit output and running the affected application's tests/build/security checks.289. Record residual risk and a re-check trigger for accepted findings, especially when no fixed version exists.2930## Finding format31For each material dependency risk, capture:32- package and resolved version;33- direct/transitive path and usage context;34- advisory/source;35- vulnerable behavior and reachability evidence;36- application impact and privileges;37- fix/mitigation options and compatibility risk;38- verification evidence;39- residual risk and owner.4041## Quality checks42Do not:43- equate CVSS alone with application risk;44- mark a dependency safe only because it is transitive or dev-only;45- upgrade broad portions of the graph without proving necessity;46- suppress advisories without documenting reachability and residual risk;47- treat a clean vulnerability scan as proof that the supply chain is trustworthy.4849## Verification50After the chosen remediation, confirm the vulnerable resolved version/path is gone or mitigated, the lockfile is deterministic, and the application's relevant tests/build still pass. Keep evidence of any intentionally accepted risk.5152## References53- OWASP Top 10:2025, A03 Software Supply Chain Failures: https://owasp.org/Top10/2025/54- OWASP Software Supply Chain Security Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Software_Supply_Chain_Security_Cheat_Sheet.html55- OWASP Application Security Verification Standard 5.0.0: https://owasp.org/www-project-application-security-verification-standard/