Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Grype Convert #2224

Open
tidusete opened this issue Oct 30, 2024 · 1 comment
Open

Feature request: Grype Convert #2224

tidusete opened this issue Oct 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@tidusete
Copy link

What would you like to be added:

I would like to add a new command, grype convert, to enable the conversion of previously generated scan report files into various formats (e.g., JSON, CycloneDX JSON, Table) without needing to re-scan the components.

Why is this needed:

Currently, generating multiple report formats (such as JSON, CycloneDX JSON, and Table) requires re-running the scan each time. This process significantly increases the job's duration and resource usage. Having a command to convert existing reports into multiple formats would save time and resources, improving the efficiency of the scanning workflow.

Additional context:

Implementing either the grype convert command or enabling multiple output formats in a single scan would streamline report generation by eliminating redundant scans.

@tidusete tidusete added the enhancement New feature or request label Oct 30, 2024
@kzantow
Copy link
Contributor

kzantow commented Oct 30, 2024

I think having a convert command would be great -- one thing it would help with is allowing more quick experimentation with templates, without needing to wait for a scan to run repeatedly.

Grype does support multiple output formats already, using multiple -o flags of the form <format>=<filename>. For example, this works:

grype alpine:latest -o table -o table=alpine-latest.txt -o sarif=alpine-latest.sarif.json -o json=alpine-latest.json

@kzantow kzantow moved this to Ready in OSS Oct 30, 2024
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
Status: Ready
Development

No branches or pull requests

2 participants