Skip to content

Add GitHub Actions workflow for weekly Bandit security scans #1

Add GitHub Actions workflow for weekly Bandit security scans

Add GitHub Actions workflow for weekly Bandit security scans #1

Workflow file for this run

name: Security Scan
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 0 * * 1' # Weekly on Monday
permissions:
contents: read
security-events: write
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run Bandit security scan
run: |
pip install bandit[toml]
bandit -r flare_explorer/ -f json -o bandit-report.json || true
- name: Upload Bandit results
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: bandit-report.json
continue-on-error: true