Skip to content

CBOM: add custom fingerprints#903

Open
bhess wants to merge 2 commits into
CycloneDX:2.0-devfrom
bhess:bhe-20-fingerprint
Open

CBOM: add custom fingerprints#903
bhess wants to merge 2 commits into
CycloneDX:2.0-devfrom
bhess:bhe-20-fingerprint

Conversation

@bhess
Copy link
Copy Markdown
Contributor

@bhess bhess commented Apr 2, 2026

Extend the fingerprint definition in cyclonedx-cryptography-2.0.schema.json to support custom fingerprint algorithms alongside standard hash algorithms.

Changes

  • Replace the flat $ref: hash on certificateProperties.fingerprint and relatedCryptoMaterialProperties.fingerprint with a single central $defs/fingerprint definition
  • $defs/fingerprint uses oneOf with two branches:
    • Standard Hashalg + content (refs to existing hashAlgorithm / hashValue); fully backward compatible
    • Custom FingerprintcustomAlg + customContent for non-standard algorithms

Backward Compatibility

Existing documents with {"alg": "SHA-256", "content": "..."} satisfy the Standard Hash branch unchanged.

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
@bhess bhess requested a review from a team as a code owner April 2, 2026 15:23
@bhess bhess added the cap: cryptography Capability: Cryptography (CBOM) label Apr 2, 2026
@stevespringett stevespringett added request for comment RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration proposed core enhancement labels Apr 16, 2026
@stevespringett stevespringett added this to the 2.0 milestone Apr 16, 2026
@jkowalleck
Copy link
Copy Markdown
Member

jkowalleck commented Apr 16, 2026

RFC notice sent on May 04, 2026

Public RFC period ends June 01, 2026

"additionalProperties": false,
"properties": {
"alg": {
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/hashAlgorithm"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a title and description

Suggested change
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/hashAlgorithm"
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/hashAlgorithm",
"title": "Standard, well-known Fingerprint Algorithm",
"description": "The standard, well-known algorithm used to compute the fingerprint."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhess, if the title and description of the alg property differ from the title and description of the hashAlgorithm definition, we'll need a title and description here. If they are the same, there is no need for a title and description. Please confirm.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhess, if the title and description of the alg property differ from the title and description of the hashAlgorithm definition, we'll need a title and description here. If they are the same, there is no need for a title and description. Please confirm.

The title/descrption don't differ from the ones of hashAlgorithm .

"$ref": "cyclonedx-common-2.0.schema.json#/$defs/hashAlgorithm"
},
"content": {
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/hashValue"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a title and description

Suggested change
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/hashValue"
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/hashValue",
"title": "Standard, well-known Fingerprint Content",
"description": "The value of the fingerprint computed using the standard, well-known algorithm."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhess, if the title and description of the content property differ from the title and description of the hashValue definition, we'll need a title and description here. If they are the same, there is no need for a title and description. Please confirm.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhess, if the title and description of the content property differ from the title and description of the hashValue definition, we'll need a title and description here. If they are the same, there is no need for a title and description. Please confirm.

The title/descrption don't differ from the ones of hashValue.

"title": "Fingerprint",
"description": "The fingerprint is a cryptographic hash of the asset.",
"oneOf": [
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevespringett

this data structure looks pretty much like cyclonedx-common-2.0.schema.json#$defs/hash.

To prevent any confusion, we should add narrow titles/descriptions to cyclonedx-common-2.0.schema.json#$defs/hash/properties/alg and cyclonedx-common-2.0.schema.json#$defs/hash/properties/content

something like

{
// cyclonedx-common-2.0.schema.json#$defs
    "hash": {
      "type": "object",
      "title": "Hash",
      "required": [
        "alg",
        "content"
      ],
      "additionalProperties": false,
      "properties": {
        "alg": {
          "$ref": "#/$defs/hashAlgorithm",
          "titile": "Hash algorithm",
          "description": "Standard, well-known algorithm used to compute the hash"
        },
        "content": {
          "$ref": "#/$defs/hashValue",
          "titile": "Hash value",
          "description": "The value of the hash computed using the standard, well-known algorithm"
        }
      }
    },
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I will need to check to see if those are in place or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jkowalleck, I've added the title/descriptions accordingly in d54f9a0

@jkowalleck
Copy link
Copy Markdown
Member

just some remarks on the schema docs.
Technically, this looks solid. 👍

@stevespringett stevespringett added RFC vote accepted promote to tc54 Promote to Ecma Technical Committee 54 labels May 15, 2026
Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cap: cryptography Capability: Cryptography (CBOM) promote to tc54 Promote to Ecma Technical Committee 54 proposed core enhancement request for comment RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration RFC vote accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants