Skip to content
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

Bandit reports for use of xml.etree.ElementTree #83

Open
alperenkose opened this issue Jul 11, 2023 · 0 comments
Open

Bandit reports for use of xml.etree.ElementTree #83

alperenkose opened this issue Jul 11, 2023 · 0 comments

Comments

@alperenkose
Copy link
Collaborator

The use of xml.etree.ElementTree is known to be vulnerable to XML attacks, especially for parsing untrusted XML data. It is recommended to replace it with the defusedxml package.

In the pan-os-upgrade-assurance project we use python panos SDK which is using ElementTree as well and the method used for sending commands Firewall.op() returns an Element class object of xml.etree.ElementTree. However, an equivalent Element class is not present in the defusedxml.ElementTree which makes it hard to replace our use of xml.etree.ElementTree with defusedxml.

Following is the issue related to missing Element class in defusedxml.
tiran/defusedxml#48

Currently we skip xml elementtree related complaints in security scanning. Considering we are only parsing XML returned from PANOS devices but not sending user input XML commands we don't expect a security threat.

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

No branches or pull requests

1 participant