scout-cli icon indicating copy to clipboard operation
scout-cli copied to clipboard

SBOM command with `-o` flag logs progress in JSON lines

Open dvdksn opened this issue 1 year ago • 1 comments
trafficstars

When exporting an SBOM to a file with the--output flag, the log output is printed as raw json lines in the terminal.

docker scout sbom --format spdx -o sbom.spdx.json docker/scout-cli:latest
{"level":"info","msg":"SBOM of image already cached, 250 packages indexed\n","time":"2024-02-14T14:22:08+01:00"}
{"level":"info","msg":"Report written to sbom.spdx.json\n","time":"2024-02-14T14:22:08+01:00"}

I guess it should look the same as for the other commands, e.g.

docker scout quickview docker/scout-cli:latest
    ✓ SBOM of image already cached, 250 packages indexed

dvdksn avatar Feb 14 '24 13:02 dvdksn

The json logs are in purpose for some conditions as DD needed them to show progress. Not sure that is still the case.

cdupuis avatar Feb 14 '24 13:02 cdupuis