AnnJoy23 opened a new pull request, #4341:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4341

   Fix: CWE-470 Unsafe Reflection — Validate Rule Unit Class Name Before 
loadClass
   Added a compiled Pattern constant SAFE_CLASS_NAME in both affected classes 
to validate that the class name is a legal Java fully-qualified class name 
before it reaches loadClass().
   
   *Validation pattern:* [\w$]+(\.[\w$]+)*
   
   This pattern accepts only dot-separated Java identifier segments (letters, 
digits, underscore, dollar sign). Any other character — including path 
separators, semicolons, spaces, or special characters — causes an 
IllegalArgumentException to be thrown before loadClass() is called.
   
   *Files changed:*
   * 
quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules/src/main/java/org/kie/kogito/core/rules/incubation/quarkus/support/RuleUnitServiceImpl.java
   * 
quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules/src/main/java/org/kie/kogito/core/rules/incubation/quarkus/support/StatefulRuleUnitServiceImpl.java


-- 
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]

Reply via email to