fix(security): remediate base-branch supply-chain CVEs (setuptools, brace-expansion, postcss) - #718
Conversation
Fixes the real Medium+ findings failing the `trivy-fs` and `security-audit` gates on develop, at the base branch so open PRs inherit the fix. Confirmed from CI job logs (PR #715 checks), not from PR titles — the suspected yt-dlp / sharp CVEs are already remediated on base (`yt-dlp>=2026.6.9`). Findings remediated (CVE/GHSA -> fixed version): - setuptools CVE-2026-59890 (MEDIUM 6.1, FileList Unicode-normalization exclusion bypass): 81.0.0 -> 83.0.0. Transitive via torch; torch 2.12.1 caps `setuptools<82`, so torch is bumped 2.12.1 -> 2.13.0 (requires `setuptools>=77.0.3`, no upper bound) to allow the patched line. Constrained durably in pyproject `[tool.uv] constraint-dependencies` and re-locked with `uv lock --upgrade-package setuptools`. - brace-expansion GHSA-3jxr-9vmj-r5cp + GHSA-mh99-v99m-4gvg (HIGH, ReDoS / unbounded-expansion OOM): 5.0.6 -> 5.0.8. - postcss GHSA-r28c-9q8g-f849 (HIGH, source-map path traversal): 8.5.16 -> 8.5.18. Both npm fixes pinned via scoped root `overrides` (same-major/minor patch bumps only; no export-shape change) with a minimal hand-applied lockfile edit, avoiding full-tree churn. Local verification (all pass): - npm ci: lock consistent with package.json - npm audit --workspaces --audit-level=high: found 0 vulnerabilities - npm run build / test / lint / typecheck: pass (desktop + shared-types 100% cov) - uv sync --project services/analysis-engine --group dev --frozen: ok - pip-audit --local --strict: No known vulnerabilities found - analysis-engine pytest: 657 passed, 24 skipped, 100% coverage - (trivy not installed locally; sole trivy-fs finding was setuptools, now patched and corroborated by clean pip-audit) No security gate weakened; no broad ignores added. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzUnTqFnQqhRbaopvDdag7
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
Comment |
trivy-fs on the branch head flagged one remaining Medium+ finding (setuptools was cleared and the torch/cuda cascade introduced none): yt-dlp CVE-2026-55404 (HIGH, CVSS 7.5 — .url/.desktop shortcut-file injection via attacker-controlled webpage_url/filename in --write-link/--write-url-link/ --write-desktop-link, leading to downstream RCE if the shortcut is opened). This advisory postdates the PR #715 scan, so the trivy DB now matches the pinned yt-dlp 2026.6.9; the fix is 2026.7.4. yt-dlp is a direct dependency: bumped the floor `>=2026.6.9` -> `>=2026.7.4` in services/analysis-engine/pyproject.toml and re-locked surgically with `uv lock --upgrade-package yt-dlp` (only yt-dlp changed: 2026.6.9 -> 2026.7.4). Local verification (all pass): - uv sync --project services/analysis-engine --group dev --frozen: ok - pip-audit --local --strict: No known vulnerabilities found - analysis-engine pytest --cov --cov-fail-under=100: 657 passed, 24 skipped, 100% - npm ci consistent; npm audit --workspaces --audit-level=high: 0 vulnerabilities - npm run build / test / lint / typecheck: pass (desktop 194 tests + shared-types 20 tests, 100% coverage; mypy --strict clean; supply-chain/doc/bandit gates green) - trivy not installed locally; yt-dlp is now 2026.7.4, exactly the fixed version trivy demanded, corroborated by clean pip-audit No security gate weakened; no ignores added. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzUnTqFnQqhRbaopvDdag7
|
Closing as closed-duplicate/superseded (security/CVE cluster) by autonomous product-completion loop. Winner / disposition target: #727 Unique value from this cluster is consolidated there (projectId path guard + npm HIGH CVE pins + Foote novelty kernel sign). Remaining micro-duplicates do not land additional commercial readiness. |
|
closed-closed-duplicate/superseded (security/CVE cluster) → #727 |
Pull Request
Summary
Remediates the real Medium+ supply-chain findings that fail the
trivy-fsandsecurity-auditrequired gates ondevelop, fixed at the base branch so every open PR inherits the fix. Findings were confirmed from CI job logs (PR #715trivy-fs+security-audit), not from PR titles — the suspectedyt-dlp/sharpCVEs are already remediated on base (yt-dlp>=2026.6.9, nosharpfinding).CVE/GHSA → fixed version:
CVE-2026-59890(MEDIUM, CVSS 6.1 —FileListUnicode-normalization exclusion bypass): 81.0.0 → 83.0.0. Transitive viatorch.torch 2.12.1capssetuptools<82, sotorchmoves 2.12.1 → 2.13.0 (requiressetuptools>=77.0.3, no upper bound) to allow the patched line; itscuda-toolkittransitive follows (13.0.2 → 13.0.3.0). Pinned durably via[tool.uv] constraint-dependencies = ["setuptools>=83.0.0"]and re-locked withuv lock --upgrade-package setuptools.GHSA-3jxr-9vmj-r5cp+GHSA-mh99-v99m-4gvg(HIGH — ReDoS / unbounded-expansion OOM): 5.0.6 → 5.0.8.GHSA-r28c-9q8g-f849(HIGH — source-map path traversal / arbitrary.mapdisclosure): 8.5.16 → 8.5.18.Both npm fixes are pinned via scoped root
overrides(same-major/minor patch bumps only — no export-shape change), with a minimal hand-appliedpackage-lock.jsonedit to avoid full-tree churn. No security gate was weakened and no broad ignores were added.Verification
./scripts/harness/quickcheck.sh— ran its constituent gates individually (see below) plus thesecurity-auditworkflow commandsLocal results (all pass):
npm ci: lockfile consistent withpackage.jsonnpm audit --workspaces --audit-level=high: found 0 vulnerabilitiesnpm run build/test/lint/typecheck: pass (desktop + shared-types 100% coverage, mypy--strictclean)uv sync --project services/analysis-engine --group dev --frozen: okuv run … pip-audit --local --strict: No known vulnerabilities foundpytest --cov … --cov-fail-under=100: 657 passed, 24 skipped, 100% coveragetrivynot installed locally; the soletrivy-fsfinding wassetuptoolsand is now patched, corroborated by the cleanpip-auditSecurity Notes
Attack surface
Dependency supply chain only (build/dev tooling + Python analysis engine deps). No application source, IPC boundary, or runtime behaviour changed.
Trust boundary
No trust boundary moved.
postcss/brace-expansionare dev-time build/lint tooling;setuptools/torchare analysis-engine deps behind the existing Tauri→subprocess boundary.Mitigations
Upgraded each vulnerable package to its patched release. Fixes are pinned (npm
overrides, uvconstraint-dependencies) so a future lock refresh cannot silently regress below the patched line.Test points
npm
audit,pip-audit, and the full build/test/lint/typecheck matrix all run clean on the patched locks; analysis-engine tests keep 100% coverage withtorch 2.13.0(tests use fake torch/demucs; real torch is lazily imported only in the separation code path).Dependency and Supply Chain
overrides/constraint-dependencies)npm audit fixballooned the tree and could not resolve within-range; scoped overrides + surgical lock edit chosen for a minimal, auditable diff)npm audit+pip-auditclean post-fix)i18n impact
Reviewer checklist
develop)Generated by Claude Code