Skip to content

Unable to find encoder for "spdx-json=spdx.json" #3515

@wieringen

Description

@wieringen

What happened:

What you expected to happen:
I'm trying to sign and generate a SBOM and output it to a file. One of the options syft attest --help tells me exist is:

-o, --output stringArray report output format (<format>=<file> to output to a file), formats=[cyclonedx-json cyclonedx-xml github-json spdx-json spdx-tag-value syft-json syft-table syft-text template] (default [syft-json])

But when I try this option, it outputs the following error:
ERROR unable to write SBOM to file: unable to find encoder for "spdx-json=spdx.json"

I looked in the source and this behavior doesn't seem to be implemented. Any thoughts?

Steps to reproduce the issue:
go run cmd/syft/main.go attest DIGEST --key=KEY -o spdx-json=spdx.json

or

syft attest DIGEST --key=KEY -o spdx-json=spdx.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions