Skip to content

Dev tooling: close 12 CodeQL py/* alerts (path containment, TLS 1.2 floor, no secret echo) - #557

Merged
GLinnik21 merged 1 commit into
mainfrom
worktree-agent-a7c380841b00e0990
Oct 8, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
worktree-agent-a7c380841b00e0990

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

What

Fixes 12 CodeQL py/* alerts in dev tooling (#4-#8, #10, #11, #16-#20):

  • py/path-injection - tests/serve_fixtures.py now resolves a request target and checks containment under the fixture root in one helper (_contained) before any isfile/open, including the ABR rung-fallback probe.
  • py/polynomial-redos - tools/abr-production-census.py: the Rung:: arm regex no longer nests an ambiguous repeat, so it cannot backtrack.
  • py/clear-text-logging-sensitive-data - tools/plxnative-lab start no longer echoes the session secret (it is written to pkg/lab.json, created 0600 from the first byte; the JSON output names the path). tools/remote-dpad.py prints a password only when it generated it. docs/lab-diagnostics.md updated to match.
  • py/insecure-protocol - TLS 1.2 floor (minimum_version) on the dev SSLContexts in plxnative-lab (server, selftest server and client), tests/mock_pms.py, and rust-modules/net/src/net/h2_reset_fixture.py.
  • py/incomplete-url-substring-sanitization - ci/gen-release-audit.py parses the DSN host with urlparse instead of a substring test.

Not run

  • tools/remote-dpad.py needs the TV and the TV lock hook blocks it; the change is a print-only branch.
  • h2_reset_fixture.py is driven by cargo tests; only a one-line minimum_version set was added.

Alerts

GitHub alerts only close after this merges and CodeQL rescans main.

Verification (committed tree, clean before and after)

make check exit 0; every test result: line was ok with 0 failed, e.g.:

test result: ok. 1194 passed; 0 failed; 7 ignored; 0 measured; 0 filtered out; finished in 26.99s
test result: ok. 959 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 15.52s
test result: ok. 689 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 12.08s
test result: ok. 1188 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 9.91s
test result: ok. 474 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 13.44s
test result: ok. 282 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 7.60s
test result: ok. 237 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.43s
(and 21 more, all ok / 0 failed)

python3 -m unittest tests.test_harness: Ran 416 tests in 250.425s / OK.
python3 tools/plxnative-lab selftest: selftest passed.

🤖 Generated with Claude Code

… floor, host parse for the Sentry region, linear ladder regex, no secret echo

CodeQL py/* alerts #4-7, #8, #10, #11, #16-20. serve_fixtures resolves and checks containment
before isfile; every dev SSLContext sets minimum_version TLS 1.2; gen-release-audit parses the
DSN host instead of a substring test; the census arm regex no longer backtracks; plxnative-lab
start stops echoing the session secret (pkg/lab.json, 0600, carries it); remote-dpad echoes
only a password it generated.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Comment thread tools/remote-dpad.py Dismissed
@GLinnik21
GLinnik21 merged commit e0b8246 into main Oct 8, 2026
18 checks passed
@GLinnik21
GLinnik21 deleted the worktree-agent-a7c380841b00e0990 branch October 8, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants