Skip to content

Commit d3d243f

Browse files
feat: Add support for TLP marking in metadata - add default values and documentation (fixes CycloneDX#595)
Signed-off-by: anthonyharrison <[email protected]>
1 parent 55425e5 commit d3d243f

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

schema/bom-1.7.proto

+3-2
Original file line numberDiff line numberDiff line change
@@ -677,9 +677,10 @@ message Swid {
677677
optional string url = 7;
678678
}
679679

680+
// The Traffic Light Protocol (TLP) classification for the component that the BOM describes. TLP is a classification system for identifying the potential risk associated with artefact, including whether it is subject to certain types of legal, financial, or technical threats. Refer to https://www.first.org/tlp/ for further information. The default classification is `TLP_CLEAR`
680681
enum Tlp {
681-
// Default
682-
TLP_CLEAR = 0;
682+
// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX -- `TLP_CLEAR` is our fallback, the default.
683+
TLP_CLEAR_UNSPECIFIED = 0;
683684
// Limited distribution but can be shared within a community.
684685
TLP_GREEN = 1;
685686
// Limited distribution but can be shared within an organization and with clients

schema/bom-1.7.schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@
722722
},
723723
"tlpClassification": {
724724
"type" : "string",
725+
"default": "CLEAR",
725726
"title": "Traffic Light Protocol (TLP) Classification",
726727
"description": "The Traffic Light Protocol (TLP) classification for the component that the BOM describes. TLP is a classification system for identifying the potential risk associated with artefact, including whether it is subject to certain types of legal, financial, or technical threats. Refer to [https://www.first.org/tlp/](https://www.first.org/tlp/) for further information. The default classification is CLEAR",
727728
"enum": [

schema/bom-1.7.xsd

+9-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,15 @@ limitations under the License.
396396
</xs:anyAttribute>
397397
</xs:complexType>
398398

399-
<xs:simpleType name="tlpType">
399+
<xs:simpleType name="tlpType" default="CLEAR">
400+
<xs:annotation>
401+
<xs:documentation xml:lang="en">
402+
The Traffic Light Protocol (TLP) classification for the component that the BOM describes. TLP is a classification
403+
system for identifying the potential risk associated with artefact, including whether it is subject to certain
404+
types of legal, financial, or technical threats. Refer to https://www.first.org/tlp/ for further information.
405+
The default classification is CLEAR.
406+
</xs:documentation>
407+
</xs:annotation>
400408
<xs:restriction base="xs:string">
401409
<xs:enumeration value="CLEAR">
402410
<xs:annotation>

0 commit comments

Comments
 (0)