Skip to content
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

Conversation

jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented Oct 22, 2023

Sketch/proposal for #321

implementing with components, because the objects referenced/required are actually used at runtime and therefore are considered a "component".

  • sketch JSON schema
    • properties and assert
    • test cases
  • sketch XML schema
    • properties. assert would require XSD1.1 which is not broadly implemented, yet.
    • test cases
  • sketch ProtoBuff schema
    SKIPPED THIS FOR NOW as I do not have a lot of practice with PB schema
    Please help :-)

@jkowalleck jkowalleck changed the title draft: extraneous compoennts and version range constraints [DRAFT] extraneous components and version range constraints Oct 22, 2023
@jkowalleck jkowalleck force-pushed the 1.6-extraneous-components-draft1 branch from 1f02490 to 68f3340 Compare October 22, 2023 15:42
@jkowalleck jkowalleck added this to the 1.6 milestone Nov 19, 2023
@jkowalleck jkowalleck marked this pull request as ready for review December 19, 2023 12:38
@jkowalleck jkowalleck requested a review from a team as a code owner December 19, 2023 12:38
@jkowalleck jkowalleck force-pushed the 1.6-extraneous-components-draft1 branch from 8c24415 to 04251bf Compare December 19, 2023 12:38
@stevespringett
Copy link
Member

Thank you for putting this together. Few questions.

How is extraneous different from a scope with a value of excluded?

The versionRange is interesting. I like it, but it will not work in all situations. For example, if a extraneous component is Windows and the range is 2000, XP, Vista, 7, 8, 10, and 11. I think we'll need another way to specify possible versions.

@jkowalleck
Copy link
Member Author

jkowalleck commented Dec 27, 2023

How is extraneous different from a scope with a value of excluded?

a component could be optional AND extraneous at the same time. current scope does not allow this.
See section "possible solution" in #321

I guess my confusion is caused by the fact that the scope has no proper documentation - which would be fixed by #293

The versionRange is interesting. I like it, but it will not work in all situations. For example, if a extraneous component is Windows and the range is 2000, XP, Vista, 7, 8, 10, and 11. I think we'll need another way to specify possible versions.

Actually, Windows XP/Vista/etc... they all have version numbers and buildID. VERS supports complete SemVer spec -- and therefore knows the format <versionNumber>+<buildID>.
For windows: https://en.wikipedia.org/wiki/Comparison_of_Microsoft_Windows_versions.
For example WindowsXP is 5.1+2600, while windows 11 with update 2023 would be 10.0+22631

I could add examples for popular operating systems and runtime-engines to bom:versionRangeType, if you want.

@jkowalleck jkowalleck linked an issue Dec 27, 2023 that may be closed by this pull request
@stevespringett
Copy link
Member

I could add examples for popular operating systems and runtime-engines to bom:versionRangeType, if you want.

I don't think that's necessary. I'm just wondering how many people would understand that marketing names have actual version numbers.

Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
@jkowalleck jkowalleck force-pushed the 1.6-extraneous-components-draft1 branch from 04251bf to 9b1c166 Compare January 16, 2024 11:58
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
@@ -913,6 +919,12 @@
"description": "Specifies the scope of the component. If scope is not specified, 'required' scope SHOULD be assumed by the consumer of the BOM.",
"default": "required"
},
"isExtraneous": {
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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?

@jkowalleck jkowalleck removed this from the 1.6 milestone Jan 29, 2024
@jkowalleck
Copy link
Member Author

Dropped this issue/request from the 1.6 milestone goals, and moved it to 1.7 for the following reasons: did not finish in time for 1.6, needs further discussion.

need to migrate this PR after 1.6 was finished/published/merged ...

@jkowalleck jkowalleck marked this pull request as draft January 29, 2024 22:54
@jkowalleck jkowalleck added this to the 1.7 milestone Jan 29, 2024
@stevespringett stevespringett deleted the branch CycloneDX:1.6-dev April 9, 2024 05:13
<components>
<component type="library" isExtraneous="false">
<name>InvalidVersions</name>
<versionRange><![CDATA[>=9.0.0|<10.0.0]]></versionRange>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just took the version-part of VERS.
maybe this was wrong, need to read the specs of verts again ...

@jkowalleck
Copy link
Member Author

superseded by #586

@CycloneDX CycloneDX locked as resolved and limited conversation to collaborators Feb 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: documenting external/extraneous dependencies
3 participants