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

`npm audit fix --force` "fixed" the CVE and broke the app at runtime

IntermediateTroubleshootingSAST, SCA and secrets scanning in CI
Answer

Likely causes → --force installs semver-major upgrades of direct dependencies to reach a patched transitive version, bringing breaking API changes.

Diagnose →

git diff package.json package-lock.json
npm ls vulnerable-pkg

Fix → Revert, then target only the vulnerable transitive package with overrides:

"overrides": { "semver": "^7.5.4" }

Run the test suite and npm audit again.

Prevent → Never run audit fix --force in CI. Use Renovate/Dependabot PRs that go through tests.

All DevSecOps questions Roadmap: Security in the pipeline

More on SAST, SCA and secrets scanning in CI