Skip to content

Use defusedxml library to reduce xml attack surface - #1002

Merged
jacalata merged 4 commits into
developmentfrom
jac/defusedxml
Mar 11, 2022
Merged

Use defusedxml library to reduce xml attack surface#1002
jacalata merged 4 commits into
developmentfrom
jac/defusedxml

Conversation

@jacalata

Copy link
Copy Markdown
Contributor

#988

from https://pypi.org/project/defusedxml/, we need to make sure we call defusedxml.ElementTree instead of xml.etree.ElementTree for these methods: parse(), iterparse(), fromstring(), XMLParser
the only one of those we call is fromstring()

had to manually undo some of the changes to keep mypy happy
RequestFactory and RequestOptions are used everywhere, should really be in a separate module

@ovinis ovinis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for updating the library. I think this also addresses Tabcmd issue that was logged for TSC tableau/tabcmd#15

@jacalata
jacalata merged commit 0cf3d0d into development Mar 11, 2022
@jacalata
jacalata deleted the jac/defusedxml branch March 11, 2022 21:14
jacalata added a commit that referenced this pull request Mar 30, 2022
 replace ET.fromstring with defusedxml.fromstring
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