pvillard31 commented on code in PR #10247:
URL: https://github.com/apache/nifi/pull/10247#discussion_r2307814621


##########
nifi-commons/nifi-xml-processing/src/main/java/org/apache/nifi/xml/processing/validation/StandardSchemaValidator.java:
##########
@@ -46,6 +47,8 @@ public void validate(final Schema schema, final Source 
source) {
 
         try {
             validator.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, 
ProcessingFeature.SECURE_PROCESSING.isEnabled());
+            validator.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
+            validator.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");

Review Comment:
   I did try initially but SpotBugs does not seem to be smart enough to resolve 
the value coming from `ProcessingAttribute`. The only other option I see is to 
have a spotbug exclude file specifically for this and ignore the false positive 
for `XXE_VALIDATOR` violation. Thoughts?



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

Reply via email to