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(cli): devops scan commands print their progress line on stdout before the JSON, so --json output does not parse #2216
devops scan secrets <path> --json writes the line Executing Gitleaks secret scan on '<path>'... to stdout before the JSON. So stdout is not JSON, and a program that reads it fails.
Reproduced on 2026-10-25 with Gitleaks 8.30.1 on a directory that holds one clean file:
print_muted writes to stdout unless it gets to_stderr=True (src/devops_cli/output/console.py). These scan commands call it before their scan, also when the output format is JSON or another format that a program reads (src/devops_cli/commands/scan.py): scan trivy (trivy_executing), scan secrets (gitleaks_executing), scan workflows (zizmor_executing), scan sast (semgrep_executing), scan iac (checkov_executing) and scan injection (injection_executing). The MCP tools scan_trivy, scan_sast and scan_secrets run these commands.
Proposed remedy
Write the progress line to stderr, or write it only when the output format is the table. Find the other commands that print progress before machine-readable output, and add a check that runs each command with --format json and parses its stdout.
Acceptance criteria
For each scan command above, the stdout of --json and of --format json is valid JSON, and a test parses it.
Activity
dan-petty commentedon Oct 25, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The issue describes a bug where progress lines interfere with JSON parsing, requiring a fix in output handling.This bug affects programmatic consumption of scan command outputs and is a regression from expected behavior.Fixing this ensures tools can properly parse JSON output from scan commands, improving automation support.The fix requires modifying console output logic in multiple scan command functions and testing the changes thoroughly.Both items relate to scan command output formats but the candidate addresses stdout vs stderr placement while item 2107 focuses on missing status and reason in JSON output.fix(security): the pluto, popeye and gitleaks adapters read what thos…
chore(main): release 0.7.0 (#2329)