Add bandit, use to catch known vulnerable XML parsing (#28341)
* Add bandit to pre-commit and CI, use to catch known vulnerable XML parsing * Use defusedxml instead of direct xml.etree to parse XML * Move config to tests/bandit.yaml
This commit is contained in:
1 parent
aef808d2bf
commit
d4c80f160c
13 files changed
+42
-3
No files matched your search
@@ -3,9 +3,9 @@ import asyncio
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from urllib.parse import urlparse
|
||||
from xml.etree import ElementTree
|
||||
|
||||
import aiohttp
|
||||
from defusedxml import ElementTree
|
||||
from netdisco import ssdp, util
|
||||
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"name": "SSDP",
|
||||
"documentation": "https://www.home-assistant.io/integrations/ssdp",
|
||||
"requirements": [
|
||||
"defusedxml==0.6.0",
|
||||
"netdisco==2.6.0"
|
||||
],
|
||||
"dependencies": [
|
||||
|
||||
Reference in new issue
Block a user