SONARJAVA-6745 Implement new rule S9146: Apache XML RPC extensions should not be enabled - #5907
Conversation
Detect calls to setEnabledForExtensions() on Apache XML-RPC configuration objects where the argument is not provably false, as enabling extensions activates Java object deserialization which can lead to remote code execution.
…ing type hierarchy The XmlRpcExtensionsCheck test was failing because: 1. The test sample was in the non-compiling directory but the check uses AbstractMethodDetection with MethodMatchers.ofSubTypes(), which requires the library types to be on the classpath for resolution. 2. The MethodMatcher used XmlRpcHttpRequestConfigImpl as the parent type, but XmlRpcServerConfigImpl does not extend it - both extend XmlRpcConfigImpl. Fix: Add xmlrpc-client and xmlrpc-server dependencies, move the test sample to the compiling location, and use XmlRpcConfigImpl as the correct parent type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only report when the argument is provably true instead of when it is not provably false. This avoids false positives for runtime-computed values that may legitimately be false. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Code Review ✅ Approved 1 resolved / 1 findingsImplements new rule S9146 to detect insecure Apache XML-RPC extension enablement, addressing the vulnerability reports for unknown boolean arguments. No issues found. ✅ 1 resolved✅ Edge Case: Rule reports as VULNERABILITY for unknown boolean arguments
Implementation Status ✅ 1 / 1 issues implemented✅ SONARJAVA-6742 — 1 / 1 objectivesThe PR implements the new rule S9146 to check that Apache XML RPC extensions are not enabled. ✅ 1 complete
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 |




Detect calls to setEnabledForExtensions() on Apache XML-RPC configuration objects where the argument is not provably false, as enabling extensions activates Java object deserialization which can lead to remote code execution.
Part of