File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Nightly Security Audit
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 2 * * *'
6+ workflow_dispatch : # Allow manual trigger
7+
8+ jobs :
9+ npm-audit :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v6
17+
18+ - name : Set up Node.js
19+ uses : actions/setup-node@v6
20+ with :
21+ node-version : 24
22+
23+ - name : Install dependencies
24+ run : npm ci
25+ - name : Run security audit
26+ shell : bash
27+ run : |
28+ echo '### npm audit (`--omit=dev`)' >> "$GITHUB_STEP_SUMMARY"
29+ echo "" >> "$GITHUB_STEP_SUMMARY"
30+ echo '```text' >> "$GITHUB_STEP_SUMMARY"
31+ set +e
32+ set -o pipefail
33+ npm audit --omit=dev --audit-level high 2>&1 | tee -a "$GITHUB_STEP_SUMMARY"
34+ exit_code=$?
35+ echo '```' >> "$GITHUB_STEP_SUMMARY"
36+ exit $exit_code
You can’t perform that action at this time.
0 commit comments