-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1137 from xnox/backpopulate-supplier
backpopulate supplier & set filesAnalyzed=false
- Loading branch information
Showing
9 changed files
with
210 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,43 +59,39 @@ | |
"SPDXID": "SPDXRef-Package-pretend-baselayout-1.0.0-r0", | ||
"name": "pretend-baselayout", | ||
"versionInfo": "1.0.0-r0", | ||
"filesAnalyzed": true, | ||
"filesAnalyzed": false, | ||
"licenseConcluded": "NOASSERTION", | ||
"licenseDeclared": "MIT", | ||
"downloadLocation": "NOASSERTION", | ||
"originator": "Organization: Unknown", | ||
"supplier": "Organization: Unknown", | ||
"copyrightText": "\n", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE_MANAGER", | ||
"referenceLocator": "pkg:apk/unknown/[email protected]?arch=aarch64", | ||
"referenceType": "purl" | ||
} | ||
], | ||
"packageVerificationCode": { | ||
"packageVerificationCodeValue": "8058dd7b970804f7b4a4f6e10374b4d02a5a01f3" | ||
} | ||
] | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-Package-replayout-1.0.0-r0", | ||
"name": "replayout", | ||
"versionInfo": "1.0.0-r0", | ||
"filesAnalyzed": true, | ||
"filesAnalyzed": false, | ||
"licenseConcluded": "NOASSERTION", | ||
"licenseDeclared": "MIT", | ||
"downloadLocation": "NOASSERTION", | ||
"originator": "Organization: Unknown", | ||
"supplier": "Organization: Unknown", | ||
"copyrightText": "\n", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE_MANAGER", | ||
"referenceLocator": "pkg:apk/unknown/[email protected]?arch=aarch64", | ||
"referenceType": "purl" | ||
} | ||
], | ||
"packageVerificationCode": { | ||
"packageVerificationCodeValue": "d70ccb53a479f44c7ac6f023492b3520f23c21b3" | ||
} | ||
] | ||
} | ||
], | ||
"relationships": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,43 +59,39 @@ | |
"SPDXID": "SPDXRef-Package-pretend-baselayout-1.0.0-r0", | ||
"name": "pretend-baselayout", | ||
"versionInfo": "1.0.0-r0", | ||
"filesAnalyzed": true, | ||
"filesAnalyzed": false, | ||
"licenseConcluded": "NOASSERTION", | ||
"licenseDeclared": "MIT", | ||
"downloadLocation": "NOASSERTION", | ||
"originator": "Organization: Unknown", | ||
"supplier": "Organization: Unknown", | ||
"copyrightText": "\n", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE_MANAGER", | ||
"referenceLocator": "pkg:apk/unknown/[email protected]?arch=x86_64", | ||
"referenceType": "purl" | ||
} | ||
], | ||
"packageVerificationCode": { | ||
"packageVerificationCodeValue": "8058dd7b970804f7b4a4f6e10374b4d02a5a01f3" | ||
} | ||
] | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-Package-replayout-1.0.0-r0", | ||
"name": "replayout", | ||
"versionInfo": "1.0.0-r0", | ||
"filesAnalyzed": true, | ||
"filesAnalyzed": false, | ||
"licenseConcluded": "NOASSERTION", | ||
"licenseDeclared": "MIT", | ||
"downloadLocation": "NOASSERTION", | ||
"originator": "Organization: Unknown", | ||
"supplier": "Organization: Unknown", | ||
"copyrightText": "\n", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE_MANAGER", | ||
"referenceLocator": "pkg:apk/unknown/[email protected]?arch=x86_64", | ||
"referenceType": "purl" | ||
} | ||
], | ||
"packageVerificationCode": { | ||
"packageVerificationCodeValue": "d70ccb53a479f44c7ac6f023492b3520f23c21b3" | ||
} | ||
] | ||
} | ||
], | ||
"relationships": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
pkg/sbom/generator/spdx/testdata/expected.libattr1.spdx.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"SPDXID": "SPDXRef-DOCUMENT", | ||
"name": "sbom", | ||
"spdxVersion": "SPDX-2.3", | ||
"creationInfo": { | ||
"created": "0001-01-01T00:00:00Z", | ||
"creators": [ | ||
"Tool: apko (devel)", | ||
"Organization: Chainguard, Inc" | ||
], | ||
"licenseListVersion": "3.16" | ||
}, | ||
"dataLicense": "CC0-1.0", | ||
"documentNamespace": "https://spdx.org/spdxdocs/apko/", | ||
"documentDescribes": [ | ||
"SPDXRef-Package-" | ||
], | ||
"packages": [ | ||
{ | ||
"SPDXID": "SPDXRef-Package-", | ||
"name": "", | ||
"versionInfo": "3.0", | ||
"filesAnalyzed": false, | ||
"description": "apko operating system layer", | ||
"downloadLocation": "NOASSERTION", | ||
"supplier": "Organization: Apko Images, Plc", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE-MANAGER", | ||
"referenceLocator": "pkg:oci/image?mediaType=\u0026os=linux", | ||
"referenceType": "purl" | ||
} | ||
] | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-Package-libattr1-2.5.1-r2", | ||
"name": "libattr1", | ||
"versionInfo": "2.5.1-r2", | ||
"filesAnalyzed": false, | ||
"licenseConcluded": "NOASSERTION", | ||
"licenseDeclared": "GPL-2.0-or-later", | ||
"downloadLocation": "NOASSERTION", | ||
"originator": "Organization: Apko Images, Plc", | ||
"supplier": "Organization: Apko Images, Plc", | ||
"copyrightText": "TODO\n", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE_MANAGER", | ||
"referenceLocator": "pkg:apk/wolfi/[email protected]?arch=x86_64", | ||
"referenceType": "purl" | ||
} | ||
] | ||
} | ||
], | ||
"relationships": [] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
curl -q https://packages.wolfi.dev/os/x86_64/font-ubuntu-0.869-r1.apk | tar Ozx var/lib/db/sbom/font-ubuntu-0.869-r1.spdx.json >font-ubuntu.spdx.json 2>/dev/null | ||
|
||
curl -q https://packages.wolfi.dev/os/x86_64/libattr1-2.5.1-r2.apk | tar Ozx var/lib/db/sbom/libattr1-2.5.1-r2.spdx.json >libattr1.spdx.json 2>/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"SPDXID": "SPDXRef-DOCUMENT-apk-libattr1-2.5.1-r2", | ||
"name": "apk-libattr1-2.5.1-r2", | ||
"spdxVersion": "SPDX-2.3", | ||
"creationInfo": { | ||
"created": "2023-01-28T06:47:56Z", | ||
"creators": [ | ||
"Tool: melange (v0.2.0-97-g0d91d11)", | ||
"Organization: Chainguard, Inc" | ||
], | ||
"licenseListVersion": "3.18" | ||
}, | ||
"dataLicense": "CC0-1.0", | ||
"documentNamespace": "https://spdx.org/spdxdocs/chainguard/melange/", | ||
"documentDescribes": [ | ||
"SPDXRef-Package-libattr1-2.5.1-r2" | ||
], | ||
"files": [ | ||
{ | ||
"SPDXID": "SPDXRef-File--lib-libattr.so.1.1.2501", | ||
"fileName": "/lib/libattr.so.1.1.2501", | ||
"licenseConcluded": "NOASSERTION", | ||
"checksums": [ | ||
{ | ||
"algorithm": "SHA1", | ||
"checksumValue": "1b3a09852617e25522cfb46410c7f68c4149a7b5" | ||
}, | ||
{ | ||
"algorithm": "SHA256", | ||
"checksumValue": "575c60ac3c5a5201ef30cec6b8f6aded46c76a35b27eaf0700a617f95236c3cd" | ||
}, | ||
{ | ||
"algorithm": "SHA512", | ||
"checksumValue": "b437a3dd87c7777b0c0ee0ecb7ce3d24794e027471891f9861ec08e6b30e2896e5962a887cda2170156721d99685405fea39cc655a8606e441fdf6c1b3697980" | ||
} | ||
] | ||
} | ||
], | ||
"packages": [ | ||
{ | ||
"SPDXID": "SPDXRef-Package-libattr1-2.5.1-r2", | ||
"name": "libattr1", | ||
"versionInfo": "2.5.1-r2", | ||
"filesAnalyzed": true, | ||
"hasFiles": [ | ||
"SPDXRef-File--lib-libattr.so.1.1.2501" | ||
], | ||
"licenseConcluded": "NOASSERTION", | ||
"licenseDeclared": "GPL-2.0-or-later", | ||
"downloadLocation": "NOASSERTION", | ||
"copyrightText": "TODO\n", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE_MANAGER", | ||
"referenceLocator": "pkg:apk/wolfi/[email protected]?arch=x86_64", | ||
"referenceType": "purl" | ||
} | ||
], | ||
"packageVerificationCode": { | ||
"packageVerificationCodeValue": "ac84254f783b469f1ea6212ab2645b7c839144f9" | ||
} | ||
} | ||
], | ||
"relationships": [ | ||
{ | ||
"spdxElementId": "SPDXRef-Package-libattr1-2.5.1-r2", | ||
"relationshipType": "CONTAINS", | ||
"relatedSpdxElement": "SPDXRef-File--lib-libattr.so.1.1.2501" | ||
} | ||
] | ||
} |