We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb4edb2 commit ccc5a6bCopy full SHA for ccc5a6b
1 file changed
.github/workflows/security.yml
@@ -29,8 +29,20 @@ jobs:
29
- name: Install dependencies
30
run: npm ci
31
32
- - name: NPM audit (moderate)
33
- run: npm audit --audit-level=moderate
+ - name: NPM audit (advisory on PRs)
+ if: github.event_name == 'pull_request'
34
+ run: |
35
+ set +e
36
+ npm audit --audit-level=moderate
37
+ code=$?
38
+ set -e
39
+ if [ "$code" -ne 0 ]; then
40
+ echo "::warning::npm audit reported vulnerabilities (advisory mode on PRs)."
41
+ fi
42
+
43
+ - name: NPM audit (enforced on push)
44
+ if: github.event_name == 'push'
45
+ run: npm audit --audit-level=critical
46
47
- name: Trufflehog git history scan
48
uses: trufflesecurity/trufflehog@main
0 commit comments