-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardening suggestions for codemodder-python / xml-sonar #306
Conversation
src/core_codemods/one.py
Outdated
|
||
parser = etree.XMLParser() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace lxml
parser parameters with safe defaults.
src/core_codemods/two.py
Outdated
@@ -1,5 +1,5 @@ | |||
import lxml.etree | |||
|
|||
parser = lxml.etree.XMLParser() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace lxml
parser parameters with safe defaults.
src/core_codemods/one.py
Outdated
|
||
parser = etree.XMLParser() | ||
tree = etree.parse("xxe.xml", parser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call lxml.etree.parse
and lxml.etree.fromstring
with a safe parser.
src/core_codemods/two.py
Outdated
@@ -1,5 +1,5 @@ | |||
import lxml.etree | |||
|
|||
parser = lxml.etree.XMLParser() | |||
tree = lxml.etree.parse("xxe.xml", parser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call lxml.etree.parse
and lxml.etree.fromstring
with a safe parser.
Quality Gate passedIssues Measures |
7fb8cc7
to
15acc9d
Compare
Thanks pixeebot! |
I've reviewed the recently opened PR (305 - testing sonarcloud) and have identified some area(s) that could benefit from additional hardening measures.
These changes should help prevent potential security vulnerabilities and improve overall code quality.
Thank you for your consideration!
docs | feedback
Powered by: pixeebot