-
Notifications
You must be signed in to change notification settings - Fork 100
86 lines (69 loc) · 1.78 KB
/
backend-checks.yml
File metadata and controls
86 lines (69 loc) · 1.78 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Backend Checks
permissions:
contents: read
security-events: write
on:
pull_request:
branches: ['master', 'develop']
paths:
- 'Servers/**'
push:
branches: ['master', 'develop']
paths:
- 'Servers/**'
jobs:
security-audit:
name: Security Audit
runs-on: ubuntu-latest
defaults:
run:
working-directory: Servers
steps:
- uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run npm audit
run: npm audit --audit-level=high
continue-on-error: true
- name: Run npm audit (JSON output for review)
run: npm audit --json > ../audit-results.json || true
- name: Upload audit results
uses: actions/upload-artifact@v6
with:
name: backend-npm-audit-results
path: audit-results.json
retention-days: 30
lint-and-build:
name: Lint and Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: Servers
steps:
- uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: TypeScript type check
run: npm run build
- name: Run tests
run: npm test
dependency-review:
name: Dependency Review
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v6
- name: Dependency Review
uses: actions/dependency-review-action@v4
continue-on-error: true
with:
fail-on-severity: high
deny-licenses: GPL-3.0, AGPL-3.0