Interview Prep/DevSecOps/SAST, SCA and secrets scanning in CI

`npm audit` fails the build with a critical in a devDependency used only for tests

BeginnerTroubleshootingSAST, SCA and secrets scanning in CI
Answer

Likely causes → npm audit checks all dependencies by default, including dev tooling that never ships to production.

Diagnose →

npm audit --omit=dev --audit-level=high
npm ls <package>

Fix → Gate on production deps: npm audit --omit=dev --audit-level=high. Still update the dev package when a fix exists (npm update <pkg> or an overrides entry).

Prevent → Separate gates: block on prod-reachable highs, report dev-only findings as warnings. Let Renovate keep dev tooling current.

All DevSecOps questions Roadmap: Security in the pipeline

More on SAST, SCA and secrets scanning in CI