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

SonarQube Quality Gate fails on "Security Hotspots Reviewed is less than 100%" but there are no vulnerabilities

BeginnerTroubleshootingSAST, SCA and secrets scanning in CI
Answer

Likely causes → Hotspots are not bugs; they are code that needs a human review (crypto use, regexes, cookies). The default "Sonar way" gate requires all new hotspots reviewed.

Diagnose → Project → Security Hotspots → filter "New code", status "To review". Or via API:

curl -su "$SONAR_TOKEN:" "$SONAR_HOST/api/hotspots/search?projectKey=myapp&status=TO_REVIEW&inNewCodePeriod=true"

Fix → Review each and mark Safe, Fixed or Acknowledged with a comment. Do not lower the gate to make it green.

Prevent → Make hotspot review part of PR review; a security champion triages hotspots weekly.

All DevSecOps questions Roadmap: Security in the pipeline

More on SAST, SCA and secrets scanning in CI