Interview › Security & DevSecOps
How do you handle false positives in SonarQube? [Basic]
Answer
I handle false positives by validating the finding, documenting why it is not exploitable, marking it appropriately in SonarQube, and tuning rules only when the pattern is repeatedly noisy. I avoid blanket suppression because that hides real issues.
Technical explanation
False positives should be reviewed by someone with enough context to understand the code path and threat model.
Use issue workflow states, comments, or targeted suppression with justification rather than disabling rules globally.
If a rule creates excessive noise across many teams, adjust the quality profile centrally and communicate the reason.
Hands-on example
Hands-on: for a flagged SQL injection that uses a safe query builder, attach evidence in the issue, mark it false positive or accepted as configured, and add a unit test showing parameter binding. Keep the rule enabled for raw SQL concatenation cases.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Security & DevSecOps interview questions
- What is a SonarQube hotspot, and how is it different from a vulnerability? [Basic]
- What is the difference between SonarQube and SonarCloud? [Basic]
- How does SonarQube measure code coverage, and does it run your tests? [Basic]
- What is technical debt in SonarQube, and how is it estimated? [Basic]
- What metrics does SonarQube track (coverage, duplication, code smells, bugs, vulnerabilities)? [Basic]
- What does 'clean as you code' mean in SonarQube, and why focus on new code? [Basic]
- What is the difference between agent-based and agentless cloud security scanning? [Basic]
- What is the difference between a quality gate and a quality profile in SonarQube? [Basic]