Repository navigation
docs(1.7): clarify that an omitted nistQuantumSecurityLevel is not 0 - #1177
Lennonhaha wants to merge 2 commits into
Conversation
The 1.7 description only stated "A value of 0 indicates that none of the categories are met." It said nothing about the omitted case, which leaves two readings open: that omission means 0, or that omission means "not evaluated". Both readings are wrong. 0 is an assertion that none of the categories are met; an omitted property makes no category assertion at all, and says nothing about whether an assessment was performed. Encoding "unknown" as 0 turns a non-claim into a claim. Description-only change, applied to the three 1.7 artifacts so they stay in sync: bom-1.7.schema.json (description), bom-1.7.xsd (documentation) and bom-1.7.proto (comment). No structure, type, bound or required list is touched. Verified: the edited schema still compiles under ajv; valid-bom-1.7.json still validates, and two invalid 1.7 fixtures are still rejected, so the check is not vacuous; the XSD still parses as XML. No BOM, no CRLF, no U+FFFD introduced. 1.6.2 keeps its current wording here: it is released and superseded by 1.7, and changing a released artifact is a separate decision. 2.0-dev needs the same wording once this one is settled. Signed-off-by: 刘天赫 <research@fibemate.net>
Mehrn0ush
left a comment
There was a problem hiding this comment.
Thanks @Lennonhaha for preparing this clarification. The JSON and XML changes reflect the distinction discussed in #1175: omission makes no category assertion and establishes no assessment status, while an explicit 0 means none of the referenced categories are met. The diff leaves validation constraints unchanged.
Please address the Protobuf wording noted inline so that its accessor default is not confused with an asserted category. The three formats should express the same CycloneDX semantics, with encoding-specific guidance where necessary.
This PR targets master and updates only the 1.7 artifacts. Please link a follow-up for the equivalent clarification in 2.0-dev, or record the agreed plan in #1175, so the 2.0 work remains explicitly tracked.
Maintainers can confirm the appropriate release handling and sequencing.
| // The classical security level that a cryptographic algorithm provides (in bits). | ||
| optional int32 classicalSecurityLevel = 10; | ||
| // The NIST security strength category as defined in https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization/evaluation-criteria/security-(evaluation-criteria). A value of 0 indicates that none of the categories are met. | ||
| // The NIST security strength category as defined in https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization/evaluation-criteria/security-(evaluation-criteria). This property is optional and has no default: omitting it is not an implicit 0, and does not establish whether an assessment was performed. A value of 0 indicates that none of the categories are met. Consumers should not interpret an omitted value as 0, nor treat it as evidence that the asset is quantum-safe. |
There was a problem hiding this comment.
“has no default” is misleading for this proto3 optional int32. An unset field’s numeric accessor returns 0, while explicit field presence distinguishes absence from a supplied zero. The intended CycloneDX semantics are correct; please describe that distinction here rather than copying the JSON Schema explanation unchanged. See Protobuf field-presence semantics (https://protobuf.dev/programming-guides/field_presence/#semantic-differences).
Suggested replacement:
| // The NIST security strength category as defined in https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization/evaluation-criteria/security-(evaluation-criteria). This property is optional and has no default: omitting it is not an implicit 0, and does not establish whether an assessment was performed. A value of 0 indicates that none of the categories are met. Consumers should not interpret an omitted value as 0, nor treat it as evidence that the asset is quantum-safe. | |
| // The NIST security strength category as defined in https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization/evaluation-criteria/security-(evaluation-criteria). This field is optional. Absence makes no NIST-category assertion and does not establish whether an assessment was performed. Consumers should use field presence to distinguish absence from an explicitly supplied zero; the numeric accessor value alone is insufficient. A value of 0 indicates that none of the categories are met. Consumers should not treat absence as evidence that the asset is quantum-safe. | |
|
Verified locally on f84e0f7 with protoc: bom-1.7.proto compiles. |
|
Thanks for running Two things your result settles:
One question before this goes further: would it help to add a sentence telling consumers to test presence rather than compare to |
|
Thanks—yes, please add the presence-check guidance and replace “has no default” in the Protobuf comment. An unset field’s numeric accessor returns 0, so consumers must check field presence to distinguish absence from an explicitly supplied zero. Please keep this language-neutral; examples from individual bindings aren’t necessary. That would address my remaining concern. |
…stQuantumSecurityLevel The Protobuf comment said the property "has no default", which is the wrong model for `optional int32`: an unset field's numeric accessor returns 0, so the value alone cannot be told apart from an explicitly supplied zero. That is exactly the confusion this clarification exists to prevent. Replace the phrase in all three 1.7 artifacts and state the consequence instead: an omitted value makes no category assertion and does not establish whether an assessment was performed; a value of 0 states that none of the categories are met; consumers must check whether the field is present rather than comparing the value to 0. Language-neutral on purpose. No per-binding accessor names, so the wording does not need revising when bindings change. Description and documentation text only. No field number, type, optionality, bound or required list is touched: the JSON structure is unchanged apart from description strings, and the XSD still parses as XML. Signed-off-by: 刘天赫 <research@fibemate.net>
80f0713 to
40d5c0e
Compare
|
Presence wording added, and "has no default" is gone from all three 1.7 artifacts. Kept language-neutral - no per-binding accessor names. Scope, verified rather than asserted: description and documentation text only. The JSON structure is unchanged apart from description strings (compared with description keys stripped), and the XSD still parses as XML. No field number, type, optionality, bound or required list is touched. One thing I did not do: I have no |
|
Thanks, the updated presence wording addresses my concern. I reran protoc: both versions compile and produce byte-identical descriptor sets. LGTM! |
|
Thanks for the thorough review and for re-running protoc locally - good to have the descriptor sets confirmed byte-identical. One detail: the review is still recorded as "changes requested", which keeps the PR blocked. If the current wording works for you, flipping that state would let a maintainer merge. I do not have write access to this repository, so the merge itself is not mine to make. |
Follow-up to #1175, as @Mehrn0ush suggested: a description-only clarification for 1.7.
The gap
The 1.7 description currently reads:
It defines
0but says nothing about the omitted case, which leaves two readings open:0, orNeither is right, and the two are different mistakes.
0is a positive assertion that no NIST category is met. An omitted property asserts nothing about categories and additionally says nothing about whether anyone assessed the asset. Consumers that fold absent into0therefore upgrade a non-claim into a claim — the failure mode that started this thread.The change
Description text only, applied to the three 1.7 artifacts so they do not drift apart:
schema/bom-1.7.schema.jsondescriptionschema/bom-1.7.xsdxs:documentationschema/bom-1.7.protoNew wording:
No structure, type, bound or required list is touched.
Verification
valid-bom-1.7.jsonstill validatesinvalid-bomformat,invalid-component-type) are still rejected — included so the "it validates" claim is not vacuousbom-1.7.xsdstill parses as XMLScope notes
notEvaluatedetc.). If an independent, scale-agnostic way to express "assessed / not assessed" is wanted, that is a new field with its own discussion — not something this description change implies.