-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When piping with the bomctl export <SBOM_ID> command to other tools, the other tools fail because log output is also being sent.
gitpod /workspace/bomctl-playground (main) $ bomctl fetch https://raw.githubusercontent.com/bomctl/bomctl-playground/main/examples/bomctl-container-image/bomctl_bomctl_v0.3.0.cdx.json
INFO fetch: Fetching from HTTP URL url=https://raw.githubusercontent.com/bomctl/bomctl-playground/main/examples/bomctl-container-image/bomctl_bomctl_v0.3.0.cdx.json
INFO fetch: Fetching from HTTP URL url=https://raw.githubusercontent.com/bomctl/bomctl-playground/main/examples/bomctl-container-image/app/bomctl_0.3.0_linux_amd64.tar.gz.spdx.json
gitpod /workspace/bomctl-playground (main) $ bomctl ls
ID │ Version │ # Nodes
──────────────────────────────────────────────────┼──────────┼──────────
urn:uuid:f360ad8b-dc41-4256-afed-337a04dff5db │ 1 │ 6
bomctl_0.3.0_linux_amd64.tar.gz │ 0 │ 81
gitpod /workspace/bomctl-playground (main) $ bomctl export urn:uuid:f360ad8b-dc41-4256-afed-337a04dff5db | grype
failed to catalog: unable to decode sbom: sbom format not recognized
If we pipe the stdout of bomctl export to a file, the file contents are ...
INFO export: Exporting Document sbomID=urn:uuid:f360ad8b-dc41-4256-afed-337a04dff5db
{
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"serialNumber": "urn:uuid:f360ad8b-dc41-4256-afed-337a04dff5db",
...
}
... and the first line of INFO export: Exporting Document ... should not be in stdout.
bomctl version v0.3.1 (built on 2024-08-19T21:18:14Z)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working