Scorecard's next run surfaced two more specifics: - upload-sarif rejected results_file (old input name); the modern input is sarif_file — the default fell back to ../results and the step failed with 'Path does not exist'. Scorecard analysis itself ran fine; only the SARIF upload was misconfigured - GitHub deprecates CodeQL Action v3 in December 2026 — weeks away — and the runner logs flagged Node 20 on checkout/upload-artifact Everything moves to the newest major with Node 24: codeql-action v4, checkout v5, setup-python v6, upload-artifact v5, upload-pages-artifact v4, login-action v4, metadata-action v6, build-push-action v7 (deploy- pages v5 / configure-pages v6 / setup-buildx-action v4 stay: no newer major exists). All SHAs resolved from the Git refs API with annotated tags peeled to commits, verified via the commits endpoint.
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: CodeQL
|
|
|
|
# Static security analysis (SAST) of the Python backend/bot and the
|
|
# Next.js dashboard. Results land in the repo's Security tab under
|
|
# "Code scanning" so vulnerabilities are visible, not guessed.
|
|
# Free for public repositories.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
schedule:
|
|
# Weekly scan on top of every push: catches newly discovered
|
|
# patterns in dependencies that never changed.
|
|
- cron: "17 4 * * 1"
|
|
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
|
|
jobs:
|
|
analyze:
|
|
name: Analyze (${{ matrix.language }})
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- language: python
|
|
paths: backend bot training benchmarks space deploy
|
|
- language: javascript-typescript
|
|
paths: web
|
|
steps:
|
|
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
# "none" build mode: modern CodeQL extracts JS/TS without a build;
|
|
# Python needs no build either.
|
|
build-mode: none
|
|
queries: security-extended
|
|
- if: matrix.language == 'javascript-typescript'
|
|
name: Install web deps for extraction
|
|
working-directory: web
|
|
run: npm ci
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4
|
|
with:
|
|
category: "/language:${{ matrix.language }}"
|