-
-
Notifications
You must be signed in to change notification settings - Fork 73
[1.7] Added citation support and test cases. #630
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
Merged
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
be626a9
Added citation support and test cases.
stevespringett 84f8e2e
Corrected tests
stevespringett ec18e41
corrected pointer repeating
stevespringett ddc4842
Added external ref for citation
stevespringett 7dba14f
docs: annotations
jkowalleck a3d7d01
Added explicit documentation in XSD and Proto that either attributedT…
stevespringett 58e5ad2
Merge branch '1.7-dev' into 1.7-dev-citations
jkowalleck abcc29d
added additional test cases, and adjusted the XSD to detect them
jkowalleck 4a24b07
revert XSD improvements
jkowalleck c486d31
docs
jkowalleck 0f225ad
docs
jkowalleck f315e00
Added expressions - JSONPath and XPath as an alternative to JSON Poin…
stevespringett bcdcaca
Merge branch '1.7-dev' into 1.7-dev-citations
jkowalleck 22f8b63
streamlined some docs
jkowalleck efbbbf4
wip
jkowalleck 2bf3edc
wip
jkowalleck fd1a034
tests
jkowalleck e9689a5
[1.7] citation: proposed changes 2 (#667)
jkowalleck 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
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 |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| { | ||
| "$schema": "http://cyclonedx.org/schema/bom-1.7.schema.json", | ||
| "bomFormat": "CycloneDX", | ||
| "specVersion": "1.7", | ||
| "serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
| "version": 1, | ||
| "metadata": { | ||
| "timestamp": "2025-05-01T14:23:00Z", | ||
| "authors": [ | ||
| { | ||
| "bom-ref": "person-1", | ||
| "name": "Alice Example", | ||
| "email": "[email protected]" | ||
| } | ||
| ] | ||
| }, | ||
| "components": [ | ||
| { | ||
| "type": "library", | ||
| "bom-ref": "component-1", | ||
| "name": "example-lib", | ||
| "version": "1.2.3", | ||
| "licenses": [ | ||
| { | ||
| "license": { | ||
| "id": "Apache-2.0" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "citations": [ | ||
| { | ||
| "bom-ref": "citation-1", | ||
| "pointers": [ "/components/0/name" ], | ||
| "timestamp": "2025-05-01T14:00:00Z", | ||
| "attributedTo": "person-1", | ||
| "note": "Manually entered by Alice Example" | ||
| }, | ||
| { | ||
| "bom-ref": "citation-2", | ||
| "pointers": [ "/components/0/licenses/0/license/id" ], | ||
| "timestamp": "2025-05-01T14:05:00Z", | ||
| "attributedTo": "scan-tool-1", | ||
| "process": "task-license-scan", | ||
| "note": "Auto-detected by license scanner tool" | ||
| } | ||
| ], | ||
| "formulation": [ | ||
| { | ||
| "components": [ | ||
| { | ||
| "bom-ref": "scan-tool-1", | ||
| "type": "application", | ||
| "name": "My Scan Tool" | ||
| } | ||
| ], | ||
| "bom-ref": "workflow-1", | ||
| "workflows": [ | ||
| { | ||
| "bom-ref": "workflow-1", | ||
| "uid": "259bae74-5ec4-4de8-9386-c91b1f7719b8", | ||
| "name": "My workflow", | ||
| "tasks": [ | ||
| { | ||
| "bom-ref": "task-license-scan", | ||
| "uid": "6d75f8d6-a008-41cf-8b65-c4129fc249f9", | ||
| "taskTypes": [ "scan" ], | ||
| "description": "License scan of the source files using OpenSourceScanner v2.1" | ||
| } | ||
| ], | ||
| "taskTypes": [ "scan" ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
75 changes: 75 additions & 0 deletions
75
tools/src/test/resources/1.7/valid-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,75 @@ | ||
| # proto-file: schema/bom-1.7.proto | ||
| # proto-message: Bom | ||
|
|
||
| spec_version: "1.7" | ||
| version: 1 | ||
| serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" | ||
|
|
||
| metadata { | ||
| timestamp { | ||
| seconds: 1746118980 | ||
| nanos: 0 | ||
| } | ||
| authors { | ||
| bom_ref: "person-1" | ||
| name: "Alice Example" | ||
| email: "[email protected]" | ||
| } | ||
| } | ||
|
|
||
| components { | ||
| bom_ref: "component-1" | ||
| type: CLASSIFICATION_LIBRARY | ||
| name: "example-lib" | ||
| version: "1.2.3" | ||
| licenses { | ||
| license { | ||
| id: "Apache-2.0" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| citations [ | ||
| { | ||
| bom_ref: "citation-1" | ||
| pointer: "/components/0/name" | ||
| timestamp: { | ||
| seconds: 1746108000 | ||
| nanos: 0 | ||
| } | ||
| attributed_to: "person-1" | ||
| note: "Manually entered by Alice Example" | ||
| }, | ||
| { | ||
| bom_ref: "citation-2" | ||
| pointer: "/components/0/licenses/0/license/id" | ||
| timestamp: { | ||
| seconds: 1746108000 | ||
| nanos: 0 | ||
| } | ||
| attributed_to: "scan-tool-1" | ||
| process: "task-license-scan" | ||
| note: "Auto-detected by license scanner tool" | ||
| } | ||
| ] | ||
|
|
||
| formulation { | ||
| bom_ref: "workflow-1" | ||
| components { | ||
| bom_ref: "scan-tool-1" | ||
| type: CLASSIFICATION_APPLICATION | ||
| name: "My Scan Tool" | ||
| } | ||
| workflows { | ||
| bom_ref: "workflow-1" | ||
| uid: "259bae74-5ec4-4de8-9386-c91b1f7719b8" | ||
| name: "My workflow" | ||
| taskTypes: TASK_TYPE_SCAN | ||
| tasks { | ||
| bom_ref: "task-license-scan" | ||
| uid: "6d75f8d6-a008-41cf-8b65-c4129fc249f9" | ||
| taskTypes: TASK_TYPE_SCAN | ||
| description: "License scan of the source files using OpenSourceScanner v2.1" | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.