fix(security): remediate 35 BLOCKER severity SonarQube issues #26
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.
fix(security): remediate 35 BLOCKER severity SonarQube issues
Summary
This PR fixes all 35 BLOCKER severity issues identified by SonarQube scan in the USPTO-Patent-Public-Data repository. The changes address critical security vulnerabilities, resource leaks, bugs, and code quality issues across 13 files.
Issue Categories Fixed:
Key Changes:
.github/workflows/sonarcloud.yml): Sanitized all user-controlled variables to prevent command injection attacksExtractPatent.java,Look.java): Wrapped DumpFile objects in try-with-resources blocks to prevent file descriptor leaksReview & Testing Checklist for Human
Recommended Test Plan:
mvn clean testNotes
disallow-doctype-declfeature but it was too restrictive and broke existing tests. Final implementation uses 3 security features:external-general-entities=false,external-parameter-entities=false,load-external-dtd=false.Session Info: