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

Write to multiple output files (like syft) #648

Closed
debuglevel opened this issue Feb 27, 2022 · 6 comments · Fixed by #1346
Closed

Write to multiple output files (like syft) #648

debuglevel opened this issue Feb 27, 2022 · 6 comments · Fixed by #1346
Labels
enhancement New feature or request I/O Describes bug or enhancement around application input or output

Comments

@debuglevel
Copy link

What would you like to be added:
Unlike syft, grype does not seem to support writing to (multiple) output files:
grype ubuntu:20.04 -o json=docker.vulnerabilities.grype.json -o table=docker.vulnerabilities.grype.table -o table

Works with syft:
syft ubuntu:20.04 -o json=docker.vulnerabilities.grype.json -o table=docker.vulnerabilities.grype.table -o table

Why is this needed:
So that grype and syft are more similar :)

Additional context:

@debuglevel debuglevel added the enhancement New feature or request label Feb 27, 2022
@spiffcs
Copy link
Contributor

spiffcs commented Feb 28, 2022

Great suggestion @debuglevel. If I have some free time this week I'll look about grabbing this and upgrading grype in the way you described.

@mkesper
Copy link

mkesper commented Mar 8, 2022

Yes, it would be nice to output e.g. table format for easy reading and CycloneDX or JSON for automation at the same time.

@spiffcs spiffcs self-assigned this Mar 10, 2022
@spiffcs
Copy link
Contributor

spiffcs commented Mar 10, 2022

Hey everyone! I've put my name on this one so I don't forget about it, but am working on another feature right now for attestations in syft. If any of you would like to take a stab at this feel free and I'll happily review the PR, add commits, and walk you through the contribution process. Otherwise, I'll make sure to circle back on this when I have the time.

@luhring luhring added the I/O Describes bug or enhancement around application input or output label Mar 10, 2022
@spiffcs spiffcs added this to OSS Jun 1, 2022
@spiffcs spiffcs moved this to Triage (Comments or Progress Made) in OSS Jun 1, 2022
@spiffcs spiffcs moved this from Triage (Comments or Progress Made) to In Progress (Actively Resolving) in OSS Jun 29, 2022
@spiffcs spiffcs moved this from In Progress (Actively Resolving) to Triage (Comments or Progress Made) in OSS Jul 18, 2022
@kzantow kzantow moved this from Parking Lot (Comments or Progress) to Backlog (Pulled Forward for Priority) in OSS Nov 8, 2022
@spiffcs spiffcs removed their assignment Nov 29, 2022
@mike-19
Copy link

mike-19 commented Jan 10, 2023

its been quite a while since the last update on this issue, is anyone looking into it ?

@mike-19
Copy link

mike-19 commented Mar 13, 2023

Is there any update on this ask? Our run time build cycles are increased since we have to grype scans multiple times for different reporting formats we need. Our use case is that we use a custom HTML template for generating a cleaner readable data format for end users; we also run another scan to generate JSON format data for data manipulation and keep audit checks documented for our internal processes and compliance audits. Running scan just for the sake of generating different formats of reports are time-consuming in our build cycles

@kzantow
Copy link
Contributor

kzantow commented Mar 13, 2023

This hasn't been prioritized for us at the moment, but we'd be happy to help if someone anyone would like to create a PR for this -- it shouldn't be too complicated to port the changes made in Syft. This deals with parsing the options and the multiWriter is responsible for writing the files -- these would have to be adapted to the Grype data model and Presenter idiom, of course.

olivierboudet added a commit to olivierboudet/grype that referenced this issue Jun 10, 2023
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jun 10, 2023
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jun 10, 2023
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jun 10, 2023
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jun 15, 2023
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jun 15, 2023
Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Olivier Boudet <[email protected]>
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jul 3, 2023
Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Olivier Boudet <[email protected]>
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jul 3, 2023
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jul 3, 2023
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jul 3, 2023
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jul 3, 2023
olivierboudet added a commit to olivierboudet/grype that referenced this issue Jul 3, 2023
wagoodman pushed a commit to olivierboudet/grype that referenced this issue Jul 11, 2023
Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Olivier Boudet <[email protected]>
wagoodman pushed a commit to olivierboudet/grype that referenced this issue Jul 11, 2023
wagoodman pushed a commit to olivierboudet/grype that referenced this issue Jul 11, 2023
Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
wagoodman pushed a commit to olivierboudet/grype that referenced this issue Jul 11, 2023
review

Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
wagoodman added a commit that referenced this issue Jul 11, 2023
* feat(outputs): allow to set multiple outputs (#648)

Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>

* feat(outputs): allow to set multiple outputs (#648)

review

Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>

* use syft format writter pattern and de-emphasize presenter package

Signed-off-by: Alex Goodman <[email protected]>

---------

Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Olivier Boudet <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Co-authored-by: Alex Goodman <[email protected]>
@github-project-automation github-project-automation bot moved this from Backlog to Done in OSS Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request I/O Describes bug or enhancement around application input or output
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants