Fix/sonar cleanup - #12
Merged
Merged
Conversation
HttpSecurity.build() no longer declares a checked exception in this project's pinned Spring Security version, so the declaration was dead weight flagged by Sonar (S112).
Fixes Sonar S1192 (string literal duplicated 3 times) in DockerExecutable.
The 11-argument constructor (S107) was fragile: six adjacent String parameters made it easy to swap two arguments with no compiler error. Problem.Builder names each field at the call site instead, and the three problem definitions are updated to use it. Also adds missing class/method Javadoc to the three problem classes.
Fixes Sonar S106 (use a logger, not System.err/out) across JavaRunnerService and SandboxReaperService. Abnormal-but-handled exits use log.warn; genuine caught exceptions use log.error.
Closes out the remaining Checkstyle MissingJavadocType/Method violations flagged by CI.
DevSecurityConfig is @Profile("dev")-only and permits every request with no authentication, so there's no authenticated session for a forged cross-site request to exploit. Documented and suppressed (S4502) rather than left flagged, since it was blocking the Quality Gate on new-code security rating.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
throws Exceptionfrom SecurityConfig/DevSecurityConfig (S112) — HttpSecurity.build() no longer declares a checked exception in this project's Spring Security versionTest plan
./mvnw clean verifypasses locally (0 Checkstyle violations, all tests green)