Skip to content

Commit 2baddc7

Browse files
natansilclaude
andauthored
Add dependency vulnerability scanning and fix axios CVEs (#180)
- Add Security Audit workflow running npm audit on PRs, pushes, and weekly schedule; gates on high/critical vulns in production deps - Add Dependabot config for npm and github-actions ecosystems - Bump axios/socket.io-client/uuid to patched versions to clear the CVEs surfaced by the Wiz scan Co-authored-by: Claude <noreply@anthropic.com>
1 parent fa66d47 commit 2baddc7

4 files changed

Lines changed: 337 additions & 176 deletions

File tree

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
updates:
3+
# Keep package.json dependencies patched. Combined with GitHub's
4+
# Dependabot security updates (enabled in repo Settings > Security),
5+
# this opens PRs for both routine version bumps and CVE fixes.
6+
- package-ecosystem: "npm"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"
10+
open-pull-requests-limit: 10
11+
groups:
12+
# Batch low-risk dev tooling updates into a single PR to cut noise.
13+
dev-dependencies:
14+
dependency-type: "development"
15+
update-types:
16+
- "minor"
17+
- "patch"
18+
19+
# Keep the GitHub Actions used by these workflows up to date.
20+
- package-ecosystem: "github-actions"
21+
directory: "/"
22+
schedule:
23+
interval: "weekly"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Security Audit
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
# Run on a weekly schedule so newly-disclosed CVEs in existing
9+
# dependencies are surfaced even when there are no code changes.
10+
schedule:
11+
- cron: "0 6 * * 1"
12+
workflow_dispatch:
13+
14+
jobs:
15+
audit:
16+
name: npm audit (dependencies)
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Use Node.js 20.x
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: "20.x"
27+
cache: "npm"
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
# Gating check: fail the build on high/critical vulnerabilities in
33+
# the production dependencies declared in package.json. These are the
34+
# ones that ship to consumers of the SDK (and show up in their Wiz
35+
# scans), so they get the strictest treatment.
36+
- name: Audit production dependencies
37+
run: npm audit --omit=dev --audit-level=high
38+
39+
# Informational: report the full picture (including dev/transitive
40+
# dependencies) without failing the build.
41+
- name: Audit all dependencies (report only)
42+
if: always()
43+
run: npm audit
44+
continue-on-error: true

0 commit comments

Comments
 (0)