Interview › Security & DevSecOps
What is the difference between a quality gate and a quality profile in SonarQube? [Basic]
Answer
A quality gate defines whether a project passes or fails based on metrics. A quality profile defines which analysis rules are enabled for a language. The profile decides what issues can be raised; the gate decides whether the result is acceptable.
Technical explanation
Quality profiles are rule sets, such as Java rules for security, reliability, and maintainability.
Quality gates are governance thresholds, such as no new blocker issues or new-code coverage above 80 percent.
A team can tune profiles per language while keeping a common enterprise gate for consistent release standards.
Hands-on example
Example: the Java quality profile enables rules for SQL injection and insecure random usage. The quality gate then fails the PR if any new vulnerability is found or if new-code coverage drops below the agreed threshold.
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 quality gate, and how do you use it to fail a build? [Basic]
- What does 'clean as you code' mean in SonarQube, and why focus on new code? [Basic]
- Is SonarQube primarily SAST, code quality, or both? [Basic]
- What metrics does SonarQube track (coverage, duplication, code smells, bugs, vulnerabilities)? [Basic]
- What is software composition analysis (SCA), and why does it matter for dependencies? [Basic]
- What is technical debt in SonarQube, and how is it estimated? [Basic]
- How does SonarQube measure code coverage, and does it run your tests? [Basic]
- What is a SonarQube hotspot, and how is it different from a vulnerability? [Basic]