You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(security): bandit covers src and tests at medium severity through one config the gate and the code-scanning upload share, and the test findings are fixed #1542
scope/ciGitHub Actions workflows, pre-commit hooks, CI gates, and runnersscope/securitySecurity linters (trivy, bandit, gitleaks, kubeconform) and Vaulttype/bugType bug: the code does not do what it must
Requested by the owner, 2026-10-10: "have we run a full bandit scan against the codebase and noted all issues?" and "I'm just wondering because the scan failures just started and I want to make sure the codebase is actually covered".
Problem
Checked at release/v0.2.33 (5c5df79), the cut of v0.2.33, whose release pull request #1537 failed its bandit code-scanning check.
The gate never scanned tests.devops ci security runs uv run bandit -r src -ll (src/devops_cli/commands/ci.py:455): src/ only, Medium severity and above.
The code-scanning upload scans differently..github/workflows/ci.yml:54-60 runs devops scan report --sarif, added by feat(review): publish scanner findings to code scanning #419 in this release. Its Bandit command scans the whole checkout, tests included, with --ignore-nosec. So code scanning reported test fixture paths and addresses, and reviewed # nosec lines, that the gate passes.
A full scan with bandit 1.9.4:
tests/: 4 High and 65 Medium findings. 52 B108 (literal /tmp paths), 12 B104 (0.0.0.0), 4 B103 (deliberate chmod in the TLS and SSH permission tests), 1 B102 (exec).
Bandit covers src/ and tests/ at Medium severity and above, through one shared config used by both the gate and the code-scanning upload (2026-10-10).
It lands in v0.2.33, and every current Medium and High finding is fixed (2026-10-10).
Acceptance criteria
The gate and devops scan report --sarif read the same Bandit config and report the same findings on this repository. A test fails if they diverge.
Bandit at Medium and above over src/ and tests/ reports zero findings. Each finding is fixed in code (tmp_path instead of literal /tmp, 127.0.0.1 where a socket really binds). A # nosec <rule> with a reason is used only where the literal is what the test checks.
Review scans of other trees still read no config of the reviewed tree and still report # nosec lines.
The gate stays within its 5-minute budget, with the wall time measured.
changelog.d/<issue>.md.
Feasibility
Fits one pull request: one config table, two command builders, the test fixes and their tests.
Intake placed this item kept in v0.2.33: a person placed it in v0.2.33, and that placement stands.
Priority: P2-Medium. Owner-requested for the v0.2.33 release and the gate is currently passing, but the findings are in test fixtures rather than production code, so it is important but not a production vulnerability.
Value: Medium. Ensures consistent security scanning across the codebase and prevents future divergence between the gate and code-scanning upload, but the actual risk is limited to test-fixture literals.
Effort: Medium. Requires one shared config table, two command-builder updates, fixing 69 test findings across four rules, and a divergence test, all fitting in one pull request.
Owner decision (2026-10-10): Bandit covers src/ and tests/ at Medium severity and above, through one config shared by the gate and the code-scanning upload, and every current finding is fixed, in v0.2.33.
One scope: .bandit names src and tests. devops ci security runs bandit --ini .bandit -r --severity-level medium. devops scan report on a tree whose .bandit names its targets runs the same command and honours # nosec, so the upload reports exactly what the gate fails on. Review scans of other trees are unchanged: they read no config of the reviewed tree and still ignore # nosec (fix(security): reviews take config, data, contracts, scanner config and probe suppressions from the tree under review #972).
The 69 test findings: 56 are fixed in code (tmp_path, source constants, ::1, keys created at 0o644). The other 13 sit on 12 lines whose literal is itself under test, each marked # nosec BXXX # <reason>.
changelog.d/1542.md (Changed); changelog.d/419.md rewritten in house style under ### Added, so the v0.2.33 collection can parse it. Task file docs/agent/tasks/task-1542-bandit-covers-src-and-tests.md.
Acceptance Criteria of docs/agent/tasks/task-1542-bandit-covers-src-and-tests.md:
The gate's command and the SARIF scan's command name the same .bandit, threshold and -r, and neither ignores # nosec (tests/test_security_bandit.py).
A review scan reads no config of the reviewed tree and still reports # nosec lines (tests/test_security_bandit.py).
A tree whose .bandit names no targets, or names targets without recursive, still reports its findings (tests/test_security_bandit.py, checked with real bandit 1.9.4 on scratch trees).
uv run bandit --ini .bandit -r --severity-level medium reports 0 findings over src/ and tests/, and uv run devops ci security passes; a probe file with a /tmp path under tests/ makes it fail.
Bandit's wall time in the gate is about 37 s locally under load, up from about 21 s; the static job stays within the 5-minute budget.
changelog.d/1542.md holds the entry under ### Changed, and changelog.d/419.md is in house style under ### Added.
uv run devops ci is the pull request's gate.
Pending a person: on release pull request feat(release): v0.2.33 #1537, the bandit code-scanning check passes after this merges.
scope/ciGitHub Actions workflows, pre-commit hooks, CI gates, and runnersscope/securitySecurity linters (trivy, bandit, gitleaks, kubeconform) and Vaulttype/bugType bug: the code does not do what it must
Activity
dan-petty-bot commentedon Oct 10, 2026
Intake placed this item kept in v0.2.33: a person placed it in v0.2.33, and that placement stands.
Owner-requested for the v0.2.33 release and the gate is currently passing, but the findings are in test fixtures rather than production code, so it is important but not a production vulnerability.Ensures consistent security scanning across the codebase and prevents future divergence between the gate and code-scanning upload, but the actual risk is limited to test-fixture literals.Requires one shared config table, two command-builder updates, fixing 69 test findings across four rules, and a divergence test, all fitting in one pull request.fix(security): bandit covers src and tests at medium severity through…
dan-petty-bot commentedon Oct 10, 2026
What changed
#1546, merged into
release/v0.2.33as a4bc008.49 file(s) changed.
How it was verified
Check runs at 6413c78:
Acceptance Criteria of
docs/agent/tasks/task-1542-bandit-covers-src-and-tests.md:.bandit, threshold and-r, and neither ignores# nosec(tests/test_security_bandit.py).# noseclines (tests/test_security_bandit.py)..banditnames no targets, or names targets withoutrecursive, still reports its findings (tests/test_security_bandit.py, checked with real bandit 1.9.4 on scratch trees).uv run bandit --ini .bandit -r --severity-level mediumreports 0 findings oversrc/andtests/, anduv run devops ci securitypasses; a probe file with a/tmppath undertests/makes it fail.changelog.d/1542.mdholds the entry under### Changed, andchangelog.d/419.mdis in house style under### Added.uv run devops ciis the pull request's gate.banditcode-scanning check passes after this merges.Related: #419, #1537, #1538 (the Low findings in
src/).feat(release): v0.2.33 (#1537)