File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 branches : [main]
77 workflow_dispatch :
88
9+ permissions :
10+ contents : read
11+
912jobs :
10- security :
11- uses : UABGH-Emerging-Technologies/ai_web_interface/.github/workflows/security-scan-reusable.yml@main
12- with :
13- package-manager : " uv"
14- scan-path : " ."
15- python-version : " 3.11"
13+ dependency-audit :
14+ name : Dependency Audit
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - uses : astral-sh/setup-uv@v5
20+
21+ # TODO: remove continue-on-error once existing vulnerabilities are triaged
22+ - name : uv audit
23+ continue-on-error : true
24+ run : uv audit --preview
25+
26+ sast :
27+ name : Static Analysis (Bandit)
28+ runs-on : ubuntu-latest
29+ steps :
30+ - uses : actions/checkout@v4
31+
32+ - uses : actions/setup-python@v5
33+ with :
34+ python-version : " 3.11"
35+
36+ - name : Install Bandit
37+ run : pip install bandit
38+
39+ # TODO: remove continue-on-error once existing findings are triaged
40+ - name : Run Bandit
41+ continue-on-error : true
42+ run : >
43+ bandit -r .
44+ --severity-level medium
45+ --confidence-level medium
46+
47+ container-scan :
48+ name : Container Scan (Trivy)
49+ runs-on : ubuntu-latest
50+ steps :
51+ - uses : actions/checkout@v4
52+
53+ - name : Build image for scanning
54+ run : >
55+ docker build
56+ -t scan-target:${{ github.sha }}
57+ -f Dockerfile
58+ .
59+
60+ # TODO: remove exit-code 0 to make this a hard gate once base image CVEs are triaged
61+ - name : Run Trivy
62+ uses : aquasecurity/trivy-action@v0.36.0
63+ with :
64+ image-ref : scan-target:${{ github.sha }}
65+ format : table
66+ exit-code : " 0"
67+ severity : CRITICAL,HIGH
You can’t perform that action at this time.
0 commit comments