-
Notifications
You must be signed in to change notification settings - Fork 315
83 lines (79 loc) · 2.26 KB
/
security-scan.yaml
File metadata and controls
83 lines (79 loc) · 2.26 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
name: Security Scan
on:
push:
branches: [main, dev]
paths:
- 'src/server/api/go/go.mod'
- 'src/server/core/pyproject.toml'
- 'src/client/acontext-py/pyproject.toml'
- 'src/client/acontext-ts/package.json'
- 'src/server/ui/package.json'
- '.github/workflows/security-scan.yaml'
pull_request:
branches: [main, dev]
paths:
- 'src/server/api/go/go.mod'
- 'src/server/core/pyproject.toml'
- 'src/client/acontext-py/pyproject.toml'
- 'src/client/acontext-ts/package.json'
- 'src/server/ui/package.json'
- '.github/workflows/security-scan.yaml'
workflow_dispatch:
jobs:
go-vulncheck:
name: Go Vulnerability Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: src/server/api/go/go.mod
cache: true
- name: Run govulncheck
working-directory: src/server/api/go
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@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Setup Python
uses: actions/setup-python@v5
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
cd $dir
uv export --format requirements-txt > 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@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Audit TS SDK
working-directory: src/client/acontext-ts
run: npm audit --audit-level=high
- name: Audit UI
working-directory: src/server/ui
run: |
npm install -g pnpm
pnpm audit --audit-level=high