queued at: 2024-11-10 09:38:37.142778
total time to completion: 4.4s
autofix_commit_msg: '[pre-commit.ci] auto fixes from pre-commit.com hooks\n\nfor more information, see https://pre-commit.ci\n'
autofix_prs: True
autoupdate_branch: ''
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: 'monthly'
skip: []
submodules: False
image ghcr.io/pre-commit-ci/runner-image:2024-10-11-d1d12eb => 43486cc79df4ecca6d659fa6ff0cf2cc2af4bef6cacc2f23f252d06cb831e536
https://github.com/PyCQA/[email protected] (8.6MiB) (cached)
sha: 36fd65054fc8864b4037d0918904f9331512feb5
https://github.com/PyCQA/bandit:[email protected] (8.6MiB) (cached)
sha: 36fd65054fc8864b4037d0918904f9331512feb5
envs:
- python@python3 (15.3MiB) (cached)
https://github.com/PyCQA/[email protected] (856.4KiB) (cached)
sha: cf1542cefa3e766670b2066dd75c4571d682a649
https://github.com/PyCQA/flake8:[email protected] (856.4KiB) (cached)
sha: cf1542cefa3e766670b2066dd75c4571d682a649
envs:
- python@python3 (2MiB) (cached)
https://github.com/codespell-project/[email protected] (1.9MiB) (cached)
sha: 193cd7d27cd571f79358af09a8fb8997e54f8fff
envs:
- python@python3 (1.7MiB) (cached)
https://github.com/pre-commit/[email protected] (338.1KiB) (cached)
sha: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b
envs:
- python@python3 (3.8MiB) (cached)
https://github.com/psf/[email protected] (7.1MiB) (cached)
sha: 1b2427a2b785cc4aac97c19bb4b9a0de063f9547
envs:
- python@python3 (2.9MiB) (cached)
https://github.com/pycqa/[email protected] (2.7MiB) (cached)
sha: c655831799765e9593989ee12faba13b6ca391a5
envs:
- python@python3 (755.8KiB) (cached)
bandit...................................................................Failed
- hook id: bandit
- exit code: 1
[main] INFO profile include tests: None
[main] INFO profile exclude tests: B108,B404,B602,B607,B603
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO using config: pyproject.toml
[main] INFO running on Python 3.12.7
[manager] WARNING Test in comment: false is not a test name or id, ignoring
[manager] WARNING Test in comment: by is not a test name or id, ignoring
[manager] WARNING Test in comment: bandit is not a test name or id, ignoring
[manager] WARNING Test in comment: false is not a test name or id, ignoring
[manager] WARNING Test in comment: by is not a test name or id, ignoring
[manager] WARNING Test in comment: bandit is not a test name or id, ignoring
[manager] WARNING Test in comment: false is not a test name or id, ignoring
[manager] WARNING Test in comment: by is not a test name or id, ignoring
[manager] WARNING Test in comment: bandit is not a test name or id, ignoring
Run started:2024-11-10 09:38:39.612164
Test results:
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_config.py:15:4
14 config = LBConfig.load(CONFIG_FILE)
15 assert len(config.provider_cls) > 0
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_providers/test_footloose.py:21:4
20 )
21 assert destroy_command is True
22
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_providers/test_footloose.py:26:4
25 command = footloose_provider.ssh_server_command(footloose_server_meta, None)
26 assert command == ["cd /tmp/footloose_test && footloose ssh root@2021-12-05-14050"]
27
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_providers/test_footloose.py:41:4
40 mock_popen.assert_called_with(["footloose", "create"], cwd="/tmp/footloose_test/2012-01-14-1200")
41 assert mock_channel.sendall.mock_calls[:3] == [
42 call(b"Generate server 2012-01-14-1200 workspace /tmp/footloose_test/2012-01-14-1200 done.\r\n"),
43 call(b"Check footloose create done"),
44 call(b"."),
45 ]
46 assert re.match(rb"OK\(\d.\ds\).\r\n", mock_channel.sendall.mock_calls[-1][1][0]) is not None
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_providers/test_footloose.py:46:4
45 ]
46 assert re.match(rb"OK\(\d.\ds\).\r\n", mock_channel.sendall.mock_calls[-1][1][0]) is not None
47 assert server == LBServerMeta(
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_providers/test_footloose.py:47:4
46 assert re.match(rb"OK\(\d.\ds\).\r\n", mock_channel.sendall.mock_calls[-1][1][0]) is not None
47 assert server == LBServerMeta(
48 provider_name="footloose",
49 workspace=Path("/tmp/footloose_test/2012-01-14-1200"),
50 server_name="2012-01-14-1200",
51 server_host="127.0.0.1",
52 server_user="root",
53 server_port=22,
54 created_timestamp=1326542401,
55 ssh_extra_args=[],
56 manage=True,
57 )
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:46:4
45 encoder = encoder_factory(raise_error=False)
46 assert encoder(test.input) == test.expected
47
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:67:4
66 )
67 assert encoder(test.input) == test.expected
68
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:111:4
110 original = copy.deepcopy(test.input)
111 assert dict_factory(*test.input) == test.expected
112 assert original == test.input
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:112:4
111 assert dict_factory(*test.input) == test.expected
112 assert original == test.input
113
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:121:4
120 is_open = port_is_open(test_ip)
121 assert is_open is True
122
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:125:4
124 is_open = port_is_open(test_ip)
125 assert is_open is False
126
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:142:4
141 def test_to_seconds(test: test_pair):
142 assert to_seconds(test.input) == test.expected
143
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:168:4
167 def test_humanize_seconds(test: test_pair):
168 assert humanize_seconds(test.input) == test.expected
169
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:179:4
178 def test_ensure_bytes(test: test_pair):
179 assert ensure_bytes(test.input) == test.expected
180
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:204:4
203 fake_channel = mock.MagicMock()
204 assert send_to_channel(fake_channel, *test.input) == test.expected
205
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:217:4
216 def test_confirm_dc_type(test: test_pair):
217 assert test.expected == confirm_dc_type(*test.input)
218
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:239:4
238 def test_import_class():
239 assert import_class("") is None
240 assert import_class("Test") is None
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ./tests/test_utils.py:240:4
239 assert import_class("") is None
240 assert import_class("Test") is None
241 assert import_class("Test::A::B") is None
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: H
(output truncated)