Repository navigation
CLI-1504 Prevent repository-controlled scanner execution - #1234
Conversation
✅ Deploy Preview for sonarqube-cli ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
e937221 to
5683166
Compare
Code Review ✅ Approved 4 closed / 4 findings🔴 High risk · Pins scanner Java, JVM options, engine JAR, and user home; a bypass could let repository-controlled code execute with SONAR_TOKEN. Pins the Java executable, JVM options, engine JAR, and scanner user home on the scanner command line, and downloads Cloud and Server 10.6+ engines with authenticated metadata and SHA-256 verification before launch. Resolved the repository-controlled ✅ 4 closed✅ Security: sonar.userHome is still repository-controlled, so cached jars can be planted
✅ Edge Case: Engine JAR download capped at 30s total, shorter than the scanner's
✅ Quality: Redirect test never reaches the authenticated getBytes download
✅ Bug: first-scan tests' fake java has no Java line, so they now hit managed install
Verification Rules 2/2 metFunctional validation No results Rules 2 passed 2 not applicable
Auto-approval Withheld For more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



sonar initcould run repository-selected Java executables, JVM agents, engine JARs, or planted legacy cache JARs withSONAR_TOKEN. First analyses now pin the Java executable, JVM options, engine JAR, and scanner user home on the shared foreground/detached command line. The scanner home is private to each run, and all four properties are managed options.Cloud and Server 10.6+ engines are downloaded using authenticated metadata and verified with SHA-256 before launch. Metadata download URLs receive no credentials. Older Servers retain legacy bootstrap with the isolated cache. Engine transfers have a ten-minute budget; metadata requests retain thirty seconds. Invalid versions or provisioning failures stop before launch. Ordinary root and module analysis properties still reach the scanner.
Validation:
CLI-1504
Summary by Gitar
This will update automatically on new commits.