(chores): fix SonarCloud MAJOR vulnerabilities (S6506, S5144) - #25065
Conversation
- Enforce HTTPS-only downloads with --proto '=https' in curl commands to prevent HTTP redirect attacks (S6506) - Suppress S5144 in AbstractExchange.evalPropertyValue() — exchange properties are set by trusted route authors; type conversion of exchange-internal values is intentional framework behavior per the Camel security model, not user-controlled URL construction Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 550 tested, 29 compile-only — current: 550 all testedMaveniverse Scalpel detected 579 affected modules (current approach: 550).
|
davsclaus
left a comment
There was a problem hiding this comment.
Looks good.
S6506 (curl HTTPS enforcement): Adding --proto '=https' is a clean hardening measure. Both URLs are already https://, and the download in install-llvm-mingw.sh is further protected by sha256sum -c. No risk of regression.
S5144 (SSRF suppression): The @SuppressWarnings("java:S5144") on evalPropertyValue() is correctly justified — exchange properties are set by trusted route authors per the Camel security model. ExchangeHelper.convertToType() is a type converter, not URL construction. This is the right approach for a confirmed false positive.
This review does not replace specialized review tools (CodeRabbit, Sourcery) or static analyzers (SonarCloud).
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Summary
Claude Code on behalf of gnodet
Fix 3 SonarCloud MAJOR vulnerabilities (dashboard):
.github/workflows/camel-launcher-native-exe.yml:170and.github/actions/setup-llvm-mingw/install-llvm-mingw.sh:42: Added--proto '=https'tocurlcommands to enforce HTTPS-only connections and prevent redirections to insecure websites.core/camel-support/AbstractExchange.java:211: Suppressed with@SuppressWarnings("java:S5144")and documented justification. The flagged code isExchangeHelper.convertToType()called fromevalPropertyValue(), which performs type conversion on exchange properties. Per the Camel security model, route authors are fully trusted — exchange properties are set by trusted route code, making this type conversion intentional framework behavior rather than a user-controlled URL construction vulnerability.Test plan
mvn formatter:format impsort:sort— formatting passesmvn -Psourcecheck validate— style check passesmvn testoncore/camel-support— all tests pass🤖 Generated with Claude Code