Closed maxhbr closed 3 years ago
Thanks @maxhbr for catching this. Fix will be out shortly.
The SPDX output seems to not contain the full paths for files, just the file names. From conversation:
in the spdx for photon:3.0 I can see for example:
{ "fileName": "libc.so", "SPDXID": "SPDXRef-abd286f", "checksums": [ { "algorithm": "SHA1", "checksumValue": "4229de92a0517d2b08ea21913771825d84c82977" } ], "licenseConcluded": "NOASSERTION", "copyrightText": "NOASSERTION", "fileTypes": [ "TEXT" ], "licenseInfoInFiles": [ "NONE" ] },
but the file is at
$LAYER1/usr/lib/libc.so
. Shouldn't thefileName
contain the full path? As far as I can see the full location is nowhere preserved in the spdx json.
Just a side note packageFileName
is not required (see https://github.com/spdx/spdx-spec/blob/239189bee6074d8228a1bd7cc24d669934585d92/schemas/spdx-schema.json#L419-419)
Describe the bug The generated output, generated via
"spdxjson"
does not validate against the spdx-schema.json. I observed the following four issues.The example was generated by scanning
osadl/debian-docker-base-image:buster-amd64-211011
and the result is tern.spdx.json.gz.The issues:
(1) The schema expects that
creationInfo.creators
to be an arrayThe schema has the following section
the json output contains a
string
:and the schema validator complains with:
(2) The schema expects that
packages[].filesAnalyzed
should be a bool and not a stringThe json contains
"false"
instead offalse
in the serialized output:The schema expects filesAnalyzed to be a bool.
(3) The packages do not have a key
fileName
, it should bepackageFileName
The schema does not contain the
fileName
key in the packages section. The packageFileName is defined in the schema.The JSON contains:
(4) not all packages contained the required key
name
The package name is required and not allowed to be
null
.The full package is:
The environment