Skip to content

Semgrep Rule Fix#2595

Closed
Akhil-gi wants to merge 2 commits into
jMonkeyEngine:masterfrom
Akhil-gi:monkeyengine-1
Closed

Semgrep Rule Fix#2595
Akhil-gi wants to merge 2 commits into
jMonkeyEngine:masterfrom
Akhil-gi:monkeyengine-1

Conversation

@Akhil-gi
Copy link
Copy Markdown

@Akhil-gi Akhil-gi commented Feb 3, 2026

We have used our AI-Guardian( https://ai-rem-demo.remediation.opsmx.net) product to identify and remediate a Semgrep rule violation

Pull Request — Semgrep Rule Fix
Rule ID: transformerfactory-dtds-not-disabled
Rule Message: DOCTYPE declarations are enabled for this TransformerFactory. This is vulnerable to XML external entity attacks. Disable this by setting the attributes "accessExternalDTD" and "accessExternalStylesheet" to "".
File Path: /tools/scanResult/unzipped-2878896019/jme3-plugins/src/xml/java/com/jme3/export/xml/XMLExporter.java
Line: 100

root and others added 2 commits February 3, 2026 05:27
…ds-not-disabled-100-s0PY9atwi3

fix: semgrep-transformerfactory-dtds-not-disabled
Copy link
Copy Markdown
Contributor

@codex128 codex128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change causes an exception when using XMLExporter:

SEVERE: Uncaught exception thrown in Thread[#44,jME3 Main,5,main]
java.lang.IllegalArgumentException: TransformerFactory does not recognise attribute 'accessExternalDTD'.
	at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:542)
	at com.jme3.export.xml.XMLExporter.save(XMLExporter.java:100)
	at com.jme3.export.xml.XMLExporter.save(XMLExporter.java:125)
	at com.jme3.export.JmeExporter.save(JmeExporter.java:62)
	at jme3test.export.TestIssue2068.simpleInitApp(TestIssue2068.java:104)
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:246)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:142)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:224)

@codex128
Copy link
Copy Markdown
Contributor

codex128 commented Feb 9, 2026

Closing because the PR is completely broken and the author does not seem interested in fixing it. Also in my mind, the use of AI to find the problem casts doubt on whether this is a real issue or not.

@codex128 codex128 closed this Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants