Skip to content

Commit 8b43f29

Browse files
Merge pull request #228 from CycloneDX/v1.5-dev-org-bomrefs
Added bom-refs to organizationalEntity and organizationalContact
2 parents 42c8cdb + bc6f88a commit 8b43f29

9 files changed

+42
-4
lines changed

schema/bom-1.5.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,8 @@ message OrganizationalContact {
463463
optional string email = 2;
464464
// The phone number of the contact.
465465
optional string phone = 3;
466+
// An optional identifier which can be used to reference the object elsewhere in the BOM. Uniqueness is enforced within all elements and children of the root-level bom element.
467+
optional string bom_ref = 4;
466468
}
467469

468470
message OrganizationalEntity {
@@ -472,6 +474,8 @@ message OrganizationalEntity {
472474
repeated string url = 2;
473475
// A contact person at the organization. Multiple contacts are allowed.
474476
repeated OrganizationalContact contact = 3;
477+
// An optional identifier which can be used to reference the object elsewhere in the BOM. Uniqueness is enforced within all elements and children of the root-level bom element.
478+
optional string bom_ref = 4;
475479
}
476480

477481
enum PatchClassification {

schema/bom-1.5.schema.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@
303303
"description": "",
304304
"additionalProperties": false,
305305
"properties": {
306+
"bom-ref": {
307+
"$ref": "#/definitions/refType",
308+
"title": "BOM Reference",
309+
"description": "An optional identifier which can be used to reference the object elsewhere in the BOM. Every bom-ref MUST be unique within the BOM."
310+
},
306311
"name": {
307312
"type": "string",
308313
"title": "Name",
@@ -335,6 +340,11 @@
335340
"description": "",
336341
"additionalProperties": false,
337342
"properties": {
343+
"bom-ref": {
344+
"$ref": "#/definitions/refType",
345+
"title": "BOM Reference",
346+
"description": "An optional identifier which can be used to reference the object elsewhere in the BOM. Every bom-ref MUST be unique within the BOM."
347+
},
338348
"name": {
339349
"type": "string",
340350
"title": "Name",

schema/bom-1.5.xsd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,14 @@ limitations under the License.
295295
</xs:annotation>
296296
</xs:any>
297297
</xs:sequence>
298+
<xs:attribute name="bom-ref" type="bom:refType">
299+
<xs:annotation>
300+
<xs:documentation>
301+
An optional identifier which can be used to reference the object elsewhere in the BOM.
302+
Uniqueness is enforced within all elements and children of the root-level bom element.
303+
</xs:documentation>
304+
</xs:annotation>
305+
</xs:attribute>
298306
<xs:anyAttribute namespace="##other" processContents="lax">
299307
<xs:annotation>
300308
<xs:documentation>User-defined attributes may be used on this element as long as they
@@ -376,6 +384,14 @@ limitations under the License.
376384
</xs:annotation>
377385
</xs:any>
378386
</xs:sequence>
387+
<xs:attribute name="bom-ref" type="bom:refType">
388+
<xs:annotation>
389+
<xs:documentation>
390+
An optional identifier which can be used to reference the object elsewhere in the BOM.
391+
Uniqueness is enforced within all elements and children of the root-level bom element.
392+
</xs:documentation>
393+
</xs:annotation>
394+
</xs:attribute>
379395
<xs:anyAttribute namespace="##other" processContents="lax">
380396
<xs:annotation>
381397
<xs:documentation>User-defined attributes may be used on this element as long as they

tools/src/test/resources/1.5/valid-metadata-manufacture-1.5.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
"version": 1,
66
"metadata": {
77
"manufacture": {
8+
"bom-ref": "manufacturer-1",
89
"name": "Acme, Inc.",
910
"url": [
1011
"https://example.com"
1112
],
1213
"contact": [
1314
{
15+
"bom-ref": "contact-1",
1416
"name": "Acme Professional Services",
1517
"email": "[email protected]"
1618
}

tools/src/test/resources/1.5/valid-metadata-manufacture-1.5.textproto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ metadata {
88
contact {
99
name: "Acme Professional Services"
1010
11+
bom_ref: "contact-1"
1112
}
13+
bom_ref: "manufacturer-1"
1214
}
1315
}

tools/src/test/resources/1.5/valid-metadata-manufacture-1.5.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0"?>
22
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.5">
33
<metadata>
4-
<manufacture>
4+
<manufacture bom-ref="manufacturer-1">
55
<name>Acme, Inc.</name>
66
<url>https://example.com</url>
7-
<contact>
7+
<contact bom-ref="contact-1">
88
<name>Acme Professional Services</name>
99
<email>[email protected]</email>
1010
</contact>

tools/src/test/resources/1.5/valid-metadata-supplier-1.5.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
"version": 1,
66
"metadata": {
77
"supplier": {
8+
"bom-ref": "supplier-1",
89
"name": "Acme, Inc.",
910
"url": [
1011
"https://example.com"
1112
],
1213
"contact": [
1314
{
15+
"bom-ref": "contact-1",
1416
"name": "Acme Distribution",
1517
"email": "[email protected]"
1618
}

tools/src/test/resources/1.5/valid-metadata-supplier-1.5.textproto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ metadata {
88
contact {
99
name: "Acme Distribution"
1010
11+
bom_ref: "contact-1"
1112
}
13+
bom_ref: "supplier-1"
1214
}
1315
}

tools/src/test/resources/1.5/valid-metadata-supplier-1.5.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0"?>
22
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.5">
33
<metadata>
4-
<supplier>
4+
<supplier bom-ref="supplier-1">
55
<name>Acme, Inc.</name>
66
<url>https://example.com</url>
7-
<contact>
7+
<contact bom-ref="contact-1">
88
<name>Acme Distribution</name>
99
<email>[email protected]</email>
1010
</contact>

0 commit comments

Comments
 (0)