diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 0000000..a7e4f09 --- /dev/null +++ b/.github/workflows/security.yml @@ -0,0 +1,42 @@ +name: Security audit + +# Checks the pinned dependencies against public advisory databases. +# Reads the lock files only; it never installs or runs project code. +on: + pull_request: + paths: + - "apps/api/requirements.lock" + - "apps/web/package-lock.json" + - ".github/workflows/security.yml" + push: + branches: [main] + schedule: + - cron: "17 5 * * 1" # weekly, Monday 05:17 UTC, so new advisories surface without a push + +permissions: + contents: read + +jobs: + api-audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v7 + with: + python-version: "3.12" + - run: pip install pip-audit==2.9.0 + # --no-deps --disable-pip: audit exactly what the lock file pins, without resolving or installing. + - run: pip-audit --no-deps --disable-pip -r apps/api/requirements.lock + + web-audit: + runs-on: ubuntu-latest + defaults: + run: + working-directory: apps/web + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + # Production dependencies only; fails on high or critical advisories. + - run: npm audit --omit=dev --audit-level=high diff --git a/docs/VERSIONS.md b/docs/VERSIONS.md index 68f66c5..22e84e8 100644 --- a/docs/VERSIONS.md +++ b/docs/VERSIONS.md @@ -57,3 +57,8 @@ GitHub REST API version is pinned to `2022-11-28` (setting `GITHUB_API_VERSION`) GitHub released `2026-03-10` with breaking changes; upgrade deliberately, not by accident. GitHub syncs, indexing, pull request reviews and CI analyses run as Celery jobs (or inline with `JOB_BACKEND=inline`). Phase 8 (CI analysis) added no new dependencies. + +## CI tooling +| Tool | Version | +|---|---| +| pip-audit (`.github/workflows/security.yml`) | 2.9.0 |