-
-
Notifications
You must be signed in to change notification settings - Fork 92
Added first-class hardware support #982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3c10d0e
Initial checkin
stevespringett 4bd160d
feat: add origin region for hardware provenance
taleodor 63682cc
fix: multiple origins allowed per subject and origins terminology change
taleodor 30c0c02
fix: add validations and clarify descriptions for origins
taleodor 5e5915f
feat: add origin region for hardware provenance (#952)
stevespringett 2e01b5d
Added hardware-specific data and test cases developed through the har…
stevespringett 3c61c28
Merge remote-tracking branch 'origin/2.0-dev-hardware' into 2.0-dev-h…
stevespringett d8e7469
add material components and stage-scoped origin provenance
stevespringett 5c83b68
Added missing quantity for device and material components
stevespringett 9312c82
Added additional test cases for quantity.
stevespringett 1da95b5
Removed constraint on enum.
stevespringett 5884b3e
Update schema/2.0/model/cyclonedx-hardware-2.0.schema.json
stevespringett 6648151
Update schema/2.0/model/cyclonedx-hardware-2.0.schema.json
stevespringett 68d5469
Renamed hardware schema to physical per recommendation in https://git…
stevespringett 4778514
must -> shall
stevespringett 976d6da
Merge branch '2.0-dev' into 2.0-dev-hardware
stevespringett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
102 changes: 102 additions & 0 deletions
102
schema/2.0/model/cyclonedx-certification-2.0.schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://cyclonedx.org/schema/2.0/model/cyclonedx-certification-2.0.schema.json", | ||
| "type": "null", | ||
| "title": "CycloneDX Certification Model", | ||
| "$comment" : "OWASP CycloneDX is an Ecma International standard (ECMA-424) developed in collaboration between the OWASP Foundation and Ecma Technical Committee 54 (TC54). The standard is published under a royalty-free patent policy. This JSON schema is the reference implementation and is licensed under the Apache License 2.0.", | ||
| "$defs": { | ||
| "certifications": { | ||
| "type": "array", | ||
| "title": "Certifications", | ||
| "description": "Certifications held by or applicable to the subject.", | ||
| "items": { "$ref": "#/$defs/certification" } | ||
| }, | ||
| "certification": { | ||
| "type": "object", | ||
| "title": "Certification", | ||
| "description": "A certification, accreditation, or compliance mark applied to a subject. The subject may be a person, an organization, a system, a product, a service, or any other component. The certification names the standard or scheme, optionally records the certificate identifier, issuer, validity dates, scope, and jurisdiction.", | ||
| "required": [ "standard" ], | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "bom-ref": { | ||
| "$ref": "cyclonedx-common-2.0.schema.json#/$defs/refType", | ||
| "title": "BOM Reference", | ||
| "description": "An optional identifier that can be used to reference the certification from elsewhere. Every bom-ref shall be unique within the containing instance. The value should not start with the prefix `urn:cdx:` to avoid conflicts with BOM-Link identifiers." | ||
| }, | ||
| "standard": { | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "title": "Standard", | ||
| "description": "The certification standard, regulatory scheme, or compliance mark.", | ||
| "examples": [ "ISO 9001:2015", "IATF 16949:2016", "ISO/IEC 27001:2022", "AS9100D", "FCC Part 15", "CE", "UKCA", "RCM", "Common Criteria (ISO/IEC 15408)", "FIPS 140-3", "SOC 2 Type II" ] | ||
| }, | ||
| "identifier": { | ||
| "type": "string", | ||
| "title": "Identifier", | ||
| "description": "Certificate, registration, filing, or scheme identifier issued by the authority." | ||
| }, | ||
| "issuer": { | ||
| "$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType", | ||
| "title": "Issuer", | ||
| "description": "Reference using bom-link or bom-ref to the party that issued the certification. Typically a certification body, accreditation organization, or regulatory authority." | ||
| }, | ||
| "issuedDate": { | ||
| "type": "string", | ||
| "format": "date", | ||
| "title": "Issued Date", | ||
| "description": "Date on which the certification was issued." | ||
| }, | ||
| "expirationDate": { | ||
| "type": "string", | ||
| "format": "date", | ||
| "title": "Expiration Date", | ||
| "description": "Date on which the certification expires or requires renewal." | ||
| }, | ||
| "scope": { | ||
| "type": "string", | ||
| "title": "Scope", | ||
| "description": "Description of the activities, facilities, products, services, or operations covered by the certification." | ||
| }, | ||
| "jurisdiction": { | ||
| "type": "string", | ||
| "title": "Jurisdiction", | ||
| "description": "ISO 3166-1 alpha-2 country code, ISO 3166-2 subdivision, or supranational identifier such as `EU`, where the certification applies.", | ||
| "examples": [ "US", "EU", "GB", "AU", "US-CA" ] | ||
| }, | ||
| "level": { | ||
| "type": "string", | ||
| "title": "Level", | ||
| "description": "The level, class, or grade achieved within the certification scheme, where the scheme defines one.", | ||
| "examples": [ "EAL4+", "Level 2", "Class B" ] | ||
| }, | ||
| "url": { | ||
| "type": "string", | ||
| "format": "iri-reference", | ||
| "title": "URL", | ||
| "description": "URL to the certificate record, filing, or supporting documentation." | ||
| }, | ||
| "relatedClaims": { | ||
| "type": "array", | ||
| "uniqueItems": true, | ||
| "title": "Related Claims", | ||
| "description": "References using bom-link or bom-ref to CycloneDX Attestations (CDXA) claims that substantiate the certification, such as the claims, evidence, and counter evidence assembled during the conformity assessment.", | ||
| "items": { | ||
| "anyOf": [ | ||
| { | ||
| "title": "Ref", | ||
| "$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType" | ||
| }, | ||
| { | ||
| "title": "BOM-Link Element", | ||
| "$ref": "cyclonedx-common-2.0.schema.json#/$defs/bomLinkElementType" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "properties": { | ||
| "$ref": "cyclonedx-common-2.0.schema.json#/$defs/properties" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -379,6 +379,13 @@ | |||||
| "title": "Organizational Contact", | ||||||
| "description": "A contact at the organization. Multiple contacts are allowed.", | ||||||
| "items": {"$ref": "#/$defs/organizationalContact"} | ||||||
| }, | ||||||
| "origins": { | ||||||
| "type": "array", | ||||||
| "title": "Organization Origins", | ||||||
| "description": "The geographic origins associated with the organization, such as the country or countries where its goods or services originate. Multiple origins are allowed, each calculated on a different basis.", | ||||||
| "minItems": 1, | ||||||
| "items": {"$ref": "#/$defs/origin"} | ||||||
| } | ||||||
| } | ||||||
| }, | ||||||
|
|
@@ -415,6 +422,131 @@ | |||||
| }, | ||||||
| "organizationalEntityOrContact": { | ||||||
|
|
||||||
| }, | ||||||
| "origin": { | ||||||
| "type": "object", | ||||||
| "title": "Origin", | ||||||
| "description": "Describes the geographic origin of the subject (for example, a component or party), expressed as a distribution across one or more countries or subdivisions, calculated on a stated basis. An origin may be scoped to a lifecycle or transformation stage, enabling stage-specific provenance such as distinguishing where a material was mined from where it was melted.", | ||||||
| "additionalProperties": false, | ||||||
| "required": [ "basis", "distribution" ], | ||||||
| "properties": { | ||||||
| "stage": { | ||||||
| "title": "Origin Stage", | ||||||
| "description": "The lifecycle or transformation stage of the subject to which this origin applies. When omitted, the origin describes the subject as a whole.", | ||||||
| "oneOf": [ | ||||||
| { | ||||||
| "type": "string", | ||||||
| "title": "Predefined Origin Stage", | ||||||
| "description": "An origin stage drawn from the predefined set.", | ||||||
| "enum": [ | ||||||
| "designed", | ||||||
| "mined", | ||||||
| "harvested", | ||||||
| "recycled", | ||||||
| "refined", | ||||||
| "separated", | ||||||
| "smelted", | ||||||
| "melted", | ||||||
| "processed", | ||||||
| "manufactured", | ||||||
| "assembled", | ||||||
| "developed", | ||||||
| "built", | ||||||
| "tested", | ||||||
| "collected", | ||||||
| "trained", | ||||||
| "hosted", | ||||||
| "operated", | ||||||
| "maintained" | ||||||
| ], | ||||||
| "meta:enum": { | ||||||
| "designed": "Creation of the design, specifications, or intellectual property of the subject, such as product design or integrated circuit design.", | ||||||
| "mined": "Extraction of raw material from the earth, including ore mining and quarrying.", | ||||||
| "harvested": "Collection of biologically derived raw material, such as timber, fibres, or natural rubber.", | ||||||
| "recycled": "Recovery of material from scrap, waste, or previously used items.", | ||||||
| "refined": "Purification of material, including chemical refining and electrorefining.", | ||||||
| "separated": "Separation of individual elements or compounds from a mixed feedstock, such as rare earth element separation.", | ||||||
| "smelted": "Extraction of metal from ore or concentrate by smelting.", | ||||||
| "melted": "Melting of material into a homogeneous mass, such as an alloying melt or a remelt.", | ||||||
| "processed": "Intermediate transformation not covered by a more specific stage, such as milling, atomization, or heat treatment.", | ||||||
| "manufactured": "Fabrication of the item from its input materials or parts.", | ||||||
| "assembled": "Integration of constituent parts into the finished item.", | ||||||
| "developed": "Authoring of the source code of software or firmware.", | ||||||
| "built": "Production of software artifacts from source, including compilation, packaging, and container image assembly.", | ||||||
| "tested": "Verification of the subject against its requirements, such as software testing, hardware qualification, or final device test.", | ||||||
| "collected": "Gathering of data from its sources, such as measurements, records, or user generated content.", | ||||||
| "trained": "Training of a machine learning model, attributed to the regions where the training computation was performed.", | ||||||
| "hosted": "Provision of the infrastructure on which a service or data resides, such as data centre regions.", | ||||||
| "operated": "Operation and administration of the subject, attributed to the regions where operating personnel or systems are located.", | ||||||
| "maintained": "Ongoing maintenance of the subject after release, including updates, patches, and security fixes." | ||||||
| } | ||||||
| }, | ||||||
| { | ||||||
| "type": "object", | ||||||
| "title": "Custom Origin Stage", | ||||||
| "description": "An origin stage that is not present in the predefined set.", | ||||||
| "required": [ "name" ], | ||||||
| "additionalProperties": false, | ||||||
| "properties": { | ||||||
| "name": { | ||||||
| "type": "string", | ||||||
| "minLength": 1, | ||||||
| "title": "Name", | ||||||
| "description": "The name of the custom origin stage.", | ||||||
| "examples": [ "sintered", "coated", "packaged" ] | ||||||
| }, | ||||||
| "description": { | ||||||
| "type": "string", | ||||||
| "title": "Description", | ||||||
| "description": "Description of the custom origin stage." | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| ] | ||||||
| }, | ||||||
| "basis": { | ||||||
| "type": "string", | ||||||
| "title": "Origin Basis", | ||||||
| "description": "A free-form description of the methodology or unit on which the origin distribution is calculated. Each origin of the same subject shall use a distinct combination of stage and basis.", | ||||||
| "minLength": 1, | ||||||
| "examples": [ "number of parts", "manufacturing cost", "net weight" ] | ||||||
| }, | ||||||
| "distribution": { | ||||||
| "type": "array", | ||||||
| "title": "Origin Distribution", | ||||||
| "description": "The distribution of the origin across regions. The percentages of all entries shall total 100, within rounding of the stated precision.", | ||||||
| "minItems": 1, | ||||||
| "items": { "$ref": "#/$defs/originRegion" } | ||||||
| } | ||||||
| } | ||||||
| }, | ||||||
| "originRegion": { | ||||||
| "type": "object", | ||||||
| "title": "Origin Region", | ||||||
| "description": "A single region of origin, its share of the whole, and optionally the party that performed the stage in that region.", | ||||||
| "additionalProperties": false, | ||||||
| "required": [ "isoCode", "percentage" ], | ||||||
| "properties": { | ||||||
| "isoCode": { | ||||||
| "type": "string", | ||||||
| "title": "ISO Code", | ||||||
| "description": "The country or subdivision of origin, expressed as an ISO 3166-1 alpha-2 country code (for example, 'CA' for Canada) or an ISO 3166-2 subdivision code (for example, 'US-CA' for California, United States).", | ||||||
| "pattern": "^[A-Z]{2}(-[A-Z0-9]{1,3})?$", | ||||||
| "examples": [ "CA", "US-CA" ] | ||||||
| }, | ||||||
| "percentage": { | ||||||
| "type": "number", | ||||||
| "title": "Percentage", | ||||||
| "description": "The percentage of the whole attributable to this region. The percentages of all entries in a distribution must total 100, within rounding of the stated precision.", | ||||||
| "minimum": 0, | ||||||
| "maximum": 100 | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in other parts of CycloneDX, we go with a value from 0 to 1 to represent percentage.
Suggested change
we then need to change the description |
||||||
| }, | ||||||
| "performedBy": { | ||||||
| "$ref": "#/$defs/refLinkType", | ||||||
| "title": "Performed By", | ||||||
| "description": "Reference to the party that performed this stage of origin for this share of the distribution, such as the smelter that melted a material or the organization that developed a software component. Entries in a distribution may repeat a region in order to attribute shares to different parties." | ||||||
| } | ||||||
| } | ||||||
| }, | ||||||
| "properties": { | ||||||
| "type": "array", | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thougtsL
adding up to some full value might be funny ...
i mean, 1/3 + 2/3 = 1
so this would be 33.333333333....
and 66.666666666666....
which might not add up to the full 100 per programming language.