-
Notifications
You must be signed in to change notification settings - Fork 837
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
SBOM workflow using "npm sbom" #4521
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4521 +/- ##
==========================================
+ Coverage 92.83% 92.84% +0.01%
==========================================
Files 328 328
Lines 9486 9486
Branches 2035 2035
==========================================
+ Hits 8806 8807 +1
+ Misses 680 679 -1 |
Looking, for example at part of
Is it misleading that it references an opentelemetry@0.1.0 package? There actually is (perhaps by accident?) such a package published to npm: https://www.npmjs.com/package/opentelemetry?activeTab=versions Would setting Perhaps all of this is fine. I don't have any experience with real use cases for SBOM files. |
@martinkuba I guess you don't need final review until this is adjusted somehow to add this asset to the relevant GitHub Release? I searched a bit for a way to do that and while there is a github.com provided "actions/upload-release-asset", it is unmaintained: https://github.com/actions/upload-release-asset |
@trentm @pichlermarc Trent is correct that we would need an extra step in the workflow to add the artifact to a release. This brings up a question whether it should be attached to the API and experimental releases as well. And if yes, should we have different workflows for the core SDK, the API, and experimental packages? I think the answer is probably yes, and I can split this into three different workflows (or conditional steps). What do you think? |
I tried with |
I have made the following updates
|
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.
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.
Looks good, thanks 🙂
* add sbom workflow * generate sbom for each package * generate sbom API * add prefix to all files * conditionally add artifacts to releases --------- Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Which problem is this PR solving?
This replaces #4479
This workflow is using the
npm sbom
command to generate multiple SBOM files: one for each package and one for the whole repository (opentelemetry-js.spdx
). All files are combined in a single zip file. The workflow is triggered when a release is published.NOTE: The
npm sbom
command makes it possible to exclude dev dependencies (--omit dev
configuration). However, there seems to be a bug where sometimes dependencies are not captured (see npm/cli#7204 for more details). Once the npm issue is resolved, the--omit dev
configuration should be added to the commands in this workflow).An example output from this workflow is available here.