-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
[DRAFT] extraneous components and version range constraints #326
Closed
jkowalleck
wants to merge
5
commits into
CycloneDX:1.6-dev
from
jkowalleck:1.6-extraneous-components-draft1
Closed
Changes from all commits
Commits
Show all changes
5 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 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 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
16 changes: 16 additions & 0 deletions
16
...rc/test/resources/1.6/informal-invalid-component-versionRange-non-extraneous-explicit.xml
This file contains 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,16 @@ | ||
<?xml version="1.0"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.6" | ||
serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" | ||
> | ||
<!-- | ||
this would be formal, if the support for XSD1.1's `assert` was properly implemented | ||
in validators and tools digesting XML. | ||
--> | ||
<components> | ||
<component type="library" isExtraneous="false"> | ||
<name>InvalidVersions</name> | ||
<versionRange><![CDATA[>=9.0.0|<10.0.0]]></versionRange> | ||
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. I just took the version-part of VERS. |
||
<description>versionRange may only exist on extraneous components, set `isExtraneous` explicit</description> | ||
</component> | ||
</components> | ||
</bom> |
17 changes: 17 additions & 0 deletions
17
...rc/test/resources/1.6/informal-invalid-component-versionRange-non-extraneous-implicit.xml
This file contains 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,17 @@ | ||
<?xml version="1.0"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.6" | ||
serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" | ||
> | ||
<!-- | ||
this would be formal, if the support for XSD1.1's `assert` was properly implemented | ||
in validators and tools digesting XML. | ||
--> | ||
<components> | ||
<component type="library"> | ||
<!-- @isExtraneous defaults to `false` --> | ||
<name>InvalidVersions</name> | ||
<versionRange><![CDATA[>=9.0.0|<10.0.0]]></versionRange> | ||
<description>versionRange may only exist on extraneous components, set `isExtraneous` implicit by default value</description> | ||
</component> | ||
</components> | ||
</bom> |
15 changes: 15 additions & 0 deletions
15
tools/src/test/resources/1.6/invalid-component-version-and-range.json
This file contains 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,15 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "library", | ||
"name": "InvalidVersions", | ||
"description": "may have `version` or `versionRange`, not both. This one does - it is invalid", | ||
"version": "9.0.14", | ||
"versionRange": ">=9.0.0|<10.0.0" | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
tools/src/test/resources/1.6/invalid-component-version-and-range.xml
This file contains 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,13 @@ | ||
<?xml version="1.0"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.6" | ||
serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" | ||
> | ||
<components> | ||
<component type="library" isExtraneous="false"> | ||
<name>InvalidVersions</name> | ||
<version>9.0.14</version> | ||
<versionRange><![CDATA[>=9.0.0|<10.0.0]]></versionRange> | ||
<description>may have `version` or `versionRange`, not both. This one does - it is invalid</description> | ||
</component> | ||
</components> | ||
</bom> |
15 changes: 15 additions & 0 deletions
15
tools/src/test/resources/1.6/invalid-component-versionRange-non-extraneous-explicit.json
This file contains 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,15 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "library", | ||
"name": "InvalidVersions", | ||
"description": "versionRange may only exist on extraneous components, set `isExtraneous` explicit", | ||
"isExtraneous": false, | ||
"versionRange": ">=9.0.0|<10.0.0" | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
tools/src/test/resources/1.6/invalid-component-versionRange-non-extraneous-implicit.json
This file contains 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,14 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "library", | ||
"name": "InvalidVersions", | ||
"description": "versionRange may only exist on extraneous components, set `isExtraneous` implicit by default value", | ||
"versionRange": ">=9.0.0|<10.0.0" | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
tools/src/test/resources/1.6/valid-component-extraneous-no-version-information.json
This file contains 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,14 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "library", | ||
"name": "Foo", | ||
"description": "extraneous without any version constraints", | ||
"isExtraneous": true | ||
} | ||
] | ||
} |
11 changes: 11 additions & 0 deletions
11
tools/src/test/resources/1.6/valid-component-extraneous-no-version-information.xml
This file contains 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,11 @@ | ||
<?xml version="1.0"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.6" | ||
serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" | ||
> | ||
<components> | ||
<component type="library" isExtraneous="true"> | ||
<name>Foo</name> | ||
<description>extraneous without any version constraints</description> | ||
</component> | ||
</components> | ||
</bom> |
15 changes: 15 additions & 0 deletions
15
tools/src/test/resources/1.6/valid-component-extraneous-with-version.json
This file contains 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,15 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "library", | ||
"name": "Foo", | ||
"description": "extraneous with version constraint", | ||
"isExtraneous": true, | ||
"version": "9.1.24" | ||
} | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
tools/src/test/resources/1.6/valid-component-extraneous-with-version.xml
This file contains 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,12 @@ | ||
<?xml version="1.0"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.6" | ||
serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" | ||
> | ||
<components> | ||
<component type="library" isExtraneous="true"> | ||
<name>Foo</name> | ||
<version>9.1.24</version> | ||
<description>extraneous with version constraint</description> | ||
</component> | ||
</components> | ||
</bom> |
15 changes: 15 additions & 0 deletions
15
tools/src/test/resources/1.6/valid-component-extraneous-with-versionRange.json
This file contains 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,15 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "library", | ||
"name": "Foo", | ||
"description": "extraneous with version range constraints", | ||
"isExtraneous": true, | ||
"versionRange": ">=9.0.0|<10.0.0" | ||
} | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
tools/src/test/resources/1.6/valid-component-extraneous-with-versionRange.xml
This file contains 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,12 @@ | ||
<?xml version="1.0"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.6" | ||
serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" | ||
> | ||
<components> | ||
<component type="library" isExtraneous="true"> | ||
<name>Foo</name> | ||
<versionRange><![CDATA[>=9.0.0|<10.0.0]]></versionRange> | ||
<description>extraneous with version range constraints</description> | ||
</component> | ||
</components> | ||
</bom> |
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.
If the environment provides a component, then it is best to capture it under formulation instead of having such boolean flags.
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.
why should it be under "formulation"?
form,ulation is build-time, while this domain here may also be runtime.
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.
Wouldn't such runtime-only components not captured in an OBOM?
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.
how would you make it clear in an obom, that the build result descibed in an SBOM needs windows 11 patch 23H2 on runtime? Or that it requires python 3.11 or later as an interpreter?
I dont know ... this is why this PR exists, to discuss these options and maube provide a solution :-)
read more here in the sectiopn "usecases" of #321
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.
Thank you. I should've read the use cases first, which helped. I would have used two separate documents and linked them via external references. However, I see the appeal of having a single combined document for both SBOM and its operating environment. Perhaps component.type = "platform" indicates runtime without the need for the additional boolean flag?