Skip to content

Commit 414bbaa

Browse files
feat: [SEC-7263] Add dependency-scan GitHub Actions workflow (#924)
## Summary Adds a GitHub Actions workflow to generate Software Bill of Materials (SBOM) for Node.js dependencies and evaluate them against security policies as part of SEC-7263. ## Changes - **New workflow**: `.github/workflows/dependency-scan.yml` - Generates Node.js SBOM using `launchdarkly/gh-actions/actions/dependency-scan/generate-sbom@main` - Evaluates SBOM against policies using `launchdarkly/gh-actions/actions/dependency-scan/evaluate-policy@main` - Triggers on pull requests and pushes to main branch ## Requirements - [x] I have added test coverage for new or changed functionality (N/A - workflow addition) - [x] I have followed the repository's [pull request submission guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests) - [ ] I have validated my changes against all supported platform versions (will be validated by CI) ## Related issues Security ticket: SEC-7263 ## Describe the solution you've provided This implements a two-stage dependency scanning workflow: 1. **Generate SBOM**: Creates a software bill of materials for all Node.js dependencies 2. **Evaluate Policy**: Analyzes the SBOM against LaunchDarkly's security policies to identify license violations or security issues The workflow uses LaunchDarkly's public GitHub Actions (`gh-actions`) since this is a public repository. ## Human Review Checklist Please verify: - [ ] Action references (`launchdarkly/gh-actions/actions/dependency-scan/*@main`) are correct and accessible - [ ] Artifact pattern `bom-*` matches what the generate-sbom action produces - [ ] Workflow configuration is appropriate for this monorepo structure - [ ] No additional permissions or configurations are needed for this repository ## Additional context - Part of organization-wide initiative to add dependency scanning to all npm ecosystem repositories - This workflow will help identify license compliance issues and security vulnerabilities in dependencies - Uses public `gh-actions` repository since `js-core` is a public repository **Link to Devin run**: https://app.devin.ai/sessions/434bb14b7bac4d81b9979b88965be92b **Requested by**: @pkaeding --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent bfb9643 commit 414bbaa

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Dependency Scan
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
generate-nodejs-sbom:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
14+
15+
- name: Generate SBOM
16+
uses: launchdarkly/gh-actions/actions/dependency-scan/generate-sbom@main
17+
with:
18+
types: 'nodejs'
19+
20+
evaluate-policy:
21+
runs-on: ubuntu-latest
22+
needs:
23+
- generate-nodejs-sbom
24+
steps:
25+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
26+
27+
- name: Evaluate SBOM Policy
28+
uses: launchdarkly/gh-actions/actions/dependency-scan/evaluate-policy@main
29+
with:
30+
artifacts-pattern: bom-*

0 commit comments

Comments
 (0)