mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Enable some more bandit checks (#30857)
* Enable B108 (hardcoded tmp dir), address findings * Enable B602 (subprocess popen with shell), address findings * Enable B604 (start process with shell), address findings * Enable B306 (mktemp), B307 (eval), and B325 (tempnam), no issues to address
This commit is contained in:
@@ -44,7 +44,9 @@ def test_query_state_value(rs):
|
||||
result = rs._query_state_value("runme")
|
||||
assert "foo bar" == result
|
||||
assert mock_run.call_count == 1
|
||||
assert mock_run.call_args == mock.call("runme", shell=True)
|
||||
assert mock_run.call_args == mock.call(
|
||||
"runme", shell=True, # nosec # shell by design
|
||||
)
|
||||
|
||||
|
||||
async def test_state_value(hass):
|
||||
|
||||
Reference in New Issue
Block a user