forked from aquasecurity/trivy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sbom): update logic for work with files in spdx format (aquasecur…
…ity#4513) Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
- Loading branch information
1 parent
c5a05cb
commit 01f1d98
Showing
8 changed files
with
384 additions
and
72 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
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
91 changes: 91 additions & 0 deletions
91
pkg/sbom/spdx/testdata/happy/with-files-in-relationships-bom.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,91 @@ | ||
{ | ||
"spdxVersion": "SPDX-2.3", | ||
"dataLicense": "CC0-1.0", | ||
"SPDXID": "SPDXRef-DOCUMENT", | ||
"name": "app", | ||
"documentNamespace": "http://aquasecurity.github.io/trivy/filesystem/app-8e571278-2221-4dcd-bc56-0b256210fa91", | ||
"creationInfo": { | ||
"licenseListVersion": "", | ||
"creators": [ | ||
"Organization: aquasecurity", | ||
"Tool: trivy-dev" | ||
], | ||
"created": "2023-05-31T05:58:45Z" | ||
}, | ||
"packages": [ | ||
{ | ||
"name": "app", | ||
"SPDXID": "SPDXRef-Filesystem-13b142ca391a006e", | ||
"downloadLocation": "NONE", | ||
"copyrightText": "", | ||
"attributionTexts": [ | ||
"SchemaVersion: 2" | ||
], | ||
"primaryPackagePurpose": "SOURCE" | ||
}, | ||
{ | ||
"name": "node-pkg", | ||
"SPDXID": "SPDXRef-Application-24f8a80152e2c0fc", | ||
"downloadLocation": "NONE", | ||
"sourceInfo": "Node.js", | ||
"copyrightText": "", | ||
"primaryPackagePurpose": "APPLICATION" | ||
}, | ||
{ | ||
"name": "yargs-parser", | ||
"SPDXID": "SPDXRef-Package-c3508825bf3861d8", | ||
"versionInfo": "21.1.1", | ||
"supplier": "NOASSERTION", | ||
"downloadLocation": "NONE", | ||
"licenseConcluded": "ISC", | ||
"licenseDeclared": "ISC", | ||
"copyrightText": "", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE-MANAGER", | ||
"referenceType": "purl", | ||
"referenceLocator": "pkg:npm/yargs-parser@21.1.1" | ||
} | ||
], | ||
"attributionTexts": [ | ||
"PkgID: yargs-parser@21.1.1" | ||
], | ||
"primaryPackagePurpose": "LIBRARY" | ||
} | ||
], | ||
"files": [ | ||
{ | ||
"fileName": "node_modules/yargs-parser/package.json", | ||
"SPDXID": "SPDXRef-File-51bb5f929ef68877", | ||
"checksums": [ | ||
{ | ||
"algorithm": "SHA1", | ||
"checksumValue": "69e70ec702f9df4ff64024b5fdea4644f1ce6c97" | ||
} | ||
], | ||
"copyrightText": "" | ||
} | ||
], | ||
"relationships": [ | ||
{ | ||
"spdxElementId": "SPDXRef-DOCUMENT", | ||
"relatedSpdxElement": "SPDXRef-Filesystem-13b142ca391a006e", | ||
"relationshipType": "DESCRIBES" | ||
}, | ||
{ | ||
"spdxElementId": "SPDXRef-Filesystem-13b142ca391a006e", | ||
"relatedSpdxElement": "SPDXRef-Application-24f8a80152e2c0fc", | ||
"relationshipType": "CONTAINS" | ||
}, | ||
{ | ||
"spdxElementId": "SPDXRef-Application-24f8a80152e2c0fc", | ||
"relatedSpdxElement": "SPDXRef-Package-c3508825bf3861d8", | ||
"relationshipType": "CONTAINS" | ||
}, | ||
{ | ||
"spdxElementId": "SPDXRef-Package-c3508825bf3861d8", | ||
"relatedSpdxElement": "SPDXRef-File-51bb5f929ef68877", | ||
"relationshipType": "CONTAINS" | ||
} | ||
] | ||
} |
Oops, something went wrong.