Total dependency count is reasonable for project size
Why it matters
Every production dependency is an additional attack surface: a potential CVE vector, a maintenance obligation, an install-time script that executes on every developer machine and CI run, and an entry in your lock file that must be audited. SSDF PW.4 requires that the software composition be evaluated; an excessive dependency count means you have more components to track, more advisories to monitor, and more attack surface to defend than the project's functionality justifies. CWE-1357 scales with the number of third-party components you rely on. AI coding tools in particular routinely install duplicate-purpose packages — both axios and node-fetch, both dayjs and date-fns — because they generate installs session-by-session without a holistic view of what's already present.
Severity rationale
Medium because an inflated dependency count multiplies audit overhead, attack surface, and install-time risk proportionally — each unnecessary package is a supply chain vector that provides no value.
Remediation
Audit for unused and redundant dependencies:
npx depcheck
For each flagged package, verify it is genuinely unused before removing. Common AI-generated redundancies:
- Both
axiosandnode-fetch— use nativefetch(Node 18+) - Both
dayjsanddate-fns— pick one uuidwhencrypto.randomUUID()is available natively (Node 14.17+)
Remove confirmed redundancies with npm uninstall and commit the updated package.json and lock file.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Dependency & Supply Chain Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-1357 — Reliance on Insufficiently Trustworthy Component
- ssdf:800-218 · PW.4 — Reuse Existing, Well-Secured Software
Taxons
History
- 2026-04-18·v1.0.0·Initial import from dependency-supply-chain·automated