Skip to content

Security

Security #17

Workflow file for this run

name: Security
on:
push:
branches: [main]
paths:
- '**.py'
- 'requirements.txt'
- '.github/workflows/security.yml'
pull_request:
branches: [main]
paths:
- '**.py'
- 'requirements.txt'
- '.github/workflows/security.yml'
schedule:
# Run weekly security scans
- cron: '0 0 * * 0'
jobs:
security:
name: Security Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bandit[toml] safety
pip install -r requirements.txt
- name: Run Bandit (security issues)
run: |
bandit -r . -f json -o bandit-report.json --exclude ./.venv,./.pytest_cache || true
bandit -r . -f screen --exclude ./.venv,./.pytest_cache
- name: Run Safety (dependency vulnerabilities)
run: |
safety check || true
- name: Upload Bandit results
if: always()
uses: actions/upload-artifact@v4
with:
name: bandit-report
path: bandit-report.json
retention-days: 30