-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stabilize SPDX JSON output sorting (#1216)
- Loading branch information
Showing
5 changed files
with
216 additions
and
11 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
151 changes: 151 additions & 0 deletions
151
syft/formats/spdx22json/test-fixtures/snapshot/TestSPDXRelationshipOrder.golden
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,151 @@ | ||
{ | ||
"SPDXID": "SPDXRef-DOCUMENT", | ||
"name": "user-image-input", | ||
"spdxVersion": "SPDX-2.2", | ||
"creationInfo": { | ||
"created": "2022-09-19T18:39:05.841331Z", | ||
"creators": [ | ||
"Organization: Anchore, Inc", | ||
"Tool: syft-v0.42.0-bogus" | ||
], | ||
"licenseListVersion": "3.18" | ||
}, | ||
"dataLicense": "CC0-1.0", | ||
"documentNamespace": "https://anchore.com/syft/image/user-image-input-6cf0595e-7d69-4990-aef5-8183b52023b9", | ||
"packages": [ | ||
{ | ||
"SPDXID": "SPDXRef-2a46171f91c8d4bc", | ||
"name": "package-1", | ||
"licenseConcluded": "MIT", | ||
"downloadLocation": "NOASSERTION", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "SECURITY", | ||
"referenceLocator": "cpe:2.3:*:some:package:1:*:*:*:*:*:*:*", | ||
"referenceType": "cpe23Type" | ||
}, | ||
{ | ||
"referenceCategory": "PACKAGE_MANAGER", | ||
"referenceLocator": "a-purl-1", | ||
"referenceType": "purl" | ||
} | ||
], | ||
"filesAnalyzed": false, | ||
"hasFiles": [ | ||
"SPDXRef-5265a4dde3edbf7c", | ||
"SPDXRef-839d99ee67d9d174", | ||
"SPDXRef-9c2f7510199b17f6", | ||
"SPDXRef-c641caa71518099f", | ||
"SPDXRef-c6f5b29dca12661f", | ||
"SPDXRef-f9e49132a4b96ccd" | ||
], | ||
"licenseDeclared": "MIT", | ||
"sourceInfo": "acquired package info from installed python package manifest file: /somefile-1.txt", | ||
"versionInfo": "1.0.1" | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-ae77680e9b1d087e", | ||
"name": "package-2", | ||
"licenseConcluded": "NONE", | ||
"downloadLocation": "NOASSERTION", | ||
"externalRefs": [ | ||
{ | ||
"referenceCategory": "SECURITY", | ||
"referenceLocator": "cpe:2.3:*:some:package:2:*:*:*:*:*:*:*", | ||
"referenceType": "cpe23Type" | ||
}, | ||
{ | ||
"referenceCategory": "PACKAGE_MANAGER", | ||
"referenceLocator": "pkg:deb/debian/package-2@2.0.1", | ||
"referenceType": "purl" | ||
} | ||
], | ||
"filesAnalyzed": false, | ||
"licenseDeclared": "NONE", | ||
"sourceInfo": "acquired package info from DPKG DB: /somefile-2.txt", | ||
"versionInfo": "2.0.1" | ||
} | ||
], | ||
"files": [ | ||
{ | ||
"SPDXID": "SPDXRef-9c2f7510199b17f6", | ||
"licenseConcluded": "NOASSERTION", | ||
"fileName": "/a1/f6", | ||
"fileTypes": [ | ||
"OTHER" | ||
] | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-c6f5b29dca12661f", | ||
"licenseConcluded": "NOASSERTION", | ||
"fileName": "/d1/f3", | ||
"fileTypes": [ | ||
"OTHER" | ||
] | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-c641caa71518099f", | ||
"licenseConcluded": "NOASSERTION", | ||
"fileName": "/d2/f4", | ||
"fileTypes": [ | ||
"OTHER" | ||
] | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-5265a4dde3edbf7c", | ||
"licenseConcluded": "NOASSERTION", | ||
"fileName": "/f1", | ||
"fileTypes": [ | ||
"OTHER" | ||
] | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-f9e49132a4b96ccd", | ||
"licenseConcluded": "NOASSERTION", | ||
"fileName": "/f2", | ||
"fileTypes": [ | ||
"OTHER" | ||
] | ||
}, | ||
{ | ||
"SPDXID": "SPDXRef-839d99ee67d9d174", | ||
"licenseConcluded": "NOASSERTION", | ||
"fileName": "/z1/f5", | ||
"fileTypes": [ | ||
"OTHER" | ||
] | ||
} | ||
], | ||
"relationships": [ | ||
{ | ||
"spdxElementId": "SPDXRef-2a46171f91c8d4bc", | ||
"relationshipType": "CONTAINS", | ||
"relatedSpdxElement": "SPDXRef-5265a4dde3edbf7c" | ||
}, | ||
{ | ||
"spdxElementId": "SPDXRef-2a46171f91c8d4bc", | ||
"relationshipType": "CONTAINS", | ||
"relatedSpdxElement": "SPDXRef-839d99ee67d9d174" | ||
}, | ||
{ | ||
"spdxElementId": "SPDXRef-2a46171f91c8d4bc", | ||
"relationshipType": "CONTAINS", | ||
"relatedSpdxElement": "SPDXRef-9c2f7510199b17f6" | ||
}, | ||
{ | ||
"spdxElementId": "SPDXRef-2a46171f91c8d4bc", | ||
"relationshipType": "CONTAINS", | ||
"relatedSpdxElement": "SPDXRef-c641caa71518099f" | ||
}, | ||
{ | ||
"spdxElementId": "SPDXRef-2a46171f91c8d4bc", | ||
"relationshipType": "CONTAINS", | ||
"relatedSpdxElement": "SPDXRef-c6f5b29dca12661f" | ||
}, | ||
{ | ||
"spdxElementId": "SPDXRef-2a46171f91c8d4bc", | ||
"relationshipType": "CONTAINS", | ||
"relatedSpdxElement": "SPDXRef-f9e49132a4b96ccd" | ||
} | ||
] | ||
} |
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