Skip to content

chore(deps): bump the pip group across 1 directory with 12 updates #28

chore(deps): bump the pip group across 1 directory with 12 updates

chore(deps): bump the pip group across 1 directory with 12 updates #28

Workflow file for this run

name: Security Scan
on:
push:
branches: [master, develop]
paths:
- "engine/**"
- ".github/workflows/security.yml"
pull_request:
branches: [master, develop]
paths:
- "engine/**"
- ".github/workflows/security.yml"
schedule:
- cron: "0 0 * * 1" # Weekly on Monday
jobs:
bandit:
name: Bandit Security Scan
runs-on: ubuntu-latest
defaults:
run:
working-directory: engine
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: poetry install --with dev --no-root
- name: Run Bandit
run: |
poetry run bandit -r codeflow_engine -f json -o bandit-report.json || true
poetry run bandit -r codeflow_engine
- name: Upload Bandit report
if: always()
uses: actions/upload-artifact@v4
with:
name: bandit-report
path: engine/bandit-report.json
safety:
name: Safety Dependency Check
runs-on: ubuntu-latest
defaults:
run:
working-directory: engine
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: poetry install --with dev --no-root
- name: Export dependencies
run: poetry export -f requirements.txt --output requirements.txt --without-hashes
- name: Run Safety check
run: |
pip install safety
safety check --file requirements.txt || true
trivy:
name: Trivy Vulnerability Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: "fs"
scan-ref: "./engine"
format: "sarif"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH"
- name: Upload Trivy results to GitHub Security
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: "trivy-results.sarif"