-
Notifications
You must be signed in to change notification settings - Fork 315
76 lines (72 loc) · 2.07 KB
/
security-reusable.yaml
File metadata and controls
76 lines (72 loc) · 2.07 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
name: Security Scan (Reusable)
on:
workflow_call:
jobs:
go-vulncheck:
name: Go Vulnerability Check
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: API
path: src/server/api/go
- name: CLI
path: src/client/acontext-cli
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: ${{ matrix.path }}/go.mod
cache: true
- name: Run govulncheck on ${{ matrix.name }}
working-directory: ${{ matrix.path }}
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
python-audit:
name: Python Security Audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install pip-audit
run: pip install pip-audit
- name: Audit Projects
run: |
for dir in src/server/core src/client/acontext-py; do
echo "🔍 Auditing $dir..."
cd $dir
uv export --format requirements-txt --no-hashes --no-dev > reqs.txt
pip-audit -r reqs.txt
rm reqs.txt
cd - > /dev/null
done
js-audit:
name: JS/TS Security Audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '20'
- name: Setup pnpm
run: npm install -g pnpm
- name: Audit TS SDK
working-directory: src/client/acontext-ts
run: npm audit --audit-level=high --omit=dev
- name: Audit UI
working-directory: src/server/ui
run: pnpm audit --audit-level=high --prod
- name: Audit Landing Page
working-directory: landingpage
run: pnpm audit --audit-level=high --prod