Description
Hi there,
I am opening this as a discussion around lxml
and defusedxml
and their relation. Feel free to close it at anytime. It seems that many projects are using defusedxml
but the project itself seems to be unresponsive for a year now.
In relation to lxml
, it states that the defusedxml.lxml
module is an example. This is one thing to keep in mind.
This is combined with the other comment:
Additionally the package has an untested function to monkey patch all stdlib modules with defusedxml.defuse_stdlib().
The other thing that I see (also in relation to the duo vulnerability and the fix) is that lxml
has a parser option to discard comments, namely remove_comments
. I would feel much better with that than watching out for .text
related operations and treating them specially. This is what defusedxml
does, it replaces the default parser, but unfortunately it omits that option.
Finally, requesting defusedxml
does not request lxml
, but lxml
is used throughout this project. Atm, lxml
is installed through dm.xmlsec.binding
, but I would add it as a dependency for this project explicitly.