Commit 9720a5c
committed
Address SonarCloud / Bandit / ruff findings
Five SonarCloud findings cleared, two Bandit B104 suppressions tightened,
one stray ruff F401 removed.
- pyproject.toml (text:S8565) — add uv.lock so transitive versions are
reproducible across CI / contributor machines (207 packages locked).
- host_service.py:403 (python:S8572) — replace
``logging.error("...: %r", error)`` with ``logging.exception(...)`` so
the traceback lands in the daemon's log.
- webrtc_transport.py:323 (python:S7483) — fix the NOSONAR placement
syntax. The em-dash separator confused Sonar's parser; explicit rule
key + ``# reason:`` clause makes the suppression registered. The
underlying use of ``asyncio.wait_for(timeout=...)`` stays because
``asyncio.timeout()`` only landed in 3.11 and the project supports 3.10.
- web_viewer/index.html:1224 (javascript:S7785) — same fix as above for
the service-worker registration: this file is a plain ``<script>`` so
top-level await is not legal.
- auto_control_exception_test.py:17 (python:S8518) — iterate the value
directly out of the enumerate(); drop the now-unused index.
Bandit B104 (hardcoded 0.0.0.0 bind):
- tls_acme/challenge.py and usbip/server.py — both already had
``# noqa: S104 # NOSONAR python:S5332 # reason: ...`` justifying the
external reachability requirement, but Bandit needs its own
``# nosec B104`` token on the same line. Added without removing the
existing context.
ruff F401:
- visual_regression/compare.py — drop the unused ``List`` import.1 parent b3a695b commit 9720a5c
8 files changed
Lines changed: 4133 additions & 12 deletions
File tree
- je_auto_control/utils
- remote_desktop
- web_viewer
- tls_acme
- usbip
- visual_regression
- test/unit_test/exception
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
403 | | - | |
| 402 | + | |
| 403 | + | |
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1221 | 1221 | | |
1222 | 1222 | | |
1223 | 1223 | | |
1224 | | - | |
| 1224 | + | |
1225 | 1225 | | |
1226 | 1226 | | |
1227 | 1227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments