-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: correctly handle object licenses in SBOM generation #6969
Conversation
As a step towards resolving npm#6966, we should document how SPDX SBOM generation works with a single string license or license expression.
bd12035
to
e2134d5
Compare
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
Sorry, that'll teach me not running the build locally 😞 |
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.
LGTM. Thanks for the fix.
Very welcome, thanks for the support as it stands 👏🏽 |
@jamietanna if you want this backported to npm@9 you can cherry-pick the commit into a new PR made against the v9 branch |
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.