Phase 2c: add --format and --output-dir flags for report selection#121
Merged
Conversation
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
Adds
--formatand--output-dirso users can choose which report formats arewritten and where, instead of always generating all four (json/csv/pdf/html) to the
default results directory. Third of the Phase 2 sequence.
Changes
--format <list>: comma-separated subset ofjson,csv,pdf,html. Validated andnormalized to canonical order. Invalid values exit 2.
--output-dir <dir>: overrides the report destination for the run (compose andnon-compose scans). Also used as the AI-findings report-path hint and shown in the
run banner.
ReportGenerator.generate_all_reportsandDockerSecurityScanner.generate_all_reportsboth accept an optional
formatslist;Nonepreserves the existing "writeeverything" default.
Notes
the usual results directory.
csvis among therequested formats — unchanged data behavior, just now skippable via
--format.Testing
ruff check .passes.pytest: 119 passed (+5: format-subset generation tests, invalid --format, and--format/--output-dir threading through the CLI).
--format json,html(only those two ondisk),
--output-dir(files land in the custom directory), invalid --format (exit 2).