-
Notifications
You must be signed in to change notification settings - Fork 10
56 lines (50 loc) · 1.77 KB
/
Copy pathsecurity.yml
File metadata and controls
56 lines (50 loc) · 1.77 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: 🛡️ Security Audit
on:
push:
branches: [ master, main, develop, dependency-update-and-quality-control ]
pull_request:
branches: [ master, main ]
jobs:
security-audit:
name: 🔍 Security Vulnerabilities Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies for all modules
run: |
echo "📦 Installing dependencies for security audit..."
for module in core main engine timer; do
if [ -f "packages/$module/package.json" ]; then
echo "Installing $module dependencies..."
cd packages/$module
npm ci
cd ../..
fi
done
- name: Critical security vulnerabilities audit
run: |
echo "🚨 Running critical security audit - BLOCKING on critical vulnerabilities..."
EXIT_CODE=0
for module in core main engine timer; do
if [ -f "packages/$module/package.json" ]; then
echo "🔍 Auditing $module for critical vulnerabilities..."
cd packages/$module
if ! npm audit --audit-level=critical; then
echo "❌ CRITICAL vulnerabilities found in $module - BLOCKING CI"
EXIT_CODE=1
else
echo "✅ No critical vulnerabilities in $module"
fi
cd ../..
fi
done
if [ $EXIT_CODE -ne 0 ]; then
echo "💥 PIPELINE BLOCKED: Critical vulnerabilities detected"
exit 1
fi
echo "✅ Security audit passed - no critical vulnerabilities"