Repository navigation
Closed
Labels
scope/securitySecurity linters (trivy, bandit, gitleaks, kubeconform) and Vaultsource/agentFiled by an agenttype/bugType bug: the code does not do what it must
Description
Problem
Lines cited at 05e9388 (release/v0.2.29).
- A missing or failed scan reads as clean.
_run_tool_cmd(ai/tools/builtin_tools.py:42-63) returnsoutput or fallback_msgand never looks at the exit code.run_subprocessreports a missing binary as an empty stdout with exit 127 (core/process.py:413-418).- So when nothing ran, or the tool crashed, these tools answer "No ... detected":
scan_trivy,scan_kubelinter,scan_pluto,scan_bandit,scan_popeye,scan_gitleaksandscan_semgrep(:274-357). - The review's CVE verification reads
scan_trivyandscan_uv_audit(AGENTS.md, "Zero Hallucinated CVEs").
- The missing-binary check never fires.
:269looks forNo such file or directory: '<tool>'in the returned text. That text appears only if the runner raises, and it does not. - The tools duplicate argv that
security/*already owns.- Two of them read human output: Bandit
-r <path> -ll -q(:322) and barepopeye(:330, with no-o jsonand no context). ai/mcp/server.py:2038-2076is a third path, throughuv run devops scan .... Its Semgrep default config isauto(:2070), whileDEFAULT_SEMGREP_CONFIGisp/default.
- Two of them read human output: Bandit
Proposed remedy
- Call the adapters. The agent tools call the
security/*scanner adapters and render theScanOutcome:- its status first (
ok,failed,not installed,not_applicable); - then the findings through
mask_secrets, truncated as today.
- its status first (
- MCP. The MCP scan tools call the same adapters, with the configured Semgrep ruleset.
- Delete the per-tool argv in
builtin_tools.pyand the text check at:269.
Acceptance criteria
- For each agent scan tool, a missing binary returns "not installed" and a non-zero exit with empty output returns "failed" (process fake).
-
rg -n '\["(trivy|semgrep|bandit|gitleaks|kube-linter|popeye)"' src/devops_cli/aiprints nothing. - The MCP Semgrep tool uses
DEFAULT_SEMGREP_CONFIGunless the caller names a ruleset. - Tests run offline with fakes only at process and HTTP edges; each new test runs under 1 s.
-
uv run devops cipasses.
Related: #772, #1330, #1332, #1137, and the adapter fixes filed from the same audit (fix(security): the pluto, popeye, kubeconform, gitleaks and checkov adapters read what those tools actually write).
Found by the 2026-10-08 client-library audit.
Opened as a borrow (#1153, budget/borrowed): the agent filing quota is spent for this cycle, and this is a defect or security finding of the owner-requested 2026-10-08 client-library audit.
Metadata
Metadata
Assignees
Labels
scope/securitySecurity linters (trivy, bandit, gitleaks, kubeconform) and Vaultsource/agentFiled by an agenttype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 8, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
Failed or missing security scans are silently reported as clean in agent tools used for CVE verification, but this is a reporting defect rather than an exploitable vulnerability.Users relying on agent scan tools for security verification receive false 'clean' results when scanners are absent or crash, eroding trust in the tooling.Requires rewiring six agent tools and the MCP path to call existing security adapters, removing duplicated argv, and adding offline tests, but the adapters already exist.test(review): scanner_fake answers the review scanners through the To…