-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sbom): Add unmarshal for spdx (#2868)
Signed-off-by: knqyf263 <knqyf263@gmail.com> Co-authored-by: knqyf263 <knqyf263@gmail.com>
- Loading branch information
1 parent
db0aaf1
commit 9f6680a
Showing
15 changed files
with
1,159 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
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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
"SPDXID": "SPDXRef-DOCUMENT", | ||
"creationInfo": { | ||
"created": "2022-09-13T13:27:55.874784Z", | ||
"creators": [ | ||
"Tool: trivy", | ||
"Organization: aquasecurity" | ||
] | ||
}, | ||
"dataLicense": "CC0-1.0", | ||
"documentNamespace": "http://aquasecurity.github.io/trivy/container_image/integration/testdata/fixtures/images/centos-7.tar.gz-2906855d-5098-4a22-9a72-4f7099ea3d66", | ||
"name": "integration/testdata/fixtures/images/centos-7.tar.gz", | ||
"packages": [ | ||
{ | ||
"SPDXID": "SPDXRef-ContainerImage-dd5cad897c6263", | ||
"attributionTexts": [ | ||
"SchemaVersion: 2", | ||
"ImageID: sha256:f1cb7c7d58b73eac859c395882eec49d50651244e342cd6c68a5c7809785f427", | ||
"DiffID: sha256:89169d87dbe2b72ba42bfbb3579c957322baca28e03a1e558076542a1c1b2b4a" | ||
], | ||
"filesAnalyzed": false, | ||
"name": "integration/testdata/fixtures/images/centos-7.tar.gz" | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-OperatingSystem-2e91c856c499a371", | ||
"filesAnalyzed": false, | ||
"name": "centos", | ||
"versionInfo": "7.6.1810" | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-Package-5a18334f22149877", | ||
"attributionTexts": [ | ||
"LayerDigest: sha256:ac9208207adaac3a48e54a4dc6b49c69e78c3072d2b3add7efdabf814db2133b", | ||
"LayerDiffID: sha256:89169d87dbe2b72ba42bfbb3579c957322baca28e03a1e558076542a1c1b2b4a" | ||
], | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE-MANAGER", | ||
"referenceLocator": "pkg:rpm/centos/bash@4.2.46-31.el7?arch=x86_64\u0026distro=centos-7.6.1810", | ||
"referenceType": "purl" | ||
} | ||
], | ||
"filesAnalyzed": false, | ||
"licenseConcluded": "GPLv3+", | ||
"licenseDeclared": "GPLv3+", | ||
"name": "bash", | ||
"sourceInfo": "built package from: bash 4.2.46-31.el7", | ||
"versionInfo": "4.2.46" | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-Package-e16b1cbaa5186199", | ||
"attributionTexts": [ | ||
"LayerDigest: sha256:ac9208207adaac3a48e54a4dc6b49c69e78c3072d2b3add7efdabf814db2133b", | ||
"LayerDiffID: sha256:89169d87dbe2b72ba42bfbb3579c957322baca28e03a1e558076542a1c1b2b4a" | ||
], | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "PACKAGE-MANAGER", | ||
"referenceLocator": "pkg:rpm/centos/openssl-libs@1:1.0.2k-16.el7?arch=x86_64\u0026distro=centos-7.6.1810", | ||
"referenceType": "purl" | ||
} | ||
], | ||
"filesAnalyzed": false, | ||
"licenseConcluded": "OpenSSL", | ||
"licenseDeclared": "OpenSSL", | ||
"name": "openssl-libs", | ||
"sourceInfo": "built package from: openssl-libs 1:1.0.2k-16.el7", | ||
"versionInfo": "1.0.2k" | ||
} | ||
], | ||
"relationships": [ | ||
{ | ||
"relatedSpdxElement": "SPDXRef-ContainerImage-dd5cad897c6263", | ||
"relationshipType": "DESCRIBE", | ||
"spdxElementId": "SPDXRef-DOCUMENT" | ||
}, | ||
{ | ||
"relatedSpdxElement": "SPDXRef-OperatingSystem-2e91c856c499a371", | ||
"relationshipType": "CONTAINS", | ||
"spdxElementId": "SPDXRef-ContainerImage-dd5cad897c6263" | ||
}, | ||
{ | ||
"relatedSpdxElement": "SPDXRef-Package-5a18334f22149877", | ||
"relationshipType": "CONTAINS", | ||
"spdxElementId": "SPDXRef-OperatingSystem-2e91c856c499a371" | ||
}, | ||
{ | ||
"relatedSpdxElement": "SPDXRef-Package-e16b1cbaa5186199", | ||
"relationshipType": "CONTAINS", | ||
"spdxElementId": "SPDXRef-OperatingSystem-2e91c856c499a371" | ||
} | ||
], | ||
"spdxVersion": "SPDX-2.2" | ||
} |
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,57 @@ | ||
SPDXVersion: SPDX-2.2 | ||
DataLicense: CC0-1.0 | ||
SPDXID: SPDXRef-DOCUMENT | ||
DocumentName: integration/testdata/fixtures/images/centos-7.tar.gz | ||
DocumentNamespace: http://aquasecurity.github.io/trivy/container_image/integration/testdata/fixtures/images/centos-7.tar.gz-6a2c050f-bc12-46dc-b2df-1f4e3e0b5e1d | ||
Creator: Organization: aquasecurity | ||
Creator: Tool: trivy | ||
Created: 2022-09-13T13:24:58.796907Z | ||
|
||
##### Package: integration/testdata/fixtures/images/centos-7.tar.gz | ||
|
||
PackageName: integration/testdata/fixtures/images/centos-7.tar.gz | ||
SPDXID: SPDXRef-ContainerImage-dd5cad897c6263 | ||
FilesAnalyzed: false | ||
PackageAttributionText: SchemaVersion: 2 | ||
PackageAttributionText: ImageID: sha256:f1cb7c7d58b73eac859c395882eec49d50651244e342cd6c68a5c7809785f427 | ||
PackageAttributionText: DiffID: sha256:89169d87dbe2b72ba42bfbb3579c957322baca28e03a1e558076542a1c1b2b4a | ||
|
||
##### Package: centos | ||
|
||
PackageName: centos | ||
SPDXID: SPDXRef-OperatingSystem-2e91c856c499a371 | ||
PackageVersion: 7.6.1810 | ||
FilesAnalyzed: false | ||
|
||
##### Package: bash | ||
|
||
PackageName: bash | ||
SPDXID: SPDXRef-Package-5a18334f22149877 | ||
PackageVersion: 4.2.46 | ||
FilesAnalyzed: false | ||
PackageSourceInfo: built package from: bash 4.2.46-31.el7 | ||
PackageLicenseConcluded: GPLv3+ | ||
PackageLicenseDeclared: GPLv3+ | ||
ExternalRef: PACKAGE-MANAGER purl pkg:rpm/centos/bash@4.2.46-31.el7?arch=x86_64&distro=centos-7.6.1810 | ||
PackageAttributionText: LayerDigest: sha256:ac9208207adaac3a48e54a4dc6b49c69e78c3072d2b3add7efdabf814db2133b | ||
PackageAttributionText: LayerDiffID: sha256:89169d87dbe2b72ba42bfbb3579c957322baca28e03a1e558076542a1c1b2b4a | ||
|
||
##### Package: openssl-libs | ||
|
||
PackageName: openssl-libs | ||
SPDXID: SPDXRef-Package-e16b1cbaa5186199 | ||
PackageVersion: 1.0.2k | ||
FilesAnalyzed: false | ||
PackageSourceInfo: built package from: openssl-libs 1:1.0.2k-16.el7 | ||
PackageLicenseConcluded: OpenSSL | ||
PackageLicenseDeclared: OpenSSL | ||
ExternalRef: PACKAGE-MANAGER purl pkg:rpm/centos/openssl-libs@1:1.0.2k-16.el7?arch=x86_64&distro=centos-7.6.1810 | ||
PackageAttributionText: LayerDigest: sha256:ac9208207adaac3a48e54a4dc6b49c69e78c3072d2b3add7efdabf814db2133b | ||
PackageAttributionText: LayerDiffID: sha256:89169d87dbe2b72ba42bfbb3579c957322baca28e03a1e558076542a1c1b2b4a | ||
|
||
##### Relationships | ||
|
||
Relationship: SPDXRef-DOCUMENT DESCRIBE SPDXRef-ContainerImage-dd5cad897c6263 | ||
Relationship: SPDXRef-ContainerImage-dd5cad897c6263 CONTAINS SPDXRef-OperatingSystem-2e91c856c499a371 | ||
Relationship: SPDXRef-OperatingSystem-2e91c856c499a371 DEPENDS_ON SPDXRef-Package-5a18334f22149877 | ||
Relationship: SPDXRef-OperatingSystem-2e91c856c499a371 DEPENDS_ON SPDXRef-Package-e16b1cbaa5186199 |
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
Oops, something went wrong.