Closed ribbybibby closed 2 years ago
Most formats do not record the version of Syft used. The version is reported as [not provided].
[not provided]
For instance, with cyclonedx-json:
cyclonedx-json
$ docker sbom --version sbom-cli-plugin 0.6.0, build 741c56e0db8c65d853f18e0a9b23287d33b30e05 $ docker sbom alpine:latest --format cyclonedx-json | jq -r .metadata.tools [ { "vendor": "anchore", "name": "syft", "version": "[not provided]" } ]
Looking at the upstream code, I think this is down to the fact that some/most formats don't respect the Descriptor.Version field in the SBOM and just use version.FromBuild().Version which won't be populated when using syft as a library.
Descriptor.Version
version.FromBuild().Version
0.0.0-dev
@ribbybibby thank you for reporting this problem and researching possible root causes. As you mentioned this is a Syft issue, so I will continue this thread on https://github.com/anchore/syft/issues/1010.
Most formats do not record the version of Syft used. The version is reported as
[not provided]
.For instance, with
cyclonedx-json
:Looking at the upstream code, I think this is down to the fact that some/most formats don't respect the
Descriptor.Version
field in the SBOM and just useversion.FromBuild().Version
which won't be populated when using syft as a library.0.0.0-dev