-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for OmniBOR and Software Heritage persistent IDs (#414)
Closes #413 - [x] modify JSON schema - [x] modify XML schema - [x] modify protobuf schema - [x] add examples & test resources
- Loading branch information
Showing
6 changed files
with
98 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -974,6 +974,23 @@ | |
"description": "Specifies the package-url (purl). The purl, if specified, MUST be valid and conform to the specification defined at: [https://github.com/package-url/purl-spec](https://github.com/package-url/purl-spec)", | ||
"examples": ["pkg:maven/com.acme/[email protected]?packaging=jar"] | ||
}, | ||
"omniborId": { | ||
"type": "array", | ||
"title": "OmniBOR Artifact Identifier (gitoid)", | ||
"description": "Specifies the OmniBOR Artifact ID. The OmniBOR, if specified, MUST be valid and conform to the specification defined at: [https://www.iana.org/assignments/uri-schemes/prov/gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid)", | ||
"items": { "type": "string" }, | ||
"examples": [ | ||
"gitoid:blob:sha1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", | ||
"gitoid:blob:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" | ||
] | ||
}, | ||
"swhid": { | ||
"type": "array", | ||
"title": "SoftWare Heritage Identifier", | ||
"description": "Specifies the Software Heritage persistent identifier (SWHID). The SWHID, if specified, MUST be valid and conform to the specification defined at: [https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html](https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html)", | ||
"items": { "type": "string" }, | ||
"examples": ["swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2"] | ||
}, | ||
"swid": { | ||
"$ref": "#/definitions/swid", | ||
"title": "SWID Tag", | ||
|
@@ -4698,7 +4715,7 @@ | |
"field": { | ||
"type": "string", | ||
"enum": [ | ||
"group", "name", "version", "purl", "cpe", "swid", "hash" | ||
"group", "name", "version", "purl", "cpe", "omniborId", "swhid", "swid", "hash" | ||
], | ||
"title": "Field", | ||
"description": "The identity field of the component which the evidence describes." | ||
|
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
21 changes: 21 additions & 0 deletions
21
tools/src/test/resources/1.6/valid-component-identifiers-1.6.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,21 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "library", | ||
"group": "com.example", | ||
"name": "acme-library", | ||
"version": "1.0.0", | ||
"cpe": "cpe:2.3:a:example:acme-library:1.0.0:*:*:*:*:*:*:*", | ||
"purl": "pkg:maven/com.example/[email protected]", | ||
"omniborId": [ | ||
"gitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", | ||
"gitoid:blob:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" | ||
], | ||
"swhid": [ "swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2" ] | ||
} | ||
] | ||
} |
19 changes: 19 additions & 0 deletions
19
tools/src/test/resources/1.6/valid-component-identifiers-1.6.textproto
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,19 @@ | ||
# proto-file: schema/bom-1.6.proto | ||
# proto-message: Bom | ||
|
||
spec_version: "1.6" | ||
version: 1 | ||
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" | ||
components { | ||
type: CLASSIFICATION_LIBRARY | ||
group: "com.example" | ||
name: "acme-example" | ||
version: "1.0.0" | ||
cpe: "cpe:2.3:a:example:acme-library:1.0.0:*:*:*:*:*:*:*" | ||
purl: "pkg:maven/com.example/[email protected]" | ||
omniborId: [ | ||
"gitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", | ||
"gitoid:blob:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" | ||
] | ||
swhid: [ "swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2" ] | ||
} |
15 changes: 15 additions & 0 deletions
15
tools/src/test/resources/1.6/valid-component-identifiers-1.6.xml
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,15 @@ | ||
<?xml version="1.0"?> | ||
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6"> | ||
<components> | ||
<component type="library"> | ||
<group>com.example</group> | ||
<name>acme-library</name> | ||
<version>1.0.0</version> | ||
<cpe>cpe:2.3:a:example:acme-library:1.0.0:*:*:*:*:*:*:*</cpe> | ||
<purl>pkg:maven/com.example/[email protected]</purl> | ||
<omnibodId>gitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64</omnibodId> | ||
<omniborId>gitoid:blob:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08</omniborId> | ||
<swhid>swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2</swhid> | ||
</component> | ||
</components> | ||
</bom> |