Skip to content

Commit 430826a

Browse files
Added additional composition types, bom-ref, and updated docs.
Signed-off-by: Steve Springett <[email protected]>
1 parent a719b63 commit 430826a

File tree

6 files changed

+61
-10
lines changed

6 files changed

+61
-10
lines changed

schema/bom-1.5.proto

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -545,18 +545,26 @@ message Property {
545545
}
546546

547547
enum Aggregate {
548-
// Default, no statement about the aggregate completeness is being made
548+
// The relationship completeness is not specified.
549549
AGGREGATE_NOT_SPECIFIED = 0;
550-
// The aggregate composition is complete
550+
// The relationship is complete. No further relationships including constituent components, services, or dependencies are known to exist.
551551
AGGREGATE_COMPLETE = 1;
552-
// The aggregate composition is incomplete
552+
// The relationship is incomplete. Additional relationships exist and may include constituent components, services, or dependencies.
553553
AGGREGATE_INCOMPLETE = 2;
554-
// The aggregate composition is incomplete for first party components, complete for third party components
554+
// The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented.
555555
AGGREGATE_INCOMPLETE_FIRST_PARTY_ONLY = 3;
556-
// The aggregate composition is incomplete for third party components, complete for first party components
556+
// The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented.
557557
AGGREGATE_INCOMPLETE_THIRD_PARTY_ONLY = 4;
558-
// The aggregate composition completeness is unknown
558+
// The relationship may be complete or incomplete. This usually signifies a 'best-effort' to obtain constituent components, services, or dependencies but the completeness is inconclusive.
559559
AGGREGATE_UNKNOWN = 5;
560+
// The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.
561+
AGGREGATE_INCOMPLETE_FIRST_PARTY_PROPRIETARY_ONLY = 6;
562+
// The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented, limited specifically to those that are opensource.
563+
AGGREGATE_INCOMPLETE_FIRST_PARTY_OPENSOURCE_ONLY = 7;
564+
// The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.
565+
AGGREGATE_INCOMPLETE_THIRD_PARTY_PROPRIETARY_ONLY = 8;
566+
// The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are opensource.
567+
AGGREGATE_INCOMPLETE_THIRD_PARTY_OPENSOURCE_ONLY = 9;
560568
}
561569

562570
message Composition {
@@ -566,6 +574,8 @@ message Composition {
566574
repeated string assemblies = 2;
567575
// The dependencies the aggregate completeness applies to
568576
repeated string dependencies = 3;
577+
// An optional identifier which can be used to reference the composition elsewhere in the BOM. Every bom-ref MUST be unique within the BOM.
578+
optional string bom_ref = 4;
569579
}
570580

571581
message EvidenceCopyright {

schema/bom-1.5.schema.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,10 +1511,15 @@
15111511
],
15121512
"additionalProperties": false,
15131513
"properties": {
1514+
"bom-ref": {
1515+
"$ref": "#/definitions/refType",
1516+
"title": "BOM Reference",
1517+
"description": "An optional identifier which can be used to reference the composition elsewhere in the BOM. Every bom-ref MUST be unique within the BOM."
1518+
},
15141519
"aggregate": {
15151520
"$ref": "#/definitions/aggregateType",
15161521
"title": "Aggregate",
1517-
"description": "Specifies an aggregate type that describe how complete a relationship is."
1522+
"description": "Specifies an aggregate type that describe how complete a relationship is.\n\n* __complete__ = The relationship is complete. No further relationships including constituent components, services, or dependencies are known to exist.\n* __incomplete__ = The relationship is incomplete. Additional relationships exist and may include constituent components, services, or dependencies.\n* __incomplete&#95;first&#95;party&#95;only__ = The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented.\n* __incomplete&#95;first&#95;party&#95;proprietary&#95;only__ = The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.\n* __incomplete&#95;first&#95;party&#95;opensource&#95;only__ = The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented, limited specifically to those that are opensource.\n* __incomplete&#95;third&#95;party&#95;only__ = The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented.\n* __incomplete&#95;third&#95;party&#95;proprietary&#95;only__ = The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.\n* __incomplete_third_party_opensource_only__ = The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are opensource.\n* __unknown__ = The relationship may be complete or incomplete. This usually signifies a 'best-effort' to obtain constituent components, services, or dependencies but the completeness is inconclusive.\n* __not&#95;specified__ = The relationship completeness is not specified.\n"
15181523
},
15191524
"assemblies": {
15201525
"type": "array",
@@ -1548,7 +1553,11 @@
15481553
"complete",
15491554
"incomplete",
15501555
"incomplete_first_party_only",
1556+
"incomplete_first_party_proprietary_only",
1557+
"incomplete_first_party_opensource_only",
15511558
"incomplete_third_party_only",
1559+
"incomplete_third_party_proprietary_only",
1560+
"incomplete_third_party_opensource_only",
15521561
"unknown",
15531562
"not_specified"
15541563
]

schema/bom-1.5.xsd

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2142,13 +2142,21 @@ limitations under the License.
21422142
</xs:complexType>
21432143
</xs:element>
21442144
</xs:sequence>
2145+
<xs:attribute name="bom-ref" type="bom:refType">
2146+
<xs:annotation>
2147+
<xs:documentation>
2148+
An optional identifier which can be used to reference the composition elsewhere in the BOM.
2149+
Uniqueness is enforced within all elements and children of the root-level bom element.
2150+
</xs:documentation>
2151+
</xs:annotation>
2152+
</xs:attribute>
21452153
</xs:complexType>
21462154

21472155
<xs:simpleType name="aggregateType">
21482156
<xs:restriction base="xs:string">
21492157
<xs:enumeration value="complete">
21502158
<xs:annotation>
2151-
<xs:documentation>The relationship is complete. No further relationships including constituent components, services, or dependencies exist.</xs:documentation>
2159+
<xs:documentation>The relationship is complete. No further relationships including constituent components, services, or dependencies are known to exist.</xs:documentation>
21522160
</xs:annotation>
21532161
</xs:enumeration>
21542162
<xs:enumeration value="incomplete">
@@ -2161,11 +2169,31 @@ limitations under the License.
21612169
<xs:documentation>The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented.</xs:documentation>
21622170
</xs:annotation>
21632171
</xs:enumeration>
2172+
<xs:enumeration value="incomplete_first_party_proprietary_only">
2173+
<xs:annotation>
2174+
<xs:documentation>The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.</xs:documentation>
2175+
</xs:annotation>
2176+
</xs:enumeration>
2177+
<xs:enumeration value="incomplete_first_party_opensource_only">
2178+
<xs:annotation>
2179+
<xs:documentation>The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are opensource.</xs:documentation>
2180+
</xs:annotation>
2181+
</xs:enumeration>
21642182
<xs:enumeration value="incomplete_third_party_only">
21652183
<xs:annotation>
21662184
<xs:documentation>The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented.</xs:documentation>
21672185
</xs:annotation>
21682186
</xs:enumeration>
2187+
<xs:enumeration value="incomplete_third_party_proprietary_only">
2188+
<xs:annotation>
2189+
<xs:documentation>The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.</xs:documentation>
2190+
</xs:annotation>
2191+
</xs:enumeration>
2192+
<xs:enumeration value="incomplete_third_party_opensource_only">
2193+
<xs:annotation>
2194+
<xs:documentation>The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are opensource.</xs:documentation>
2195+
</xs:annotation>
2196+
</xs:enumeration>
21692197
<xs:enumeration value="unknown">
21702198
<xs:annotation>
21712199
<xs:documentation>The relationship may be complete or incomplete. This usually signifies a 'best-effort' to obtain constituent components, services, or dependencies but the completeness is inconclusive.</xs:documentation>

tools/src/test/resources/1.5/valid-compositions-1.5.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
],
4747
"compositions": [
4848
{
49+
"bom-ref": "composition-1",
4950
"aggregate": "complete",
5051
"assemblies": [
5152
"pkg:maven/partner/[email protected]"
@@ -55,6 +56,7 @@
5556
]
5657
},
5758
{
59+
"bom-ref": "composition-2",
5860
"aggregate": "unknown",
5961
"assemblies": [
6062
"pkg:maven/acme/[email protected]"

tools/src/test/resources/1.5/valid-compositions-1.5.textproto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ dependencies {
3939
}
4040
}
4141
compositions {
42+
bom_ref: "composition-1"
4243
aggregate: AGGREGATE_COMPLETE
4344
assemblies: "pkg:maven/partner/[email protected]"
4445
dependencies: "acme-application-1.0"
4546
}
4647
compositions {
48+
bom_ref: "composition-1"
4749
aggregate: AGGREGATE_UNKNOWN
4850
assemblies: "pkg:maven/acme/[email protected]"
4951
}

tools/src/test/resources/1.5/valid-compositions-1.5.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</dependency>
3333
</dependencies>
3434
<compositions>
35-
<composition>
35+
<composition bom-ref="composition-1">
3636
<aggregate>complete</aggregate>
3737
<assemblies>
3838
<assembly ref="pkg:maven/partner/[email protected]"/>
@@ -41,7 +41,7 @@
4141
<dependency ref="acme-application-1.0"/>
4242
</dependencies>
4343
</composition>
44-
<composition>
44+
<composition bom-ref="composition-2">
4545
<aggregate>unknown</aggregate>
4646
<assemblies>
4747
<assembly ref="pkg:maven/acme/[email protected]"/>

0 commit comments

Comments
 (0)