-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 1.65 KB
/
security.yml
File metadata and controls
68 lines (55 loc) · 1.65 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
name: Security Scan
on:
push:
branches: [ main ]
schedule:
# Run security scan weekly
- cron: '0 2 * * 0'
jobs:
# Job 1: Basic Security Scan
security-scan:
name: Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-ci.txt
pip install safety
- name: Run Safety check
run: |
safety check --json --output safety-report.json || echo "Safety check completed with issues"
continue-on-error: true
- name: Run Bandit security scan
run: |
bandit -r app/ src/ examples/ scripts/ -f json -o bandit-report.json || echo "Bandit scan completed with issues"
continue-on-error: true
- name: Upload Safety report
uses: actions/upload-artifact@v4
if: always()
with:
name: safety-report
path: safety-report.json
- name: Upload Bandit report
uses: actions/upload-artifact@v4
if: always()
with:
name: bandit-security-report
path: bandit-report.json
- name: Run Semgrep security scan
run: |
pip install semgrep
semgrep --config=auto --json --output=semgrep-report.json app/ src/ || echo "Semgrep scan completed with findings"
continue-on-error: true
- name: Upload Semgrep report
uses: actions/upload-artifact@v4
if: always()
with:
name: semgrep-report
path: semgrep-report.json