SONARJAVA-6789: Implement S9353: disallow unescaped '.' as a regex literal - #5955
Conversation
Ruling Diff SummaryDetected changes in 1 rule files: 0 issues removed, 2 issues added. S9353 (
|
✅ All code review findings resolved.
Use a shared method-name constant to satisfy S1192 without changing rule behavior.
Keep NOSONAR as the only documented suppression for intentional "." regexes.
|
Code Review ✅ Approved 2 resolved / 2 findingsImplements S9353 to flag unescaped '.' regex arguments across String and Pattern methods, skipping compile calls with Pattern.LITERAL. No issues found. ✅ 2 resolved✅ Bug: withoutSemantic test asserts issues that can never fire
✅ Quality: quickfix metadata says "targeted" but no quick fix implemented
Implementation Status 🟡 0 / 1 issues implemented⬜ SONARJAVA-6789 — 0 / 1 objectivesThe PR does not contain any code changes implementing rule S9353.
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 |




Summary
"."regex argument onString.split/matches/replaceAll/replaceFirstandPattern.compile/Pattern.matches.Pattern.compilewhen the flags includePattern.LITERAL..withoutSemantic(), plus generated rule metadata and the Sonar way profile entry.Links
AI disclosure