-
Notifications
You must be signed in to change notification settings - Fork 6
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
What should we use for SBOM version? #21
Comments
I'm trying to track the use case here. In CycloneDX, you would only increment the top-level version if you are modifying an existing SBOM. I would not increment the version on each new build. Instead I would assign a new serial number to the new BOM. Here is a relevant discussion and answer from the CycloneDX folks: CycloneDX/specification#363 (comment) SPDX doesn't have a version field because they solely track identity through an ID field. I believe you would generate a brand new ID for each revision. |
Good discussion. While that advice make sense when you're manually managing SBOMs, it's not really realistic when the CI/CD is building/managing SBOMs. Since each CI/CD run can in theory change components (e.g. dependencies/sub-dependencies get bumped as they're not fully pinned). This is why I would still consider each run a new version and
Yeah, I didn't manage to solve this for SPDX. The lack of version makes it a lot harder to track. I presume you have to resort back to using the date. |
I would consider each run to be a new BOM and so it would get a new |
I think I see what you mean. However, most tools that I've played with just use a random UUID as the Imagine we were to run our single CI/CD run in three different jobs that may trigger by different changes for the sake of argument. You'd then have:
If you were to rebuild the container SBOM, that should in turn trigger a rebuild of the top-level SBOM. At this point, we'd have to pull in the lastest SBOM from both the application and container (while only the container changed). In this case, the version/serial number would change for the top-level SBOM and the container SBOM, but not for the application SBOM. Now, if we have separated Or maybe I'm overlooking something in your argument. In SPDX however, this is an entirely different beast, and I'm yet to solve that. It appears that |
After today's meeting, I am reversing my comments. Thank you @idunbarh for clearing up this. Here's a recap:
|
I think this issue can be closed due to the discussion. @vpetersson let me know if you want this to remain open. |
I'm happy to keep this closed. |
In CycloneDX you have a version field that should be incremented for each version of the SBOM. This is set to
1
by most tools. SPDX does not have the equivalent of this as far as I can tell.Since this number needs to increment for each build, two approaches was discussed:
$GITHUB_RUN_NUMBER
for this, but this is GitHub specific (GitHub Variables). The drawback with this is that it is GitHub specific (all CI systems may not have an equivalent)..version
as the same as.metadata.component.version
and set it to a SemVer. This is usually fine, but might potentially create two SBOMs with the same version but different values (if you rebuild the same job).The text was updated successfully, but these errors were encountered: