Repository navigation
fix(security): the pluto, popeye and gitleaks adapters read what those tools actually write - #2220
Merged
Merged
Conversation
…e tools actually write Gitleaks runs `dir` (or `git`) with `--report-path -` and `--redact`, so its report comes on stdout and a leak is a finding of a scan that ran, not a failed scan. Popeye runs at lint level `-l warn` over the namespace that it gets, and the parser reads the `popeye.sections` report of Popeye 0.22. `scan_popeye` runs the Popeye adapter. Pluto names its target relative to the directory that it starts in, so `filePath` names the manifest, and the parser invents no kind, API or replacement. The tests replay runs recorded from the pinned tools. Closes #1434
dan-petty
marked this pull request as ready for review
October 25, 2026 18:19
9 tasks
dan-petty
pushed a commit
that referenced
this pull request
Oct 26, 2026
🤖 I have created a release *beep* *boop* --- ## [0.6.0](v0.5.0...v0.6.0) (2026-10-26) ### Features * **k8s:** devops k8s doctor checks the gitea stack: tunnel host, anonymous refusal, clone url, registry token and no egress ([#2200](#2200)) ([4af6ea6](4af6ea6)), closes [#2187](#2187) * **telemetry:** centralized loki logql streamer, prometheus sparklines & trace waterfalls (tab-telemetry) ([#2213](#2213)) ([5d368c8](5d368c8)), closes [#691](#691) * **telemetry:** send devops-cli logs with trace ids to Loki ([#2224](#2224)) ([28c1607](28c1607)), closes [#813](#813) ### Bug Fixes * **ai:** a transient rag lookup failure is not cached, so the same query recovers as soon as the backend answers ([#2222](#2222)) ([6f49beb](6f49beb)) * **ai:** rag chunks stay under the embedder's real token limit, not a four-characters-per-token estimate ([#2221](#2221)) ([a21ad61](a21ad61)) * **cli:** devops --dry-run on a command group given only its own options ([de49122](de49122)) * **cli:** devops --dry-run on a command group given only its own options previews it instead of crashing with IndexError ([#2259](#2259)) ([de49122](de49122)) * **cli:** drop devcontainer k8s auto-deploy for printed deploy-stack command ([#2227](#2227)) ([9278d3e](9278d3e)) * **config:** service clients use only configured urls and never fall back to an unconfigured localhost default ([#2219](#2219)) ([5b3817d](5b3817d)) * **git:** git output the code parses is read NUL-separated, and git outcomes come from exit codes ([#2257](#2257)) ([db1d234](db1d234)) * **github:** devops pr check-readiness on a branch with no open pull request exits with a clean error ([#2270](#2270)) ([0a1b312](0a1b312)) * **github:** project sync's board lookup and field provisioning fail closed on a failed read ([#2272](#2272)) ([40138f4](40138f4)) * **k8s:** argo cd sync honours --prune and --force, rollout promote and abort reach the status subresource, and teardown's argo check fails closed ([#2246](#2246)) ([7f3743b](7f3743b)) * **k8s:** authenticate service proxy with client auth settings and stream typed pod watch ([#2242](#2242)) ([1be8a79](1be8a79)) * **k8s:** dcgm-exporter's memory request and limit fit its measured footprint ([#2264](#2264)) ([4776f63](4776f63)) * **k8s:** deploy-stack decides helm recovery from helm's json status and adopts existing resources with --take-ownership ([#2243](#2243)) ([c5dbafc](c5dbafc)) * **k8s:** send LogQL to Loki unchanged and restrict kubectl fallback ([#2228](#2228)) ([29743af](29743af)), closes [#1431](#1431) * **k8s:** the argo cd and grafana credential sync revokes and mints a token only when the service refused the old one, and reports every other failure ([#2210](#2210)) ([1bb164b](1bb164b)) * **mcp:** an mcp tool stops at its timeout, also when its command runs in-process ([#2269](#2269)) ([6cf8ff0](6cf8ff0)) * **review:** a dependency advisory that admission rejects is not reported ([#2217](#2217)) ([4326906](4326906)) * **review:** a dependency advisory the base revision's pins already have is listed as pre-existing ([#2268](#2268)) ([00b3572](00b3572)) * **review:** a scanner finding that names a kubernetes object the reviewed commit lacks is rejected as object-not-in-commit ([#2225](#2225)) ([e69a4ff](e69a4ff)), closes [#1352](#1352) * **roadmap:** delete intake's refine hook; the cross-job rule is the one same-round refine trigger ([#2262](#2262)) ([90fc109](90fc109)) * **roadmap:** intake files and places a candidate that the model judges a duplicate, and names the possible original, instead of dropping or closing it ([#2223](#2223)) ([050620d](050620d)) * **roadmap:** the roadmap service logs each failed job's own error with its repository, and a configuration error without a traceback ([#2229](#2229)) ([96238be](96238be)) * **security:** the pluto, popeye and gitleaks adapters read what those tools actually write ([#2220](#2220)) ([6789a80](6789a80)) * **security:** vault leases requires --revoke and lease registry rebuilds on credential changes ([#2271](#2271)) ([efab944](efab944)) * **telemetry:** grafana aggregate lines sum and average the lines shown, read as dashed reference lines, and reach calls in flight ([#2215](#2215)) ([2084172](2084172)) * **telemetry:** wait for background exporter threads on client shutdown ([#2274](#2274)) ([e6b86b2](e6b86b2)), closes [#2273](#2273) --- 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.
Summary
Three scanner adapters of
src/devops_cli/security/started their tool with flags that it does not take, or read a report that it does not write. A scan that found something read as a failed scan or as a clean scan. Each defect was checked against the pinned tool on 2026-10-25.gitleaks detect --report-format json --no-git --source <path>writes nothing to stdout, because Gitleaks writes its report only to--report-path. A leak exited 1 with no output, which read as a failed scan.devops scan secretson a directory with a GitHub token said "Gitleaks was not run (Scanner exited with code 1 ... leaks found: 1)" and exited 0. The review anddevops scan reportin CI read the same outcome.-s error,warnnames resource sections, not a lint level, so Popeye exited 1 with "no linters matched query". The parser readsanitizers, which Popeye 0.22 does not write, and the namespace was not passed.scan_popeyeran its own command line.Resource,v1,apps/v1), so a PodSecurityPolicy read as one to move toapps/v1. Pluto writesfilePathas its working directory joined to the path it read (CheckForAPIVersioninpkg/finder/finder.go), so the absolute path that the adapter gave it made a path that does not exist.What changes
gitleaks dir(orgitleaks git) with--report-format json --report-path - --redact. The report comes on stdout, each secret readsREDACTED, and a leak is a finding of a scan that ran.popeye -o json -l warn, with-n <namespace>when it gets one. The parser readspopeye.sections: one finding for each issue atk8s:<linter>/<namespace>/<name>, followed by/<container>for an issue of one container (CONST_POPEYE_RESOURCE_GROUPS).scan_popeyeruns the adapter from the workspace and replies as the other agent scan tools do.build_commandthe directory that the command starts in, ascwd. Pluto names its target relative to it, sofilePathnames the manifest;os.path.normpathremoves the..of a review's scratch directory. The finding is at<manifest>:<Kind>/<namespace>/<name>, names the release that removed or deprecated the API, and says when Kubernetes has no replacement API.manifest_locationof the kube-linter adapter is now public and names the manifest.tests/fixtures/scanner_runs/runs_with_findings.jsonholds runs recorded from the pinned tools: a Gitleaks run that finds a GitHub token (redacted, so the repository holds no token), a Pluto run over two removed APIs, and a Popeye run at warn level over one namespace of the lab cluster (cut to three sections, with the cluster and context names asexample).ScannerFake.script_run_with_findingsanswers with them. The contract recording of the clean Gitleaks run is recorded again through the adapter with the new command.scanner-adapters, and an ADDED requirement ofagent-scan-tools.The kubeconform and Checkov parts of #1434 moved to #2214: neither tool is in
tools.lock, so their adapters cannot be tested on a run recorded at a pinned version.Evidence
devops ci fail-to-pass --base origin/main: 12 tests fail on the base and pass on this branch:tests/test_security_gitleaks.py:test_a_leak_that_gitleaks_reports_is_a_finding_of_a_scan_that_ran,test_the_agent_gitleaks_tool_reports_the_leak_that_gitleaks_foundtests/test_secops.py:test_pluto_reports_each_object_with_its_api_at_its_manifest,test_pluto_names_its_manifest_relative_to_the_scratch_directory_of_a_review,test_pluto_reads_a_file_path_that_climbs_out_of_its_working_directory,test_popeye_reports_each_issue_of_its_report_at_warn_level,test_popeye_scans_the_whole_cluster_when_it_gets_no_namespacetests/test_builtin_tools.py::test_the_agent_popeye_tool_runs_the_popeye_adapter_over_the_namespace(on the base, the test floor refuses the realpopeye -n argocd)tests/test_command_builders.py::test_command_builderstests/test_consolidation_security_scanner_base.py::test_scanner_contract_execution_and_parsing[popeye]tests/test_review_tool_runs.py::test_the_argument_template_marks_where_the_targets_and_the_files_of_a_scan_standtests/test_scanner_contract.py::test_an_adapter_makes_the_recorded_command_and_reads_the_recorded_run[gitleaks]Follow-up
devops scan secrets --jsonand the other scan commands print their progress line on stdout before the JSON.Item
Closes #1434
Change:
openspec/changes/archive/2026-10-25-1434-scanner-adapters-read-tool-output/