-
Notifications
You must be signed in to change notification settings - Fork 30
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
always output SBOM table #238
Conversation
Signed-off-by: Jonas Galvão Xavier <[email protected]>
c7bb0d8
to
be9b4be
Compare
Signed-off-by: Jonas Galvão Xavier <[email protected]>
Signed-off-by: Jonas Galvão Xavier <[email protected]>
@@ -126,7 +126,7 @@ async function executeSyft({ | |||
throw new Error("Invalid input, no image or path specified"); | |||
} | |||
|
|||
args = [...args, "-o", format]; | |||
args = [...args, "-o", format, "-o", "table"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is going to work correctly. The way the code currently works, syft is invoked and the stdout captured as the sbom. Looking at the changes in the snapshots, this change seems to have caused multiple types of SBOMs to be output to stdout. Instead, we'd need to do something like syft -o table -o spdx-json=some-file.spdx.json
and then instead of using stdout as the sbom, just print stdout to the console as this would have the table output, and then read or otherwise use the sbom file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see :) I got it really wrong.
We discussed this a while ago, but I'm not actually sure this is especially useful. More useful would be a convert command, if someone really wanted a text version of the SBOM dumped to the logs, it would be a simple script using syft to convert an sbom to the table view. |
@kzantow agreed, I should have closed that issue (or had it waiting) in favor of the conversion approach. |
Always print SBOM as table, even with file output.
Closes: #46
Signed-off-by: Jonas Galvão Xavier [email protected]