SonarQube FAQs for DevOps Interviews: Quick Answers (2027)
44 short SonarQube FAQ answers for DevOps interviews: terms, quality gates, new code, scanner properties, CI commands and admin basics in one cheat sheet.
SonarQube FAQs in a DevOps interview are quick, definition-style questions: what is a quality gate, what counts as new code, which property sets the project key, how does a pipeline wait for the gate. This cheat sheet gives 44 short answers, plus tables of terms, properties and commands, checked against the SonarQube Server 2026.5 documentation.
Use it the night before an interview as a revision sheet. For deeper design and troubleshooting answers see our SonarQube questions for experienced engineers, and for the full question bank see the 90+ SonarQube interview questions guide.
Key takeaways
- Know the vocabulary cold: issue, bug, vulnerability, code smell, Security Hotspot, rule, quality profile, quality gate, new code, coverage, duplication and technical debt.
- A quality gate is a set of conditions on metrics. If any condition fails, the gate fails.
- The Sonar way gate has four conditions on new code and is the default. It is read-only.
- SonarQube does not run your tests. It imports coverage reports your build already produced.
- Keep three names apart: SonarQube Server (self-managed), SonarQube Cloud (hosted by Sonar) and SonarQube for IDE (editor plugin).
- Pipelines pass or fail on the gate only if you ask them to wait for it.
Terms in one table
| Term | One-line meaning |
|---|---|
| Rule | A check about code, for example "do not leave a resource unclosed". Rules belong to a language. |
| Issue | A place where code breaks a rule. |
| Bug | An issue that is likely to cause wrong behaviour at run time (a reliability problem). |
| Vulnerability | An issue that a person with bad intent could exploit (a security problem). |
| Code smell | A maintainability issue: code that works but is hard to read or change. |
| Security Hotspot | Security-sensitive code that a developer must review to decide if it is safe. The 2026.5 documentation says hotspots are being phased out. |
| Quality profile | The set of rules active for a language in a project. |
| Quality gate | The pass or fail rule for a project, built from conditions on metrics. |
| New code | Code added or changed recently, as defined by the new code definition. |
| Technical debt | The estimated time to fix all maintainability issues. |
| Coverage | The share of lines or conditions run by tests, read from a report. |
| Duplication | The share of lines that repeat other lines. |
Basics (questions 1 to 12)
1. What is SonarQube?
A platform that analyses source code for bugs, vulnerabilities, code smells, coverage and duplication, and reports a pass or fail result through quality gates.
2. What is static analysis?
Checking code without running it. SonarQube reads the source and applies rules, which is why it can run on every commit before an application is deployed anywhere.
3. What is the difference between SonarQube Server, Cloud and for IDE?
Server is installed and run by you, in editions Developer, Enterprise and Data Center, with a free Community Build as the entry level. Cloud is a managed service run by Sonar. SonarQube for IDE is an editor plugin that shows issues while you type.
4. What are the three software qualities?
Security, reliability and maintainability. Each rule is linked to one or more of them.
5. What is MQR mode?
Multi-quality rule mode. The documentation says it gives a separate severity to a rule for each software quality it affects, so an issue shows its impact on security, reliability and maintainability separately. The older view is called the Standard Experience and uses types such as bug, vulnerability and code smell.
6. What are the severity levels in MQR mode?
Blocker, High, Medium, Low and Info.
7. How are reliability ratings calculated?
Under the Standard Experience grid, A means no bugs, B at least one minor bug, C at least one major, D at least one critical and E at least one blocker bug. The security rating uses the same shape for vulnerabilities.
8. What is technical debt?
The sum of the estimated remediation effort, in minutes, for all maintainability issues. SonarQube also reports a technical debt ratio, which compares that cost with the cost of developing the code.
9. What languages does SonarQube support?
Many, including Java, C#, Python, JavaScript, TypeScript, PHP, Go, Kotlin, Ruby and Scala. The documentation marks some languages, such as ABAP, as available only in commercial editions, so check the language page for your edition.
10. What does a SonarQube analysis consist of?
A scanner reads the code on the CI machine and builds a report. It sends the report to the server. The server's Compute Engine processes the report and stores the results in the database.
11. What port does SonarQube use?
The web interface listens on port 9000 by default. Put a reverse proxy with TLS in front of it in production.
12. What is the default database for a trial?
An embedded H2 database. The documentation recommends it only for tests and trials. Use PostgreSQL, SQL Server or Oracle in production.
Quality gates, profiles and new code (questions 13 to 24)
13. What is a quality gate condition?
A metric, a comparison operator and an error value. Example: Blocker issues, greater than, 0. In words, no blocker issues.
14. What are the Sonar way conditions?
No new issues, all new Security Hotspots reviewed, coverage on new code at least 80.0 percent, and duplication on new code at most 3.0 percent.
15. Can you edit the Sonar way gate?
No, it is read-only. Create a custom gate with the Administer Quality Gates permission and change the thresholds there.
16. Which conditions apply on a pull request?
Only the conditions on new code, because a pull request is judged by what it changes against the target branch.
17. What are the four new code definition options?
Previous version, Number of days, Specific analysis and Reference branch.
18. What is the default new code definition?
Previous version at the global level. An administrator with the Administer System permission can change it to Number of days.
19. How many days can the Number of days option use?
The default is 30 and the maximum is 90.
20. What is a quality profile?
The list of active rules for one language. The built-in profiles are Sonar way core, extended and comprehensive, and Sonar way core is the default.
21. What do the Sonar way core rules cover?
Security rules, medium and higher severity reliability rules, and blocker maintainability rules, according to the built-in profiles page. Extended and comprehensive add lower severities.
22. What are the Security Hotspot statuses?
To review, Acknowledged, Fixed and Safe. A new hotspot starts as To review.
23. Why do some teams keep two gates?
Different projects need different standards. The documentation gives examples such as different coverage targets for web applications and Java applications, stronger rules for internal frameworks, and a gate for AI-generated code.
24. What is the fudge factor?
A default rule that ignores duplication and coverage conditions until a change has at least 20 new lines (or 20 new lines to cover). It avoids a failing gate on a three-line change.
Scanner and CI (questions 25 to 36)
25. Which scanner for which project?
| Project | Scanner |
|---|---|
| Maven | SonarScanner for Maven |
| Gradle | SonarScanner for Gradle |
| .NET | SonarScanner for .NET |
| JavaScript or TypeScript with npm | SonarScanner for NPM |
| Python, Go, PHP, anything else | SonarScanner CLI |
26. Which properties does every project need?
| Property | Meaning |
|---|---|
sonar.projectKey | Unique key of the project. Mandatory. |
sonar.host.url | Server address. Also read from SONAR_HOST_URL. |
sonar.token | Authentication token. Also read from SONAR_TOKEN. |
sonar.sources | Folders with main code. |
sonar.tests | Folders with test code. |
sonar.exclusions | Paths to leave out of analysis. |
sonar.projectVersion | Version label, used by the Previous version new code option. |
sonar.qualitygate.wait | Make the scanner wait for the gate result. Default false. |
sonar.qualitygate.timeout | Seconds to wait for the report to be processed. Default 300. |
27. What is the file sonar-project.properties?
A file in the project root where the SonarScanner CLI reads its configuration. If you cannot add the file, pass the same values as -D arguments on the command line.
28. Show a Maven scan command.
mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.token=$SONAR_TOKEN
That is the form shown in the Maven scanner documentation. Set the server address in the environment or in the POM properties.
29. Show a Gradle scan command.
./gradlew build sonar --info
30. Show a CLI scan command.
sonar-scanner -Dsonar.token=$SONAR_TOKEN -Dsonar.host.url=https://sonar.example.com
31. How should a CI job store the token?
In the CI system's secret store, passed as the SONAR_TOKEN environment variable. Never commit it to the repository or print it in logs.
32. How do you add SonarQube to a Jenkins pipeline?
Wrap the scan in withSonarQubeEnv, which sets the server connection variables, then add a stage that waits for the result.
stage('Quality Gate') {
steps {
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate abortPipeline: true
}
}
}
33. Why does the GitHub Actions checkout use fetch-depth 0?
The scan needs full Git history. A shallow clone gives poor blame and new code information.
34. Where do coverage numbers come from?
From a report that your test tool writes and the scanner imports. SonarQube never executes the tests.
35. Which property imports coverage for Java, JavaScript and Python?
| Language | Report property |
|---|---|
| Java (JaCoCo XML) | sonar.coverage.jacoco.xmlReportPaths |
| JavaScript | sonar.javascript.lcov.reportPaths |
| TypeScript | sonar.typescript.lcov.reportPaths |
| Python | sonar.python.coverage.reportPaths |
36. What does a webhook do?
It sends an HTTP POST with a JSON payload to a URL when an analysis task finishes. It can be signed with an HMAC-SHA256 secret so the receiver can check it.
Administration (questions 37 to 44)
37. Which processes does the server run?
Web, Compute Engine and Elasticsearch, supervised by a Sonar process.
38. What Linux limits are required?
vm.max_map_count at least 524288, fs.file-max at least 131072, 131072 open file descriptors and 8192 threads for the SonarQube user.
39. How do you grant access?
Through permissions on groups or users: global ones such as Administer Quality Gates and Administer System, and project ones set in the project permission settings.
40. What is an LTA?
A long-term active release. The 2026.5 release is an LTA and 2026.1 is the previous one.
41. What should you do before updating?
Read the release notes between your version and the target, and back up the database.
42. What does branch analysis give you?
Analysis of branches other than the main one without needing a pull request. The 2026.5 documentation describes branch and pull request analysis as features added in the Developer edition and above.
43. Where is the quality gate status shown?
On the project Summary page, on the project Overview page, in the pull request decoration on your DevOps platform, and in the pipeline if you make the scanner wait.
44. Can SonarQube block a merge?
The gate status can be reported on the pull request, and the DevOps platform can be set to block merging when it fails. SonarQube reports the status. The platform enforces the block.
Common wrong answers to avoid
- "SonarQube runs the unit tests." It reads the coverage report from your test tool.
- "The gate fails the build by itself." The pipeline must wait for the gate and act on the result.
- "Bugs and code smells are the same." Bugs hurt reliability. Code smells hurt maintainability.
- "We can use H2 in production." The documentation says not to.
- "New code means the last commit." New code follows the new code definition, such as the previous version or the last 30 days.
Next in this series: the real-time SonarQube questions for live incidents, the scenario-based set, and the three-week study plan.
Training
Our DevSecOps training covers code scanning, quality gates and pipeline security hands-on. Classes run in Kharadi, Pune, and live online across India.
FAQ
What is SonarQube used for in DevOps?
It scans code on every change for bugs, vulnerabilities, code smells, coverage and duplication, and returns a pass or fail result that a pipeline can act on.
What is a quality gate in SonarQube?
A set of conditions on metrics. If any condition fails, the gate fails. The default Sonar way gate checks new code only.
What are the Sonar way quality gate conditions?
No new issues, new Security Hotspots reviewed, at least 80.0 percent coverage on new code and at most 3.0 percent duplication on new code.
What is the difference between a bug and a code smell?
A bug is likely to cause wrong behaviour and affects reliability. A code smell makes code hard to maintain and affects maintainability.
Which property makes the scanner wait for the quality gate?
sonar.qualitygate.wait=true. The timeout property, sonar.qualitygate.timeout, defaults to 300 seconds.
Does SonarQube run unit tests?
No. It imports coverage and test reports that your build produced.
What is the difference between SonarQube Server and SonarQube Cloud?
Server is installed and operated by you. Cloud is hosted and operated by Sonar.
Official references
- SonarQube Server documentation: Understanding quality gates
- SonarQube Server documentation: Quality standards and new code
- SonarQube Server documentation: Analysis parameters
- SonarQube Server documentation: SonarScanner CLI
- SonarQube Server documentation: Built-in quality profiles
- SonarQube Server documentation: Security Hotspots
- SonarQube Server documentation: Webhooks
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0