Skip to content

Commit 024e85f

Browse files
Merge branch 'v1.5-dev' into v1.5-dev-machine-learning
2 parents 1aa6c7c + 8820d5e commit 024e85f

19 files changed

Lines changed: 2085 additions & 117 deletions

docgen/json/gen.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mkdir -p docs/{1.2,1.3,1.4,1.5}
44

55
# Check to see if generate-schema-doc is executable and is in the path. If not, install JSON Schema for Humans.
66
if ! [ -x "$(command -v generate-schema-doc)" ]; then
7-
pip3 install json-schema-for-humans==0.39.5
7+
pip3 install json-schema-for-humans==0.44.3
88
fi
99

1010
generate () {
@@ -18,7 +18,7 @@ generate () {
1818
SCHEMA_FILE='../../schema/bom-'$version'.schema.json'
1919
fi
2020
echo $SCHEMA_FILE
21-
generate-schema-doc --config no_link_to_reused_ref --config no_show_breadcrumbs --config no_collapse_long_descriptions --config deprecated_from_description --config title="$title" --config custom_template_path=$(pwd)'/templates/cyclonedx/base.html' --minify $SCHEMA_FILE 'docs/'$version'/index.html'
21+
generate-schema-doc --config no_link_to_reused_ref --config no_show_breadcrumbs --config no_collapse_long_descriptions --deprecated-from-description --config title="$title" --config custom_template_path=$(pwd)'/templates/cyclonedx/base.html' --minify $SCHEMA_FILE 'docs/'$version'/index.html'
2222
sed -i -e "s/\${quotedTitle}/\"$title\"/g" 'docs/'$version'/index.html'
2323
sed -i -e "s/\${title}/$title/g" 'docs/'$version'/index.html'
2424
sed -i -e "s/\${version}/$version/g" 'docs/'$version'/index.html'

schema/bom-1.5.proto

Lines changed: 158 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ enum Classification {
5757
CLASSIFICATION_CONTAINER = 7;
5858
// A special type of software that provides low-level control over a devices hardware. Refer to https://en.wikipedia.org/wiki/Firmware
5959
CLASSIFICATION_FIRMWARE = 8;
60+
// A special type of software that operates or controls a particular type of device. Refer to https://en.wikipedia.org/wiki/Device_driver
61+
CLASSIFICATION_DEVICE_DRIVER = 9;
6062
// A runtime environment which interprets or executes software. This may include runtimes such as those that execute bytecode or low-code/no-code application platforms.
61-
CLASSIFICATION_PLATFORM = 9;
63+
CLASSIFICATION_PLATFORM = 10;
6264
// A model based on training data that can make predictions or decisions without being explicitly programmed to do so.
63-
CLASSIFICATION_MACHINE_LEARNING_MODEL = 10;
65+
CLASSIFICATION_MACHINE_LEARNING_MODEL = 11;
6466
// A collection of discrete values that convey information.
65-
CLASSIFICATION_DATA = 11;
67+
CLASSIFICATION_DATA = 12;
6668
}
6769

6870
message Commit {
@@ -131,16 +133,24 @@ message Component {
131133
optional ComponentData data = 26;
132134
}
133135

134-
// Specifies the data classification.
135-
message DataClassification {
136+
// Specifies the data flow.
137+
message DataFlow {
136138
// Specifies the flow direction of the data.
137-
DataFlow flow = 1;
138-
// SimpleContent value of element
139+
DataFlowDirection flow = 1;
140+
// Data classification tags data according to its type, sensitivity, and value if altered, stolen, or destroyed.
139141
string value = 2;
142+
// Name for the defined data
143+
optional string name = 3;
144+
// Short description of the data content and usage
145+
optional string description = 4;
146+
// The URI, URL, or BOM-Link of the components or services the data came in from
147+
repeated string source = 5;
148+
// The URI, URL, or BOM-Link of the components or services the data is sent to
149+
repeated string destination = 6;
140150
}
141151

142152
// Specifies the flow direction of the data. Valid values are: inbound, outbound, bi-directional, and unknown. Direction is relative to the service. Inbound flow states that data enters the service. Outbound flow states that data leaves the service. Bi-directional states that data flows both ways, and unknown states that the direction is not known.
143-
enum DataFlow {
153+
enum DataFlowDirection {
144154
DATA_FLOW_NULL = 0;
145155
DATA_FLOW_INBOUND = 1;
146156
DATA_FLOW_OUTBOUND = 2;
@@ -205,8 +215,36 @@ enum ExternalReferenceType {
205215
EXTERNAL_REFERENCE_TYPE_BUILD_SYSTEM = 14;
206216
// Specifies a way to contact the maintainer, supplier, or provider in the event of a security incident. Common URIs include links to a disclosure procedure, a mailto (RFC-2368) that specifies an email address, a tel (RFC-3966) that specifies a phone number, or dns (RFC-4501]) that specifies the records containing DNS Security TXT.
207217
EXTERNAL_REFERENCE_TYPE_SECURITY_CONTACT = 15;
218+
// Human or machine-readable statements containing facts, evidence, or testimony
219+
EXTERNAL_REFERENCE_TYPE_ATTESTATION = 16;
220+
// An enumeration of identified weaknesses, threats, and countermeasures, dataflow diagram (DFD), attack tree, and other supporting documentation in human-readable or machine-readable format
221+
EXTERNAL_REFERENCE_TYPE_THREAT_MODEL = 17;
222+
// The location where a component was published to. This is often the same as "distribution" but may also include specialized publishing processes that act as an intermediary
223+
EXTERNAL_REFERENCE_TYPE_DISTRIBUTION_INTAKE = 18;
224+
// A Vulnerability Disclosure Report (VDR) which asserts the known and previously unknown vulnerabilities that affect a component, service, or product including the analysis and findings describing the impact (or lack of impact) that the reported vulnerability has on a component, service, or product
225+
EXTERNAL_REFERENCE_TYPE_VULNERABILITY_ASSERTION = 19;
226+
// A Vulnerability Exploitability eXchange (VEX) which asserts the known vulnerabilities that do not affect a product, product family, or organization, and optionally the ones that do. The VEX should include the analysis and findings describing the impact (or lack of impact) that the reported vulnerability has on the product, product family, or organization
227+
EXTERNAL_REFERENCE_TYPE_EXPLOITABILITY_STATEMENT = 20;
228+
// Results from an authorized simulated cyberattack on a component or service, otherwise known as a penetration test
229+
EXTERNAL_REFERENCE_TYPE_PENTEST_REPORT = 21;
230+
// SARIF or proprietary machine or human-readable report for which static analysis has identified code quality, security, and other potential issues with the source code
231+
EXTERNAL_REFERENCE_TYPE_STATIC_ANALYSIS_REPORT = 22;
232+
// Dynamic analysis report that has identified issues such as vulnerabilities and misconfigurations
233+
EXTERNAL_REFERENCE_TYPE_DYNAMIC_ANALYSIS_REPORT = 23;
234+
// Report generated by analyzing the call stack of a running application
235+
EXTERNAL_REFERENCE_TYPE_RUNTIME_ANALYSIS_REPORT = 24;
236+
// Report generated by Software Composition Analysis (SCA), container analysis, or other forms of component analysis
237+
EXTERNAL_REFERENCE_TYPE_COMPONENT_ANALYSIS_REPORT = 25;
238+
// Report containing a formal assessment of an organization, business unit, or team against a maturity model
239+
EXTERNAL_REFERENCE_TYPE_MATURITY_REPORT = 26;
240+
// Industry, regulatory, or other certification from an accredited (if applicable) certification body
241+
EXTERNAL_REFERENCE_TYPE_CERTIFICATION_REPORT = 27;
242+
// Report or system in which quality metrics can be obtained
243+
EXTERNAL_REFERENCE_TYPE_QUALITY_METRICS = 28;
244+
// Code or configuration that defines and provisions virtualized infrastructure, commonly referred to as Infrastructure as Code (IaC)
245+
EXTERNAL_REFERENCE_TYPE_CODIFIED_INFRASTRUCTURE = 29;
208246
// A model card describes the intended uses of a machine learning model, potential limitations, biases, ethical considerations, training parameters, datasets used to train the model, performance metrics, and other relevant data useful for ML transparency.
209-
EXTERNAL_REFERENCE_TYPE_MODEL_CARD = 16;
247+
EXTERNAL_REFERENCE_TYPE_MODEL_CARD = 30;
210248
}
211249

212250
enum HashAlg {
@@ -365,7 +403,7 @@ message Metadata {
365403
// The date and time (timestamp) when the document was created.
366404
optional google.protobuf.Timestamp timestamp = 1;
367405
// The tool(s) used in the creation of the BOM.
368-
repeated Tool tools = 2;
406+
optional Tool tools = 2;
369407
// The person(s) who created the BOM. Authors are common in BOMs created through manual processes. BOMs created through automated means may not have authors.
370408
repeated OrganizationalContact authors = 3;
371409
// The component that the BOM describes.
@@ -463,7 +501,7 @@ message Service {
463501
optional bool authenticated = 8;
464502
// A boolean value indicating if use of the service crosses a trust zone or boundary. A value of true indicates that by using the service, a trust boundary is crossed. A value of false indicates that by using the service, a trust boundary is not crossed.
465503
optional bool x_trust_boundary = 9;
466-
repeated DataClassification data = 10;
504+
repeated DataFlow data = 10;
467505
repeated LicenseChoice licenses = 11;
468506
// Provides the ability to document external references related to the service.
469507
repeated ExternalReference external_references = 12;
@@ -473,6 +511,8 @@ message Service {
473511
repeated Property properties = 14;
474512
// Specifies optional release notes.
475513
optional ReleaseNotes releaseNotes = 15;
514+
// The name of the trust zone the service resides in.
515+
optional string trustZone = 16;
476516
}
477517

478518
message Swid {
@@ -494,15 +534,20 @@ message Swid {
494534

495535
// Specifies a tool (manual or automated).
496536
message Tool {
497-
// The vendor of the tool used to create the BOM.
498-
optional string vendor = 1;
499-
// The name of the tool used to create the BOM.
500-
optional string name = 2;
501-
// The version of the tool used to create the BOM.
502-
optional string version = 3;
503-
repeated Hash hashes = 4;
504-
// Provides the ability to document external references related to the tool.
505-
repeated ExternalReference external_references = 5;
537+
// DEPRECATED - DO NOT USE - The vendor of the tool used to create the BOM.
538+
optional string vendor = 1 [deprecated = true];
539+
// DEPRECATED - DO NOT USE - The name of the tool used to create the BOM.
540+
optional string name = 2 [deprecated = true];
541+
// DEPRECATED - DO NOT USE - The version of the tool used to create the BOM.
542+
optional string version = 3 [deprecated = true];
543+
// DEPRECATED - DO NOT USE
544+
repeated Hash hashes = 4 [deprecated = true];
545+
// DEPRECATED - DO NOT USE - Provides the ability to document external references related to the tool.
546+
repeated ExternalReference external_references = 5 [deprecated = true];
547+
// A list of software and hardware components used as tools
548+
repeated Component components = 6;
549+
// A list of services used as tools. This may include microservices, function-as-a-service, and other types of network or intra-process services.
550+
repeated Service services = 7;
506551
}
507552

508553
// Specifies a property
@@ -543,6 +588,82 @@ message EvidenceCopyright {
543588
message Evidence {
544589
repeated LicenseChoice licenses = 1;
545590
repeated EvidenceCopyright copyright = 2;
591+
repeated EvidenceIdentity identity = 3;
592+
repeated EvidenceOccurrences occurrences = 4;
593+
optional Callstack callstack = 5;
594+
}
595+
596+
// Evidence of the components use through the callstack.
597+
message Callstack {
598+
repeated Frames frames = 1;
599+
600+
message Frames {
601+
// A package organizes modules into namespaces, providing a unique namespace for each type it contains.
602+
optional string package = 1;
603+
// A module or class that encloses functions/methods and other code.
604+
string module = 2;
605+
// A block of code designed to perform a particular task.
606+
optional string function = 3;
607+
// Optional arguments that are passed to the module or function.
608+
repeated string parameters = 4;
609+
// The line number the code that is called resides on.
610+
optional int32 line = 5;
611+
// The column the code that is called resides.
612+
optional int32 column = 6;
613+
// The full path and filename of the module.
614+
optional string fullFilename = 7;
615+
}
616+
}
617+
618+
message EvidenceIdentity {
619+
// The identity field of the component which the evidence describes.
620+
EvidenceFieldType field = 1;
621+
// The overall confidence of the evidence from 0 - 1, where 1 is 100% confidence.
622+
optional float confidence = 2;
623+
// The methods used to extract and/or analyze the evidence.
624+
repeated EvidenceMethods methods = 3;
625+
// The object in the BOM identified by its bom-ref. This is often a component or service, but may be any object type supporting bom-refs. Tools used for analysis should already be defined in the BOM, either in the metadata/tools, components, or formulation.
626+
repeated string tools = 4;
627+
}
628+
629+
message EvidenceMethods {
630+
// The technique used in this method of analysis.
631+
EvidenceTechnique technique = 1;
632+
// The confidence of the evidence from 0 - 1, where 1 is 100% confidence. Confidence is specific to the technique used. Each technique of analysis can have independent confidence.
633+
float confidence = 2;
634+
// The value or contents of the evidence.
635+
optional string value = 3;
636+
}
637+
638+
message EvidenceOccurrences {
639+
// An optional identifier which can be used to reference the occurrence elsewhere in the BOM. Every bom-ref MUST be unique within the BOM.
640+
optional string bom_ref = 1;
641+
// The location or path to where the component was found.
642+
string location = 2;
643+
}
644+
645+
enum EvidenceFieldType {
646+
EVIDENCE_FIELD_NULL = 0;
647+
EVIDENCE_FIELD_GROUP = 1;
648+
EVIDENCE_FIELD_NAME = 2;
649+
EVIDENCE_FIELD_VERSION = 3;
650+
EVIDENCE_FIELD_PURL = 4;
651+
EVIDENCE_FIELD_CPE = 5;
652+
EVIDENCE_FIELD_SWID = 6;
653+
EVIDENCE_FIELD_HASH = 7;
654+
}
655+
656+
enum EvidenceTechnique {
657+
EVIDENCE_TECHNIQUE_SOURCE_CODE_ANALYSIS = 0;
658+
EVIDENCE_TECHNIQUE_BINARY_ANALYSIS = 1;
659+
EVIDENCE_TECHNIQUE_MANIFEST_ANALYSIS = 2;
660+
EVIDENCE_TECHNIQUE_AST_FINGERPRINT = 3;
661+
EVIDENCE_TECHNIQUE_HASH_COMPARISON = 4;
662+
EVIDENCE_TECHNIQUE_INSTRUMENTATION = 5;
663+
EVIDENCE_TECHNIQUE_DYNAMIC_ANALYSIS = 6;
664+
EVIDENCE_TECHNIQUE_FILENAME = 7;
665+
EVIDENCE_TECHNIQUE_ATTESTATION = 8;
666+
EVIDENCE_TECHNIQUE_OTHER = 9;
546667
}
547668

548669
message Note {
@@ -592,7 +713,7 @@ message Vulnerability {
592713
repeated int32 cwes = 6;
593714
// A description of the vulnerability as provided by the source.
594715
optional string description = 7;
595-
// If available, an in-depth description of the vulnerability as provided by the source organization. Details often include examples, proof-of-concepts, and other information useful in understanding root cause.
716+
// If available, an in-depth description of the vulnerability as provided by the source organization. Details often include information useful in understanding root cause.
596717
optional string detail = 8;
597718
// Recommendations of how the vulnerability can be remediated or mitigated.
598719
optional string recommendation = 9;
@@ -607,7 +728,7 @@ message Vulnerability {
607728
// Individuals or organizations credited with the discovery of the vulnerability.
608729
optional VulnerabilityCredits credits = 14;
609730
// The tool(s) used to identify, confirm, or score the vulnerability.
610-
repeated Tool tools = 15;
731+
optional Tool tools = 15;
611732
// An assessment of the impact and exploitability of the vulnerability.
612733
optional VulnerabilityAnalysis analysis = 16;
613734
// affects
@@ -616,6 +737,19 @@ message Vulnerability {
616737
repeated Property properties = 18;
617738
// The date and time (timestamp) when the vulnerability record was rejected (if applicable).
618739
optional google.protobuf.Timestamp rejected = 19;
740+
// Evidence used to reproduce the vulnerability.
741+
optional ProofOfConcept proofOfConcept = 20;
742+
// A bypass, usually temporary, of the vulnerability that reduces its likelihood and/or impact. Workarounds often involve changes to configuration or deployments.
743+
optional string workaround = 21;
744+
}
745+
746+
message ProofOfConcept {
747+
// Precise steps to reproduce the vulnerability.
748+
optional string reproductionSteps = 1;
749+
// A description of the environment in which reproduction was possible.
750+
optional string environment = 2;
751+
// Supporting material that helps in reproducing or understanding how reproduction is possible. This may include screenshots, payloads, and PoC exploit code.
752+
repeated AttachedText supportingMaterial = 3;
619753
}
620754

621755
message VulnerabilityReference {
@@ -663,6 +797,8 @@ enum ScoreMethod {
663797
SCORE_METHOD_OWASP = 4;
664798
// Other scoring method
665799
SCORE_METHOD_OTHER = 5;
800+
// Common Vulnerability Scoring System v3.1 - https://www.first.org/cvss/v4-0/
801+
SCORE_METHOD_CVSSV4 = 6;
666802
}
667803

668804
message Advisory {

0 commit comments

Comments
 (0)