We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe3733a + 3a44a2d commit c757b0fCopy full SHA for c757b0f
1 file changed
.github/workflows/audit.yml
@@ -0,0 +1,31 @@
1
+name: Audit
2
+on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
8
9
+jobs:
10
+ npm_audit:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ # Checks-out your repository under $GITHUB_WORKSPACE
14
+ - uses: actions/checkout@v3
15
+ - uses: actions/setup-node@v3
16
+ with:
17
+ node-version: 20.x
18
+
19
+ - name: Install Monorepo Deps
20
+ run: npm ci
21
22
+ - name: Run npm audit
23
+ run: >
24
+ npm audit --json |
25
+ node -e '
26
+ const fs = require("fs");
27
+ const auditLevel = (process.argv[1] || "critical").toLowerCase();
28
+ const { vulnerabilities } = JSON.parse(fs.readFileSync(0).toString("utf-8"));
29
+ const result = Object.values(vulnerabilities).filter((i) => i.severity.toLowerCase() === auditLevel);
30
+ console.table(JSON.stringify(result, null, 2));
31
+ ' high
0 commit comments