-
Notifications
You must be signed in to change notification settings - Fork 127
69 lines (54 loc) · 1.75 KB
/
Copy pathsecurity-ci.yml
File metadata and controls
69 lines (54 loc) · 1.75 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
# Issue #388 — Security regression checks.
#
# Runs on every PR and push to main. Two jobs:
# - regression: the ciphertext-only guard and the private-key/session-state
# field scan (apps/backend/src/__tests__/security.regression.test.ts).
# - dependency-audit: `pnpm audit` scoped to the crypto-relevant backend
# dependencies (ioredis, jsonwebtoken, web-push, @stellar/stellar-sdk,
# drizzle-orm, socket.io), surfacing CVEs without failing on advisories
# in unrelated transitive deps.
name: Security CI
on:
push:
branches: [main]
pull_request:
jobs:
regression:
name: Ciphertext-only guard + secret-field scan
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/backend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: .
- name: Run security regression tests
run: pnpm test -- security.regression.test.ts
env:
JWT_SECRET: ci-test-secret
REDIS_URL: redis://localhost:6379
dependency-audit:
name: Crypto dependency CVE audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Audit crypto-relevant dependencies
run: node scripts/audit-crypto-deps.mjs