Skip to content

Commit ae39134

Browse files
ci: Add dependency-scan GitHub Actions workflow (#54)
## Summary Adds dependency-scan GitHub Actions workflow to generate Software Bill of Materials (SBOM) and evaluate license policies for Node.js dependencies as part of security initiative SEC-7263. ## Changes - **New workflow file**: `.github/workflows/dependency-scan.yml` - **Two jobs**: 1. `generate-nodejs-sbom` - Generates SBOM for Node.js dependencies 2. `evaluate-policy` - Evaluates SBOM against LaunchDarkly license policies - **Triggers**: Pull requests and pushes to main branch - **Uses pinned SHA** for `actions/checkout@v4` following security best practices ## Requirements - [ ] I have added test coverage for new or changed functionality *(N/A - workflow file)* - [ ] 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 Part of security initiative SEC-7263 for adding dependency scanning across LaunchDarkly npm ecosystem repositories. ## Human Review Checklist **Critical items to verify:** - [ ] Workflow syntax is correct and jobs have proper dependencies - [ ] Artifact pattern `bom-*` in `evaluate-policy` job matches what `generate-sbom` produces - [ ] Uses correct `launchdarkly/gh-actions` repository (public actions for public repo) - [ ] Pinned SHA `08eba0b27e820071cde6df949e0beb9ba4906955` is correct for `actions/checkout@v4` - [ ] Workflow follows LaunchDarkly security standards **Expected behavior:** - Workflow should run on PRs and main branch pushes - First job generates SBOM file for Node.js dependencies - Second job evaluates SBOM against license policies - May detect legitimate license policy violations (expected behavior) ## Additional context - This is part of systematic rollout across LaunchDarkly npm ecosystem repositories - Similar workflows already successfully deployed to other repositories in the organization - The workflow may detect license policy violations - this is expected behavior, not a failure --- 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 d6f0227 commit ae39134

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

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)