-
-
Notifications
You must be signed in to change notification settings - Fork 79
[1.7] citation: proposed changes 2 #667
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
jkowalleck
merged 4 commits into
1.7-dev-citations
from
1.7-dev-citations_proposed_changes_2
Aug 11, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
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
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 |
|---|---|---|
|
|
@@ -532,7 +532,7 @@ | |
| "items": {"$ref": "#/definitions/citation"}, | ||
| "uniqueItems": true, | ||
| "title": "Citations", | ||
| "description": "A list of attributions indicating which entity supplied information for specific fields within the BOM." | ||
| "description": "A collection of attributions indicating which entity supplied information for specific fields within the BOM." | ||
| }, | ||
| "properties": { | ||
| "type": "array", | ||
|
|
@@ -6125,43 +6125,43 @@ | |
| "$ref": "#/definitions/refType", | ||
| "title": "BOM Reference" | ||
| }, | ||
| "attributedTo": { | ||
| "$ref": "#/definitions/refLinkType", | ||
| "title": "Attributed To", | ||
| "description": "The `bom-ref` of an object, such as a component, service, organisational entity, or person that supplied the cited information." | ||
| }, | ||
| "pointers": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string", | ||
| "title": "Field Reference", | ||
| "description": "A [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) identifying the BOM field to which the attribution applies. Users of other serialisation formats (e.g. XML) shall use the JSON Pointer format to ensure consistent field referencing across representations." | ||
| "description": "A [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) identifying the BOM field to which the attribution applies.\nUsers of other serialisation formats (e.g. XML) shall use the JSON Pointer format to ensure consistent field referencing across representations." | ||
| }, | ||
| "minItems": 1, | ||
| "title": "Field References", | ||
| "description": "One or more [JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901) identifying the BOM fields to which the attribution applies." | ||
| "description": "One or more [JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901) identifying the BOM fields to which the attribution applies.\nExactly one of the \"pointers\" or \"expressions\" elements must be present." | ||
| }, | ||
| "expressions": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string", | ||
| "title": "Path Expression", | ||
| "description": "Specifies a path expression used to locate a value within a BOM. The expression syntax shall conform to the format of the BOM's serialisation. Use [JSONPath](https://datatracker.ietf.org/doc/html/rfc9535) for JSON, [XPath](https://www.w3.org/TR/xpath/) for XML, and default to JSONPath for Protocol Buffers unless otherwise specified. Implementers shall ensure the expression is valid within the context of the applicable serialisation format." | ||
| "description": "Specifies a path expression used to locate a value within a BOM. The expression syntax shall conform to the format of the BOM's serialisation.\nUse [JSONPath](https://datatracker.ietf.org/doc/html/rfc9535) for JSON, [XPath](https://www.w3.org/TR/xpath/) for XML, and default to JSONPath for Protocol Buffers unless otherwise specified.\nImplementers shall ensure the expression is valid within the context of the applicable serialisation format." | ||
| }, | ||
| "minItems": 1, | ||
| "title": "Path Expressions", | ||
| "description": "One or more path expressions used to locate values within a BOM." | ||
| "description": "One or more path expressions used to locate values within a BOM.\nExactly one of the \"pointers\" or \"expressions\" elements must be present." | ||
| }, | ||
| "timestamp": { | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "title": "Timestamp", | ||
| "description": "The date and time when the attribution was made or the information was supplied." | ||
| }, | ||
| "attributedTo": { | ||
| "$ref": "#/definitions/refLinkType", | ||
| "title": "Attributed To", | ||
| "description": "The `bom-ref` of an object, such as a component, service, tool, organisational entity, or person that supplied the cited information.\nAt least one of the \"attributedTo\" or \"process\" elements must be present." | ||
|
Member
Author
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. added "tool" as possible target |
||
| }, | ||
| "process": { | ||
| "$ref": "#/definitions/refLinkType", | ||
| "title": "Process Reference", | ||
| "description": "An optional `bom-ref` to a process (such as a formula, workflow, task, or step) defined in the `formulation` section that executed or generated the attributed data." | ||
| "description": "The `bom-ref` to a process (such as a formula, workflow, task, or step) defined in the `formulation` section that executed or generated the attributed data.\nAt least one of the \"attributedTo\" or \"process\" elements must be present." | ||
| }, | ||
| "note": { | ||
| "type": "string", | ||
|
|
||
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
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
48 changes: 48 additions & 0 deletions
48
tools/src/test/resources/1.7/invalid-citations-1.7.textproto
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,48 @@ | ||
| # proto-file: schema/bom-1.7.proto | ||
| # proto-message: Bom | ||
|
|
||
| spec_version: "1.7" | ||
| serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" | ||
| version: 1 | ||
|
|
||
| metadata { | ||
| timestamp { | ||
| seconds: 1754424907 | ||
| nanos: 0 | ||
| } | ||
| } | ||
|
|
||
| components { | ||
| type: CLASSIFICATION_LIBRARY | ||
| bom_ref: "component-1" | ||
| name: "example-lib" | ||
| version: "1.2.3" | ||
| licenses { | ||
| license { | ||
| id: "Apache-2.0" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| ## !! NO formal check possible | ||
| #citations { | ||
| # bom_ref: "citation-1" | ||
| # pointers: { pointer: "/components/0/name" } | ||
| # timestamp { | ||
| # seconds: 1746108000 | ||
| # nanos: 0 | ||
| # } | ||
| # note: "Should have at least one of the following property sets: property 'attributedTo' or property 'process'" | ||
| #} | ||
|
|
||
|
|
||
| citations { | ||
| bom_ref: "citation-1" | ||
| pointers: { pointer: "/components/0/name" } | ||
| expressions: { expression: "$..[?(bom_ref=='component-1')].version" } | ||
| timestamp { | ||
| seconds: 1746108000 | ||
| nanos: 0 | ||
| } | ||
| note: "Should not have both a pointer and expression." | ||
| } |
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
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
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
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
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.
moved "attributedTo" so that both target descriptors () are next to each other.