Skip to content

Commit 3b55498

Browse files
authored
Merge pull request #13 from cld2labs/docs/git-workflow
Add Git workflow
2 parents 4e62c43 + aac612b commit 3b55498

7 files changed

Lines changed: 3848 additions & 3734 deletions

File tree

.github/workflows/code-scans.yaml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: SDLE Scans
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
PR_number:
7+
description: 'Pull request number'
8+
required: true
9+
push:
10+
branches: [ main ]
11+
pull_request:
12+
types: [opened, synchronize, reopened, ready_for_review]
13+
14+
concurrency:
15+
group: sdle-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
20+
# -----------------------------
21+
# 1) Trivy Scan (fixed)
22+
# -----------------------------
23+
trivy_scan:
24+
name: Trivy Vulnerability Scan
25+
runs-on: ubuntu-latest
26+
env:
27+
TRIVY_REPORT_FORMAT: table
28+
TRIVY_SCAN_TYPE: fs
29+
TRIVY_SCAN_PATH: .
30+
TRIVY_EXIT_CODE: '1'
31+
TRIVY_VULN_TYPE: os,library
32+
TRIVY_SEVERITY: CRITICAL,HIGH
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Create report directory
37+
run: mkdir -p trivy-reports
38+
39+
- name: Run Trivy FS Scan
40+
uses: aquasecurity/trivy-action@0.24.0
41+
with:
42+
scan-type: 'fs'
43+
scan-ref: '.'
44+
scanners: 'vuln,misconfig,secret,license'
45+
ignore-unfixed: true
46+
format: 'table'
47+
exit-code: '1'
48+
output: 'trivy-reports/trivy_scan_report.txt'
49+
vuln-type: 'os,library'
50+
severity: 'CRITICAL,HIGH'
51+
52+
- name: Upload Trivy Report
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: trivy-report
56+
path: trivy-reports/trivy_scan_report.txt
57+
- name: Show Trivy Report in Logs
58+
if: failure()
59+
run: |
60+
echo "========= TRIVY FINDINGS ========="
61+
cat trivy-reports/trivy_scan_report.txt
62+
echo "================================="
63+
64+
# -----------------------------
65+
# 2) Bandit Scan
66+
# -----------------------------
67+
bandit_scan:
68+
name: Bandit security scan
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
with:
74+
submodules: 'recursive'
75+
fetch-depth: 0
76+
- uses: actions/setup-python@v5
77+
with:
78+
python-version: "3.x"
79+
- name: Install Bandit
80+
run: pip install bandit
81+
- name: Create Bandit configuration
82+
run: |
83+
cat > .bandit << 'EOF'
84+
[bandit]
85+
exclude_dirs = tests,test,venv,.venv,node_modules
86+
skips = B101
87+
EOF
88+
shell: bash
89+
- name: Run Bandit scan
90+
run: |
91+
bandit -r . -ll -iii -f screen
92+
bandit -r . -ll -iii -f html -o bandit-report.html
93+
- name: Upload Bandit Report
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: bandit-report
97+
path: bandit-report.html
98+
retention-days: 30

backend/requirements.txt

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# Core Web Framework
2-
fastapi==0.109.0
3-
uvicorn[standard]==0.27.0
4-
python-multipart==0.0.6
5-
6-
# LLM & AI APIs
7-
httpx==0.27.2
8-
requests==2.31.0
9-
openai>=1.0.0
10-
11-
# Document Processing
12-
pypdf==6.1.1
13-
python-docx==1.1.0
14-
pdf2image==1.16.3
15-
pytesseract==0.3.10
16-
Pillow==10.2.0
17-
18-
# Configuration Management
19-
python-dotenv==1.0.0
20-
pydantic==2.5.3
21-
22-
# RAG / Vector Search
23-
numpy==1.26.4
24-
faiss-cpu==1.8.0
25-
26-
# Utilities
27-
aiofiles==23.2.1
1+
# Core Web Framework
2+
fastapi==0.109.0
3+
uvicorn[standard]==0.27.0
4+
python-multipart==0.0.22
5+
6+
# LLM & AI APIs
7+
httpx==0.27.2
8+
requests==2.31.0
9+
openai>=1.0.0
10+
11+
# Document Processing
12+
pypdf==6.1.1
13+
python-docx==1.1.0
14+
pdf2image==1.16.3
15+
pytesseract==0.3.10
16+
Pillow==12.1.1
17+
18+
# Configuration Management
19+
python-dotenv==1.0.0
20+
pydantic==2.5.3
21+
22+
# RAG / Vector Search
23+
numpy==1.26.4
24+
faiss-cpu==1.8.0
25+
26+
# Utilities
27+
aiofiles==23.2.1

0 commit comments

Comments
 (0)