feat: add GitHub Actions workflows for PR checks and security scans

This commit is contained in:
Lorenzo Venerandi
2026-01-22 11:10:04 +01:00
parent 143b301bcb
commit 261a7b26b9
2 changed files with 102 additions and 0 deletions

46
.github/workflows/security-scan.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Security Scan
on:
pull_request:
branches:
- main
- beta
- dev
permissions:
contents: read
jobs:
security-checks:
name: Security & Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install bandit safety
- name: Bandit security check
run: |
bandit -r src/ -f json -o bandit-report.json || true
bandit -r src/ -f txt
- name: Safety check for dependencies
run: safety check --json || true
- name: Trivy vulnerability scan
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
format: 'table'
severity: 'CRITICAL,HIGH'
exit-code: '1'