AnnJoy23 commented on code in PR #4341:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4341#discussion_r3584982344
##########
quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules/src/main/java/org/kie/kogito/core/rules/incubation/quarkus/support/RuleUnitServiceImpl.java:
##########
@@ -64,12 +68,16 @@ public Stream<DataContext> evaluate(Id id, DataContext
inputContext) {
}
private RuleUnitData convertValue(Map<String, Object> payload, RuleUnitId
ruleUnitId) {
+ String className = ruleUnitId.ruleUnitId();
+ if (!SAFE_CLASS_NAME.matcher(className).matches()) {
+ throw new IllegalArgumentException("Invalid rule unit class name:
" + className);
+ }
Review Comment:
CWE-470 requires a connected taint path from an externally-controlled source
(HTTP input) to the loadClass() sink. DataSourceServiceImpl.toClass() has the
sink but no REST endpoint or HTTP entry point calls it —
QuarkusDataSourceService is a CDI bean with no @POST/@GET/@PUT endpoints wiring
user input into it anywhere in the codebase.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]