fix: correctly handle object licenses in SBOM generation#6969
Merged
wraithgar merged 2 commits intonpm:latestfrom Nov 6, 2023
Merged
fix: correctly handle object licenses in SBOM generation#6969wraithgar merged 2 commits intonpm:latestfrom
wraithgar merged 2 commits intonpm:latestfrom
Conversation
As a step towards resolving npm#6966, we should document how SPDX SBOM generation works with a single string license or license expression.
2 tasks
wraithgar
reviewed
Nov 6, 2023
bd12035 to
e2134d5
Compare
Contributor
Author
|
Should be able to re-run now 🤞 |
As a means to resolve npm#6966, we can tweak the way we handle licenses, where receiving a license object, instead of license string, results in a malformed SPDX JSON SBOM. While working on this, it was noted that CycloneDX also needed to be amended, as it was omitting any license objects. Closes npm#6966.
e2134d5 to
0d1d79f
Compare
Contributor
Author
|
Sorry, that'll teach me not running the build locally 😞 |
bdehamer
approved these changes
Nov 6, 2023
Contributor
bdehamer
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the fix.
Contributor
Author
|
Very welcome, thanks for the support as it stands 👏🏽 |
Member
|
@jamietanna if you want this backported to npm@9 you can cherry-pick the commit into a new PR made against the v9 branch |
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As a means to resolve #6966, we can tweak the way we handle licenses,
where receiving a license object, instead of license string, results in
a malformed SPDX JSON SBOM.
While working on this, it was noted that CycloneDX also needed to be
amended, as it was omitting any license objects.
Closes #6966.
Also, document current license SPDX behaviour.
References
Closes #6966.