-
Notifications
You must be signed in to change notification settings - Fork 32
40 lines (36 loc) · 916 Bytes
/
Copy pathsecurity-audit.yml
File metadata and controls
40 lines (36 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Security Audit
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
audit:
name: npm audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v5
with:
node-version: 22
cache: npm
- run: npm ci
- name: Runtime dependency audit (blocking high/critical)
run: npm audit --omit=dev --audit-level=high
- name: Full dependency audit (informational)
run: |
set +e
npm audit --json > npm-audit-full.json
true
- name: Upload full audit report
if: always()
uses: actions/upload-artifact@v4
with:
name: npm-audit-full
path: npm-audit-full.json
retention-days: 14