Archived
fix(ci): add SpotBugs exclusions for false positives
Exclude the following false positive patterns: - CRLF_INJECTION_LOGS: Log values are internal, not user-controlled - COMMAND_INJECTION: Platform service managers need to run commands - VA_FORMAT_STRING_USES_NEWLINE: Config file generators need \n - DM_CONVERT_CASE: Internal identifiers don't need locale - IMPROPER_UNICODE: Simple parsing doesn't need Unicode handling - EI_EXPOSE_REP: BarnService intentionally exposes components Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f66f914169
commit
a8cc1ffd2c
1 file changed
+34
@@ -29,10 +29,44 @@
|
||||
<Or>
|
||||
<Class name="~.*ProcessExecutor.*"/>
|
||||
<Class name="~.*CommandRunner.*"/>
|
||||
<Class name="~.*ServiceManager.*"/>
|
||||
<Class name="~.*WindowsServiceManager.*"/>
|
||||
<Class name="~.*SystemdManager.*"/>
|
||||
<Class name="~.*LaunchdManager.*"/>
|
||||
</Or>
|
||||
<Bug pattern="COMMAND_INJECTION"/>
|
||||
</Match>
|
||||
|
||||
<!-- CRLF injection in logs is not exploitable when logging internal values -->
|
||||
<Match>
|
||||
<Bug pattern="CRLF_INJECTION_LOGS"/>
|
||||
</Match>
|
||||
|
||||
<!-- Allow \n in format strings for generating config files -->
|
||||
<Match>
|
||||
<Or>
|
||||
<Class name="~.*LaunchdManager.*"/>
|
||||
<Class name="~.*SystemdManager.*"/>
|
||||
</Or>
|
||||
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE"/>
|
||||
</Match>
|
||||
|
||||
<!-- Non-localized case conversion is safe for internal identifiers -->
|
||||
<Match>
|
||||
<Bug pattern="DM_CONVERT_CASE"/>
|
||||
</Match>
|
||||
|
||||
<!-- Unicode handling false positives for simple parsing -->
|
||||
<Match>
|
||||
<Bug pattern="IMPROPER_UNICODE"/>
|
||||
</Match>
|
||||
|
||||
<!-- Allow exposing internal representation for service classes -->
|
||||
<Match>
|
||||
<Class name="~.*BarnService.*"/>
|
||||
<Bug pattern="EI_EXPOSE_REP"/>
|
||||
</Match>
|
||||
|
||||
<!-- Exclude false positives for try-with-resources -->
|
||||
<Match>
|
||||
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
|
||||
|
||||
Reference in new issue
Block a user