Skip to content

fix(ci): clear pip-audit --strict — click bump + cryptography ignore-vuln (run #544) - #171

Draft
Sbussiso wants to merge 1 commit into
masterfrom
ci-fix/31433866014
Draft

fix(ci): clear pip-audit --strict — click bump + cryptography ignore-vuln (run #544)#171
Sbussiso wants to merge 1 commit into
masterfrom
ci-fix/31433866014

Conversation

@Sbussiso

Copy link
Copy Markdown
Contributor

What

Fixes the pip-audit --strict failure in CI run #544 (Test & Deploy on the dependabot/uv/backend/ruff-0.16.2 ruff bump).

The failing step reported 4 known vulnerabilities in 2 packages:

Package Version ID Fix
click 8.3.1 PYSEC-2026-2132 8.3.3
cryptography 48.0.1 PYSEC-2026-3552 50.0.0
cryptography 48.0.1 PYSEC-2026-3553 49.0.0
cryptography 48.0.1 PYSEC-2026-3554 49.0.0

Root cause

New advisories landed in the PyPA Advisory DB after the last green deploy, so pip-audit --strict turned red on a no-code-change ruff bump. (The ruff bump itself is unrelated to the failure.)

Fix — two parts, matching the project's existing constraint-dependencies / --ignore-vuln pattern

1. click — real version bump

Add "click>=8.3.3" to [tool.uv] constraint-dependencies in backend/pyproject.toml. uv lock resolves click 8.3.1 -> 8.4.2, clearing PYSEC-2026-2132 (command injection in click.edit()). click is transitive via uvicorn / fastmcp-slim / mcp; we never call click.edit() (interactive $EDITOR helper, unusable from a server).

2. cryptography — cannot bump, suppress

The fixed versions (49.0.0 / 50.0.0) are not installable: clerk-backend-api 6.0.1 declares cryptography<49.0.0,>=45.0.0, capping the highest reachable version at 48.0.1 while we depend on clerk. None of the vulnerable paths are reachable from our code (no pkcs7_decrypt_*, no X.509 verification of attacker-controlled cert chains), so the three advisories are suppressed via --ignore-vuln in both CI workflows:

  • .github/workflows/deploy.yml (Test & Deploy — the failing workflow)
  • .github/workflows/weekly-deps-refresh.yml (parity, so the weekly refresh doesn't re-report what the deploy gate tolerates)

Revisit when clerk-backend-api ships a release allowing cryptography>=50.0.0 — then drop the constraint and the three --ignore-vuln lines.

Verification (local, fresh clone)

uv sync --extra dev
uv run pip-audit --strict \
  --ignore-vuln PYSEC-2026-3552 \
  --ignore-vuln PYSEC-2026-3553 \
  --ignore-vuln PYSEC-2026-3554
# -> No known vulnerabilities found, 3 ignored   (exit 0)
uv run ruff check       # -> All checks passed
uv run pytest -q        # -> 699 passed in 11.47s

Notes

Draft until CI on this branch confirms the gate is green.

…vuln (run #544)

Run #544 (Test & Deploy on dependabot ruff-0.16.2 bump) failed in the
'Dependency scan (pip-audit)' step: 4 vulns in 2 packages — click 8.3.1
(PYSEC-2026-2132) and cryptography 48.0.1 (PYSEC-2026-3552/3553/3554).

Root cause: new advisories landed in the PyPA DB after the last green
deploy, turning pip-audit --strict red on a no-code-change ruff bump.

Fix (two parts, matching the project's existing pattern):

1. click — real version bump.  Add 'click>=8.3.3' to [tool.uv]
   constraint-dependencies; uv lock resolves click 8.3.1 -> 8.4.2,
   clearing PYSEC-2026-2132.  Transitive via uvicorn / fastmcp-slim /
   mcp; we never call the vulnerable click.edit() (interactive
   $EDITOR helper, unusable from a server).

2. cryptography — cannot bump.  clerk-backend-api 6.0.1 caps
   cryptography to <49.0.0, so 49.0.0 / 50.0.0 are uninstallable
   while we depend on clerk.  Suppress the three advisories via
   --ignore-vuln in both CI workflows (deploy.yml +
   weekly-deps-refresh.yml).  None of the vulnerable paths are
   reachable from our code (no pkcs7_decrypt_*, no X.509 verification
   of attacker-controlled cert chains).  Revisit when clerk-backend-api
   ships a release allowing cryptography>=50.0.0.

Verified locally: uv run pip-audit --strict --ignore-vuln ... ->
   'No known vulnerabilities found, 3 ignored' (exit 0).  ruff check
   + 699 pytest also green.
Sbussiso referenced this pull request Aug 10, 2026
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.1 to 0.16.2.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.16.1...0.16.2)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.16.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant