Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Add pip-audit CI gate and bump click

Juan Denis7104713b8e32
diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml
index 29af9244..f565c33d 100644
--- a/.github/workflows/security-scan.yml
+++ b/.github/workflows/security-scan.yml
@@ -54,16 +54,60 @@ jobs:
-f txt
# ──────────────────────────────────────────────────────────────────
- # Job 2: Safety — dependency vulnerability scanning
+ # Job 2: pip-audit — dependency vulnerability scanning (the gate)
+ #
+ # This is the blocking check. Unlike the Safety job below it needs no
+ # account, no API key and no network-fetched policy: it resolves the pinned
+ # requirements against the PyPI Advisory Database and fails on anything it
+ # finds. Every suppression therefore has to live in THIS file, in a diff a
+ # reviewer can see — which is the whole point. Safety was reporting
+ # "No issues found" while its Platform-side policy silently ignored four
+ # advisories, one of them a real, fixable CVE in a directly pinned package.
+ # ──────────────────────────────────────────────────────────────────
+ pip-audit:
+ name: pip-audit Dependency Scan
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.11'
+
+ - name: Install pip-audit
+ run: pip install pip-audit
+
+ # No --ignore-vuln entries today. If one is ever needed, add it here with
+ # a comment saying which advisory, why it does not apply, and when to
+ # revisit — never by silencing the scanner globally.
+ - name: Audit backend requirements
+ run: pip-audit -r backend/requirements.txt --progress-spinner off
+
+ - name: Audit test-harness requirements
+ run: pip-audit -r scripts/test/harness/requirements.txt --progress-spinner off
+
+ # ──────────────────────────────────────────────────────────────────
+ # Job 3: Safety — advisory only
+ #
+ # Kept for the Safety Platform dashboard, but deliberately NOT a gate.
+ # The action shells out to a hosted service, and a service-side failure
+ # there (results upload erroring with "Sorry, something went wrong" while
+ # the scan itself reported clean) took CI red on 2026-07-20 with no repo
+ # change behind it — requirements had not moved since 2026-07-04. An
+ # outage at a third party should not block merges; pip-audit above is the
+ # check that actually has to pass.
# ──────────────────────────────────────────────────────────────────
safety:
- name: Safety Dependency Scan
+ name: Safety Dependency Scan (advisory)
runs-on: ubuntu-latest
+ continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Run Safety CLI to check for vulnerabilities
+ continue-on-error: true
uses: pyupio/safety-action@v1
with:
api-key: ${{ secrets.SAFETY_API_KEY }}
diff --git a/backend/requirements.txt b/backend/requirements.txt
index b68f9129..8b63d912 100644
--- a/backend/requirements.txt
+++ b/backend/requirements.txt
@@ -42,7 +42,7 @@ tomli>=2.0.0; python_version < '3.11'
Flask-Limiter==3.5.0
# CLI
-click==8.1.7
+click==8.3.3
schedule==1.2.2
croniter==6.0.0