-
Notifications
You must be signed in to change notification settings - Fork 22
114 lines (92 loc) · 2.82 KB
/
Copy pathsecurity.yml
File metadata and controls
114 lines (92 loc) · 2.82 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Security Scan
on:
push:
branches: [ main, develop, Zypheron-CLI ]
pull_request:
branches: [ main, develop, Zypheron-CLI ]
schedule:
# Run security scan weekly on Monday at 00:00 UTC
- cron: '0 0 * * 1'
jobs:
secrets-scan:
name: Secrets Scan (Gitleaks)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
gosec:
name: Go Security Scan (Gosec)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: '-fmt sarif -out gosec-results.sarif ./zypheron-go/...'
- name: Upload Gosec results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: gosec-results.sarif
bandit:
name: Python Security Scan (Bandit)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Bandit
run: pip install bandit[toml]
- name: Run Bandit on zypheron-ai
run: |
cd zypheron-ai
bandit -r . -f json -o bandit-results.json --exclude ./venv,./mcp-venv || true
- name: Run Bandit on zypheron-api
run: |
cd zypheron-api
bandit -r app/ -f json -o bandit-results.json || true
- name: Display Bandit results
if: always()
run: |
cd zypheron-ai
bandit -r . -f screen --exclude ./venv,./mcp-venv || true
cd ../zypheron-api
bandit -r app/ -f screen || true
dependency-check:
name: Dependency Security Audit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Check Python dependencies for vulnerabilities
run: |
cd zypheron-ai
pip install safety
safety check --json --file requirements.txt || true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Check Go dependencies for vulnerabilities
run: |
cd zypheron-go
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./... || true