Introduce pre-defined perspectives - #1067
Draft
taleodor wants to merge 4 commits into
Draft
Conversation
…e form Adds an optional 'predefined' field to the perspective model, identifying a well-known perspective published in the CycloneDX perspectives catalog and incorporating the published definition by reference, so tooling can recognize the perspective without matching on free-text names. A perspective either declares a pre-defined identity or defines its own mappings inline; mixing the two is not permitted, keeping the published definition the single source of truth for what a pre-defined perspective contains. Initial enum values: model-card, pqc-readiness. Valid/invalid fixtures added covering the reference form, the inline form, enum rejection, and the forbidden mixed form. Bundled schemas are left to the post-merge bundle workflow. Signed-off-by: Pavel Shukhman <pavel@reliza.io>
Second entry in the perspectives catalog, following the delivery shape of the PQC readiness perspective: a complete, minimal, valid 2.0 document containing only the perspective. This is the definition incorporated by reference when a document declares the pre-defined perspective 'model-card'. The mappings express the industry-standard model card structure over the CycloneDX 2.0 decomposition of the former first-class modelCard entity: intrinsic technical characteristics in modelProperties (scoped to components of type machine-learning-model, the only type that may carry them), training datasets as components of type data, intended use cases as use case definitions, and ethical and fairness considerations as risk model entries. Assumes the AI/ML model properties proposed in CycloneDX#990. Signed-off-by: Pavel Shukhman <pavel@reliza.io>
The reference form previously excluded only inline mappings, leaving name, description, domains, externalReferences, and properties legal alongside a pre-defined identity. That allowed documents to locally shadow published fields (e.g. a different name or domains) with no defined precedence. The reference form now forbids all inline content except bom-ref, so the published definition is unambiguously the single source of truth. Invalid fixture added covering annotation of a pre-defined perspective. Signed-off-by: Pavel Shukhman <pavel@reliza.io>
…sion The expression selects all components of type data; JSONPath cannot follow references, so the selection is necessarily broader than the datasets referenced from the model's training information. Soften the description so prose and expression agree. Signed-off-by: Pavel Shukhman <pavel@reliza.io>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements #1066.
What this adds
1. Schema: optional predefined field on perspective (cyclonedx-perspective-2.0.schema.json)
{ "perspectives": [ { "predefined": "model-card" } ] }Why a field rather than the choice pattern
We deliberately chose a field on the perspective object instead, since it keeps a pre-defined perspective addressable. A bare enum string cannot carry a bom-ref, so a string-item pre-defined perspective could never be the target of a BOM-Link or any other intra-document reference. With the field form, { "bom-ref": "…", "predefined": "model-card" } remains a first-class, referenceable node, and the oneOf on the object enforces the same pre-defined/custom exclusivity the choice pattern would have given us.
2. Catalog: perspectives/model-card-perspective.json
Second entry in the perspectives/ catalog introduced by #960, following its delivery shape (a complete, minimal, valid 2.0 document containing only the perspective). This is the definition incorporated when a document declares "predefined": "model-card".
The mappings express the industry-standard model card structure over the 2.0 decomposition of the former first-class modelCard entity:
3. Test fixtures (auto-discovered by the schema-v2 suite):
Not included
Dependencies