Interview Security & DevSecOps

What does 'clean as you code' mean in SonarQube, and why focus on new code? [Basic]

Answer

Clean as you code means holding new or changed code to a high standard, even if the legacy codebase still has debt. The idea is to stop adding new problems first, then gradually remediate old issues based on risk and capacity.

Technical explanation

It makes adoption realistic because old code does not block every delivery pipeline immediately.

It creates personal ownership: developers fix the issues introduced in their current change.

It improves the trend of the system over time because every release is expected to leave the changed code clean.

Hands-on example

Hands-on rollout: set the new-code definition to main branch or the last release. Configure the quality gate to require zero new critical vulnerabilities, no new blocker bugs, and minimum new-code coverage. Track legacy debt separately in a remediation backlog.

Preparing for an interview?

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

← All Security & DevSecOps questions