feat: adds file --output and --sbomOutput flags to specify custom file paths#387
Merged
Conversation
ae7e429 to
5030773
Compare
Contributor
issue: if I don't provide a file name in the output path, the CLI errors. If the path the user provides is just a directory, and doesn't give a custom filename, we should save with the default file name, to that path. So in this example, I would expect |
530f3e3 to
74ff59b
Compare
74ff59b to
f1de0b6
Compare
KLongmuirHD
approved these changes
Oct 23, 2025
jeremymwells
approved these changes
Oct 23, 2025
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.
Custom Output Paths
Summary
Enabled hd scan eol to write reports and SBOMs to caller-defined destinations and improved related UX.
What changed
Added --output and --sbomOutput flags with validation ensuring they pair with --save / --saveSbom.
Updated scan workflow to pass custom paths into the file service, adjust display hints, and emit warnings when outputs are skipped.
Refactored file service to resolve absolute targets, enforce directory existence, and standardize JSON write error handling.
Expanded E2E and unit coverage around new flags, error cases, and cleanup helpers; documented the workflow in README examples.
Prevented the cleanup spinner from running when commands fail, so warning messages remain visible.