Skip to content

Conversation

@ekovalets
Copy link

Description

Summary of Changes

This PR adds a new GitHub Actions workflow that will be triggered on packages change.
The trigger will generate a new SBOM.json file and if it differs from the project on will create PR.

Notes for Reviewers

Please review if this is going to work for how you handle project branches.

What is the motivation for this change?

SSDLC Improvement Goals

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson changed the title ci(NODE-7025)!: New SBOM generation workflow on dependencies change ci(NODE-7025): New SBOM generation workflow on dependencies change Dec 11, 2025
@@ -0,0 +1,19 @@
name: Setup PHP SBOM
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like it was a copy-paste from the PHP implementation?

name: Setup Node SBOM
description: Sets up environment for generating SBOM in Node.js projects
inputs:
working-directory:
Copy link
Contributor

Choose a reason for hiding this comment

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

This action shouldn't be necessary because:


permissions:
contents: write
pull-requests: write
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pull-requests: write

I think we can remove this permission now that we're committing to main, right?


concurrency:
group: sbom-${{ github.ref }}
cancel-in-progress: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cancel-in-progress: false
cancel-in-progress: true

I definitely think we want cancel-in-progress: true (or limit concurrency to 1 execution at a time). Otherwise, it would be last action to finish wins, right?

Comment on lines +39 to +42
- name: Load version and package info
uses: mongodb-labs/drivers-github-tools/node/get_version_info@v3
with:
npm_package_name: mongodb
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- name: Load version and package info
uses: mongodb-labs/drivers-github-tools/node/get_version_info@v3
with:
npm_package_name: mongodb

This shouldn't be necessary

- name: Generate/Update package-lock.json
run: |
echo "Resolving dependencies and generating package-lock.json..."
npm install --package-lock-only
Copy link
Contributor

Choose a reason for hiding this comment

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

We've already run npm install above in mongodb-labs/drivers-github-tools/node/setup@v3. Is it necessary to only install from package-lock? If so, we might want to remove the call to the above action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants