Commit 6d72a07
committed
Close remaining Sonar + Codacy findings on PR #194
Sonar (3 left after the previous pass):
- LSP run() complexity dropped from 16→<10 by extracting
_build_reply() and collapsing the request==None / method==exit guards
into one branch (python:S3776).
- Dockerfile: merged the chmod + user-creation RUN layers so docker:S7031
is satisfied without extra image layers.
- test_acme_v2: chained endswith → tuple form (python:S8513).
Codacy:
- Real bug: connection_screen called send_magic_packet(broadcast=...)
but the wake_on_lan signature is broadcast_address=. Fixed.
- Real bug: examples 03/11/12 called default_scheduler() /
default_hotkey_daemon() / default_trigger_engine() but those are
module-level instances, not factories. Dropped the parens.
- autocontrol-lsp/vscode/package-lock.json: generated via
``npm install --package-lock-only`` so dependencies are reproducible
(text:S8564 / Codacy lockfile rule).
False positives — tool-specific suppressions with reason:
- Semgrep dangerous-subprocess-use-audit in adb_client.py + tls_acme/
challenge.py + test_android_adb.py (Bandit B603 already justifies; the
argv list is hard-coded / shutil.which-resolved).
- Semgrep request-data-write in usbip/libusb_backend.py (rule expects a
Django filesystem path; this is libusb's bulk-out endpoint write).
- Semgrep openai.import-without-guardrails in agent/backends/openai.py
(Guardrails is an unrelated content-filter SDK; safety is handled at
the action-executor allowlist + audit layer).
- Bandit B105 hardcoded-password in examples/16_secrets.py + B310
url-open in examples/06_observability.py + examples/15_rest_api.py
(demo strings + loopback URLs).
- Pylint W0622 ``format`` shadow in two ``log_message`` overrides
(the parameter name comes from BaseHTTPRequestHandler — we can't
rename it without breaking the protocol).1 parent e57a8d6 commit 6d72a07
17 files changed
Lines changed: 611 additions & 30 deletions
File tree
- autocontrol-lsp
- autocontrol_lsp/server
- vscode
- docker
- examples
- je_auto_control
- android
- gui/remote_desktop
- utils
- agent/backends
- observability
- tls_acme
- usbip
- test/unit_test/headless
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
88 | 99 | | |
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
92 | | - | |
| 103 | + | |
93 | 104 | | |
94 | 105 | | |
95 | | - | |
96 | | - | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
101 | 110 | | |
102 | 111 | | |
103 | 112 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| |||
0 commit comments