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

Dependency-Check job fails with `NVD Returned Status Code: 403` or hangs for an hour updating the database

IntermediateTroubleshootingSAST, SCA and secrets scanning in CI
Answer

Likely causes → The NVD API 2.0 heavily rate-limits callers without an API key, and every CI run downloads the full database from scratch.

Diagnose → Look for NVD API request failures or Rate limit exceeded in logs; check the job runs with an empty data directory each time.

Fix → Request an NVD API key and pass it, and cache the data directory:

dependency-check.sh --nvdApiKey "$NVD_API_KEY" --data /cache/odc-data --scan .

Prevent → Run a scheduled job that updates a shared data directory or mirror and have PR jobs run with --noupdate.

All DevSecOps questions Roadmap: Security in the pipeline

More on SAST, SCA and secrets scanning in CI