Skip to content

Commit bc6f88a

Browse files
Added bom-refs to organizationalEntity and organizationalContact
Signed-off-by: Steve Springett <[email protected]>
1 parent 6fc0585 commit bc6f88a

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
@@ -425,6 +425,8 @@ message OrganizationalContact {
425425
optional string email = 2;
426426
// The phone number of the contact.
427427
optional string phone = 3;
428+
// 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.
429+
optional string bom_ref = 4;
428430
}
429431

430432
message OrganizationalEntity {
@@ -434,6 +436,8 @@ message OrganizationalEntity {
434436
repeated string url = 2;
435437
// A contact person at the organization. Multiple contacts are allowed.
436438
repeated OrganizationalContact contact = 3;
439+
// 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.
440+
optional string bom_ref = 4;
437441
}
438442

439443
enum PatchClassification {

schema/bom-1.5.schema.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@
251251
"description": "",
252252
"additionalProperties": false,
253253
"properties": {
254+
"bom-ref": {
255+
"$ref": "#/definitions/refType",
256+
"title": "BOM Reference",
257+
"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."
258+
},
254259
"name": {
255260
"type": "string",
256261
"title": "Name",
@@ -284,6 +289,11 @@
284289
"description": "",
285290
"additionalProperties": false,
286291
"properties": {
292+
"bom-ref": {
293+
"$ref": "#/definitions/refType",
294+
"title": "BOM Reference",
295+
"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."
296+
},
287297
"name": {
288298
"type": "string",
289299
"title": "Name",

schema/bom-1.5.xsd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ limitations under the License.
156156
</xs:annotation>
157157
</xs:any>
158158
</xs:sequence>
159+
<xs:attribute name="bom-ref" type="bom:refType">
160+
<xs:annotation>
161+
<xs:documentation>
162+
An optional identifier which can be used to reference the object elsewhere in the BOM.
163+
Uniqueness is enforced within all elements and children of the root-level bom element.
164+
</xs:documentation>
165+
</xs:annotation>
166+
</xs:attribute>
159167
<xs:anyAttribute namespace="##other" processContents="lax">
160168
<xs:annotation>
161169
<xs:documentation>User-defined attributes may be used on this element as long as they
@@ -237,6 +245,14 @@ limitations under the License.
237245
</xs:annotation>
238246
</xs:any>
239247
</xs:sequence>
248+
<xs:attribute name="bom-ref" type="bom:refType">
249+
<xs:annotation>
250+
<xs:documentation>
251+
An optional identifier which can be used to reference the object elsewhere in the BOM.
252+
Uniqueness is enforced within all elements and children of the root-level bom element.
253+
</xs:documentation>
254+
</xs:annotation>
255+
</xs:attribute>
240256
<xs:anyAttribute namespace="##other" processContents="lax">
241257
<xs:annotation>
242258
<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)