Skip to content

Add --from flag#3035

Merged
wagoodman merged 2 commits intomainfrom
add-from-flag
Nov 7, 2025
Merged

Add --from flag#3035
wagoodman merged 2 commits intomainfrom
add-from-flag

Conversation

@wagoodman
Copy link
Copy Markdown
Contributor

This brings grype up to parity with syft's --from flag so users do not need to specify a scheme in the user input and instead have the additional option to provide the same scheme value as a separate flag:

grype --from docker alpine:latest

This has the same semantics as in syft, so multiple values can be provided, allowing for multiple sources to be attempted in order:

# try podman first, if unsuccessful try docker
grype --from podman,docker alpine:latest

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: spiffcs <32073428+spiffcs@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman added the enhancement New feature or request label Nov 6, 2025
Comment thread cmd/grype/cli/options/grype.go Outdated
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman enabled auto-merge (squash) November 7, 2025 15:23
@wagoodman wagoodman merged commit ee49415 into main Nov 7, 2025
12 checks passed
@wagoodman wagoodman deleted the add-from-flag branch November 7, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants