contrib.dlint.dlint-equivalent.insecure-xml-use

Author
1,891
Download Count*
Insecure XML parsing functionality, prefer 'defusedxml'
Run Locally
Run in CI
Defintion
rules:
- id: insecure-xml-use
message: Insecure XML parsing functionality, prefer 'defusedxml'
languages:
- python
severity: WARNING
metadata:
source_rule_url: https://github.com/dlint-py/dlint/blob/master/docs/linters/DUO107.md
category: security
technology:
- python
references:
- https://github.com/dlint-py/dlint/blob/master/docs/linters/DUO107.md
owasp:
- A09:2017 - Using Components with Known Vulnerabilities
- A06:2021 - Vulnerable and Outdated Components
cwe:
- "CWE-611: Improper Restriction of XML External Entity Reference"
license: Commons Clause License Condition v1.0[LGPL-2.1-only]
pattern-either:
- patterns:
- pattern: xml.$ANYTHING
- pattern-not: xml.sax.saxutils
- pattern-not: xml.etree.ElementTree.Element
- pattern-not: xml.etree.ElementTree.SubElement
- pattern: xmlrpclib.$ANYTHING
Short Link: https://sg.run/5QOW