Repository navigation
refactor(security): src has no unreviewed Bandit findings, and the gate scans src at low severity - #2560
Merged
Conversation
Owner
Author
|
Test evidence:
Pending a person:
|
dan-petty
marked this pull request as ready for review
October 28, 2026 23:14
dan-petty
force-pushed
the
refactor/1538-bandit-low-findings
branch
from
October 28, 2026 23:52
67a69a5 to
89179b4
Compare
Owner
Author
|
Rework (the owner chose the code fix): no new Bandit 1.9.4 low findings in
|
…te scans src at low severity The security row of `devops ci` ran Bandit over `src/` and `tests/` at medium severity, so nobody reviewed a low finding in `src/`. It now runs Bandit over `src/` at low and over `tests/` at medium, with the shared `.bandit`, which skips B404, B603, B110 and B112 with their reasons. - The asserts of `roadmap/intake.py` become checks that raise `RoadmapIntakeError` before any write; the benchmark runner branches on `client is None`. - `ai/rag/drift.py` and `github/metrics.py` run `git` through the process seam. - Two literals are fixed in code; the others carry a `# nosec` with its rules and a reason, and a test refuses a bare marker in `src/`. - The `src nosec` suppression ceiling rises from 13 to 23.
…e also scans src at low
…s in code, and lower the src nosec ceiling to 10 No finding in src gets a new `# nosec` marker: - `SweepStatus`, `ProbeStatus` and `DefectClass` take `auto()`, with the values that run records and findings already store. - `CONST_GH_AUTH_ENV_VAR` and `CONST_RUNS_INDEX_AUTH_OBJECT` replace two names that read as credentials. - The Argo CD admin call and the Vault lease defaults take named constants. - Retry jitter and the chaos fault rate draw from `secrets.SystemRandom()`. - The seeded benchmark sample and defect draw use `core/draws.py`, which orders items by the SHA-256 of the seed and each position. The `src nosec` suppression ceiling falls from 13 to 10.
…on a timeout and on a count git does not give
dan-petty
force-pushed
the
refactor/1538-bandit-low-findings
branch
from
October 29, 2026 00:03
89179b4 to
9c68655
Compare
dan-petty
pushed a commit
that referenced
this pull request
Oct 29, 2026
🤖 I have created a release *beep* *boop* --- ## [0.12.0](v0.11.3...v0.12.0) (2026-10-29) ### Features * **ai:** constrain structured replies on the openai and claude providers ([#2550](#2550)) ([4f7390a](4f7390a)) * **argo:** retire the Helm release records of the charts that Argo CD renders ([#2568](#2568)) ([cabfcd4](cabfcd4)) * **k8s:** devops k8s tunnel keeps the cloudflared forward to k8s.<domain> running ([#2567](#2567)) ([f9493fa](f9493fa)), closes [#1641](#1641) * **monitoring:** alert when the otel collector fails to export spans, metric points or log records ([#2565](#2565)) ([4fc8ff7](4fc8ff7)) * **telemetry:** the roadmap Service counts its GitHub writes, budget holds, Firecrawl searches and own deliveries, and caps refine's comments on one item ([#2556](#2556)) ([9819877](9819877)), closes [#2475](#2475) ### Bug Fixes * **git:** report a worktree that a run in parallel removed as removed, not a failed reclaim ([#2557](#2557)) ([a556984](a556984)), closes [#2408](#2408) * **k8s:** the devops perimeter opens only the collector's OTLP/HTTP port, 4318 ([#2549](#2549)) ([d156ce7](d156ce7)) * **sandbox:** devops sandbox logs reads each line with its stream from a real engine ([#2546](#2546)) ([e7216d5](e7216d5)), closes [#2520](#2520) * **service:** the webhook route refuses an unsigned or oversized delivery before it reads the body, and a rate limit guards it ([#2553](#2553)) ([40efcd4](40efcd4)), closes [#2476](#2476) ### Performance Improvements * **ai:** price a request with one load of the settings ([#2555](#2555)) ([5d86538](5d86538)), closes [#1420](#1420) ### Code Refactoring * **config:** a default that backs a settings field is read only through the settings ([#2561](#2561)) ([0702d13](0702d13)) * **exceptions:** each exception class declares its error_code and exit_code ([#2558](#2558)) ([410dece](410dece)) * **review:** render the review report from one input, outside the orchestrator ([#2563](#2563)) ([9e73e6d](9e73e6d)), closes [#1008](#1008) * **security:** src has no unreviewed Bandit findings, and the gate scans src at low severity ([#2560](#2560)) ([45261dd](45261dd)), closes [#1538](#1538) * **security:** the scanners stop looking for mocks, and their tests run on the scanner fake ([#2551](#2551)) ([2b7f37a](2b7f37a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The security row of
devops ciran Bandit oversrc/andtests/at medium severity, so nobody reviewed a low finding insrc/. On origin/main, Bandit 1.9.4 found 124 low findings insrc/. This change fixes them in code and makes a new low finding insrc/fail the gate. No finding gets a new# nosecmarker, and thesrc nosecsuppression ceiling falls from 13 to 10..bandittwo times: oversrc/at low severity and above, then overtests/at medium and above. Each file is scanned once, as before.devops ci security --severitysets the threshold of thetests/run..banditskips B404 and B603 (a CLI starts processes by design, through the process seam) and B110 and B112 (the swallowed-failures ratchet counts them). All four are low severity, so the medium run overtests/does not change. The three# nosec B603markers insrc/go.roadmap/intake.pybecome checks that raiseRoadmapIntakeError._apply_placementmakes its checks before any write._Entry.neighbourtakes the number that the shortlist holds, and the benchmark runner branches onclient is None, so two asserts go with no check.ai/rag/drift.pyandgithub/metrics.pyrungitthroughrun_subprocessas local reads. Each keeps its fallback, and its log line gives the seam's error, which names a missing program.SweepStatus,ProbeStatusandDefectClasstakeauto(), with the values that run records and findings already store. A test pins each.CONST_GH_AUTH_ENV_VARandCONST_RUNS_INDEX_AUTH_OBJECTreplace two names that read as credentials.sanitizer.pymasks with one_URL_MASKconstant, andvulnerability_lookup.pytakestoken or None.secrets.SystemRandom().core/draws.py, which orders the items by the SHA-256 of the seed and each position, so the same seed gives the same draw.# nosecinsrc/names its rules and a reason, and a test refuses a bare marker.The proposal lists each finding and its fix.
Closes #1538
Change:
openspec/changes/archive/2026-10-28-1538-bandit-low-findings/