XXE warning for JAXP - #1467
Merged
Merged
Conversation
labkey-bpatel
approved these changes
Aug 7, 2026
labkey-bpatel
left a comment
Contributor
There was a problem hiding this comment.
Approving, but please take a look at my comments.
| <searchConfiguration name="XMLInputFactory.newInstance()" text="javax.xml.parsers.DocumentBuilderFactory.newInstance()" recursive="true" caseInsensitive="true" type="JAVA" pattern_context="default"> | ||
| <constraint name="__context__" within="" contains="" /> | ||
| </searchConfiguration> | ||
| <searchConfiguration name="SchemaFactory.newInstance()" description="XML parsers should always be configured to protect against XXE — use XmlBeansUtil.getHardenedSchemaFactory()" suppressId="SchemaFactory" text="javax.xml.validation.SchemaFactory.newInstance($schemaLanguage$)" recursive="true" caseInsensitive="true" type="JAVA" pattern_context="default"> |
Contributor
There was a problem hiding this comment.
Looks like the description should say use XmlBeansUtil.schemaFactory() instead of use XmlBeansUtil.getHardenedSchemaFactory(). I don't see a getHardenedSchemaFactory() method in XmlBeansUtil.
Contributor
Author
There was a problem hiding this comment.
Updated to match the final method name.
| @@ -1,6 +1,5 @@ | |||
| <component name="InspectionProjectProfileManager"> | |||
| <profile version="1.0"> | |||
| <option name="myName" value="Project Default" /> | |||
Contributor
There was a problem hiding this comment.
Was this removal intentional?
Contributor
Author
There was a problem hiding this comment.
It seemed harmless (I don't know what it does) but I restored it, just in case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
We want to avoid introducing new XXE problems in the future.
Related Pull Requests
Changes