chore(deps)(deps): bump spacy from 3.8.2 to 3.8.7 in /backend #44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Security Checks | |
on: | |
push: | |
branches: [ main, dev ] | |
pull_request: | |
branches: [ main, dev ] | |
schedule: | |
# Run security checks weekly (Sundays at 2 AM UTC) | |
- cron: '0 2 * * 0' | |
# Minimal permissions following security best practices | |
permissions: | |
contents: read | |
jobs: | |
codeql-analysis: | |
name: CodeQL Analysis | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write # Required for CodeQL to upload results | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ['python', 'javascript'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
dependency-scan: | |
name: Dependency Security Scan | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Set up Python | |
uses: actions/setup-python@v6 | |
with: | |
python-version: '3.11' | |
- name: Install Python dependencies | |
run: | | |
cd backend | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install safety bandit | |
- name: Set up Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: '18' | |
- name: Install Node.js dependencies | |
run: | | |
cd frontend | |
npm ci | |
- name: Run Python security checks | |
run: | | |
cd backend | |
# Check for known security vulnerabilities in dependencies | |
safety check | |
# Run static security analysis | |
bandit -r app/ -f json -o bandit-report.json || true | |
- name: Run Node.js security audit | |
run: | | |
cd frontend | |
npm audit --audit-level=moderate | |
- name: Upload Bandit results | |
uses: github/codeql-action/upload-sarif@v3 | |
if: always() | |
with: | |
sarif_file: backend/bandit-report.json | |
continue-on-error: true |