Bandit is a tool designed to find common security issues in Python code.
6.52k
stars
612
forks
source link
False positive / regression: [B314:blacklist] Using xml.etree.ElementTree.fromstring to parse untrusted XML - while defusedxml is used #995
Open
Lucas-C opened 1 year ago
Describe the bug
Since the latest 1.7.5 release, code that used to not raise warnings is now detected as invalid by
bandit
Reproduction steps
bandit_bug.py
print(fromstring(""))
Expected behavior
With
bandit==1.7.4
no error was raised, and I was expecting this behaviour to stay consistent with newbandit
releasesBandit version
1.7.5 (Default)
Python version
3.8
Additional context
Tested with Python 3.8 & Python 3.10
This is not urgent matter for me, I simply disabled this check locally for now: https://github.com/PyFPDF/fpdf2/pull/718/files#diff-ff268f4fc21f36f22d234ae39a8335470764ff490e1fbd27440d4695c1de0864