Security with SonarQube is mostly correct, boring defaults applied consistently. Here is the short list that removes most of the risk.
Safe defaults
- Treat vulnerabilities and hotspots as gating, not advisory
- Keep tokens scoped and rotate them
Wire it into the pipeline
Scan and fail on the Quality Gate.
- uses: sonarsource/sonarqube-scan-action@v3
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- uses: sonarsource/sonarqube-quality-gate-action@v1Reinforcing habits
- Enforce a 'new code' Quality Gate on every PR
- Wire coverage reports into the scan
- Triage security hotspots, don't blanket-ignore them
Want senior help putting SonarQube to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.