Skip to content

feat(scan): preview requests in dry run for scan commands - #2903

Merged
dan-petty merged 3 commits into
mainfrom
feat/2250-scan-dry-run
Oct 31, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/2250-scan-dry-run

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Classify scan commands and add planned requests in dry run.

Summary of changes

  • Decorated all 12 devops scan commands with dry-run classes:
    • request-plan: scan (root callback), scan trivy, scan fix, scan report, scan sast.
    • no-external-request: scan aibom, scan complexity, scan injection, scan sarif, scan sbom, scan secrets, scan workflows.
  • Built planned request generators in src/devops_cli/security/scan_plans.py.
  • Formatted plan outputs for table, JSON, and YAML formats.
  • Removed --dry-run options and simulated echos from local scanner commands.
  • Removed 12 scan entries from tests/fixtures/dry_run_gaps.json.
  • Added unit tests in tests/commands/test_scan_dry_run.py.

Closes #2250

Add dry-run classifications and planned requests for scan commands.

Scan commands that dispatch external tools now list their planned
requests and make none during a dry run. The read-only scanners
require no remote network requests and execute directly.

Closes #2250
@dan-petty dan-petty added type/feature Type feature: a new function scope/scan The devops scan command and its scanners labels Oct 31, 2026
…exceptions

Update scanner dry-run test assertions to use global dry-run flags and
assert planned request URLs. Replace blind Exception catch in
plan_scan_report with specific exception types.

Refs #2250
@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 19:19
@dan-petty
dan-petty merged commit 310322c into main Oct 31, 2026
19 checks passed
@dan-petty
dan-petty deleted the feat/2250-scan-dry-run branch October 31, 2026 19:29
dan-petty pushed a commit that referenced this pull request Oct 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.33.0](v0.32.0...v0.33.0)
(2026-10-31)


### Features

* **docker:** preview requests in dry run for docker and sandbox
commands ([#2923](#2923))
([b35ac53](b35ac53)),
closes [#2251](#2251)
* **roadmap:** add mattermost /roadmap slash command
([#2914](#2914))
([d669c15](d669c15)),
closes [#1395](#1395)
* **roadmap:** stage every Ready item, implement low effort
([#2924](#2924))
([7950748](7950748)),
closes [#2906](#2906)
* **scan:** preview requests in dry run for scan commands
([#2903](#2903))
([310322c](310322c)),
closes [#2250](#2250)

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/scan The devops scan command and its scanners type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(scan): scan commands list their requests in a dry run and make none

1 participant