Repository navigation
Conversation
Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
| "description": "References using bom-link or `refId` to objects by means of which this behavior is performed, such as the cryptographic key and algorithm used to create a signature. An instrument neither performs the behavior nor is affected by it.", | ||
| "uniqueItems": true, | ||
| "items": { | ||
| "$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType" |
There was a problem hiding this comment.
type and description do not match
- see details here: [Defect]: 2.0 linked elements - docs and type mismatch #1202
cyclonedx-common-2.0.schema.json#/$defs/refLinkType matches refId only,
description suggests the use of cyclonedx-common-2.0.schema.json#/$defs/elementLink
There was a problem hiding this comment.
You're right. I copied the type and the wording from the neighbouring actors and targets, which have the same mismatch described in #1202.
I see two ways to fix it and would like your preference before changing anything:
- Switch
instrumentstoelementLink. The description stays as it is. This allows pointing to a key or algorithm in another BOM, which is a realistic case when the CBOM is a separate document. It would makeinstrumentsdiffer fromactorsandtargetsuntil [Defect]: 2.0 linked elements - docs and type mismatch #1202 is resolved. - Keep
refLinkTypeand change the description torefIdonly. This stays consistent withactorsandtargetsas they validate today, and can follow whatever [Defect]: 2.0 linked elements - docs and type mismatch #1202 decides later.
I lean towards option 1, because the cross-BOM case matters for cryptographic assets, but I don't want this PR to pre-empt the decision in #1202. Which would you prefer?
| "instruments": { | ||
| "type": "array", | ||
| "title": "Instruments", | ||
| "description": "References using bom-link or `refId` to objects by means of which this behavior is performed, such as the cryptographic key and algorithm used to create a signature. An instrument neither performs the behavior nor is affected by it.", |
There was a problem hiding this comment.
could this be more clear?
maybe like so
| "description": "References using bom-link or `refId` to objects by means of which this behavior is performed, such as the cryptographic key and algorithm used to create a signature. An instrument neither performs the behavior nor is affected by it.", | |
| "description": "References using bom-link or `refId` to objects by means of which this behavior is performed in the form of a component with `type=\"cryptographic-asset\"`, such as the cryptographic key and algorithm used to create a signature. An instrument neither performs the behavior nor is affected by it.", |
|
Thanks @jkowalleck for the review. Before replying to the two inline points, let me explain why this draft exists, because I'd first like to know whether it is the right approach at all. Background. In #1195 I proposed a What this draft tries: It adds an optional My question: Is the behavior module the right place to solve this? If you would rather see it expressed another way, for example through |
|
No worris, just flagged my findings early, so you can discuss them in your next working group meeting. Keep on the good work 👍 |
|
Thanks @Mehrn0ush for picking this up. Let me recap my view of the use case: The original question in #1162, which algorithm does what in a protocol, is now covered by #1213. That includes the keys a protocol uses. The SSH example there shows a host key. What remains is a statement like "the build service signs the firmware with this key". I think behaviors are the right candidate for it, better than labelled dependencies. A dependency connects two things. Here we have three: who signs, what is signed, and with which key. A behavior already has the first two, and Two points before we should clarify:
|
|
Thanks @bhess, that recap helps. Agreed. @jkowalleck suggested narrowing the description to components of type An example where dependency plus
If useful, I can change the example in this PR to case 1 (two keys, two targets). |
Follow-up to the review of #1195 (thanks @bhess): a role is less a property of a cryptographic asset and more how another component uses it. The behavior taxonomy already names such uses (e.g.
security:cryptography:signsCode), but a behavior instance can only state who performs it (actors) and what is affected (targets). There is no way to state which key or algorithm it is performed with.This PR adds an optional
instrumentsarray tobehaviorInstance: references to the objects by means of which the behavior is performed. An instrument neither performs the behavior nor is affected by it.Fixtures: one valid document (a build service signs a firmware image with a private key and ML-DSA-65) and two invalid ones (non-array value, duplicate references).
Opened as a draft for discussion. Open questions: the property name (
instrumentsvsuses), and whether labelled dependencies or blueprint relationships are the preferred long-term home.Related to #1162 and #1195.