fix(security): bump brace-expansion + postcss to clear two high CVEs - #725
fix(security): bump brace-expansion + postcss to clear two high CVEs#725seonghobae wants to merge 4 commits into
Conversation
npm audit flags two high-severity transitive dev advisories in the committed
lockfile:
- brace-expansion <=5.0.7 — ReDoS via exponential-time expansion of consecutive
non-expanding {} groups (GHSA-3jxr-9vmj-r5cp) and unbounded-length OOM crash
(GHSA-mh99-v99m-4gvg)
- postcss <=8.5.17 — path traversal in previous source-map auto-loading
(GHSA-r28c-9q8g-f849)
Resolve via
up to date, audited 391 packages in 963ms
109 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities (lock-only, semver-compatible per-line bumps — 3
packages changed), rather than a single override, because brace-expansion spans
multiple major lines (1.x/2.x/5.x) via minimatch/glob and each must move to its
own patched release. No package.json / source change.
Verified: npm audit --audit-level=high -> 0 vulnerabilities; npm ci -> clean
(lock in sync); npm run build --workspace @bandscope/desktop -> ok; npm run test
--workspace @bandscope/desktop -> 100% coverage (469/469 stmts, 357/357 branches).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HdCssGnNMhKHNu3TXFstWH
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough로컬 오디오 분석 요청에서 Changes로컬 오디오 요청 검증
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…ysis engine The org trivy-fs scan flags two advisories in services/analysis-engine/uv.lock (pre-existing on develop, surfaced on every PR): - CVE-2026-55404 (HIGH) yt-dlp 2026.6.9 - CVE-2026-59890 (MEDIUM) setuptools 81.0.0 Remediate the HIGH cleanly: yt-dlp is a direct dep (>=2026.6.9), so `uv lock --upgrade-package yt-dlp` moves it to 2026.7.4 with no other change (torch/setuptools untouched; only the yt-dlp lock entry changes). The setuptools MEDIUM is intentionally NOT fixed here: setuptools>=82 is coupled to torch (torch 2.12.1 build-requires setuptools<82), so clearing it forces torch 2.12.1 -> 2.13.0 — a behavior-sensitive ML-runtime bump for demucs stem separation that cannot be verified in this environment. Flagged on the PR for a maintainer-verified torch upgrade rather than an unverified push. Verified: uv lock --upgrade-package yt-dlp -> yt-dlp 2026.7.4, lock consistent (uv lock --check resolves), diff is the single yt-dlp entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HdCssGnNMhKHNu3TXFstWH
|
The Fixed here (
Deliberately NOT fixed here — the MEDIUM, because its only fix is coupled to a behavior-sensitive torch bump:
Pushing an unverified torch upgrade would violate "verify before claiming done," so I'm flagging it rather than forcing it. Recommended handling (maintainer decision, since it is behavior-sensitive):
I did not add an ignore autonomously (org policy is remediate-not-suppress), and I did not push the torch bump (unverifiable). Happy to do (1) end-to-end if a Python 3.12 + torch/demucs runner is available. Generated by Claude Code |
The stdin job-request handler's temporary temporal-injection block guarded
localSource with a membership check (`"localSource" in request`) but not a type
check, then called `.get()` on it. A payload with a non-dict localSource (a
string, null, number, or list) — which passes the jobId guard — reached
`local_source.get("sourcePath")` and raised AttributeError. That call sits
outside the block's try/except, so it propagated out of main(), killing the
process with a traceback and writing no JSON envelope — violating cli.main()'s
contract that malformed stdin payloads return a typed `failed`/`invalid_request`
envelope (every other malformed-input path already does).
Fix: guard with `isinstance(request.get("localSource"), dict)` so a non-dict
localSource skips the injection block and falls through to
validate_analysis_job_request (api.py), which raises the contracted
"invalid field 'localSource'" ValueError that run_analysis_job converts to the
invalid_request failure envelope.
Regression test added (test_cli_main_handles_non_dict_local_source); confirmed it
fails with the AttributeError on the pre-fix code and passes after. Python engine
gate green: 658 passed, 100% branch coverage (0 missed), ruff clean, mypy
--strict clean. No i18n impact (no new user-visible string).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HdCssGnNMhKHNu3TXFstWH
|
Added a code-defect fix to this branch ( Defect: Fix: guard with Verification (Python engine gate): added Generated by Claude Code |
The prior commit's added assertion tripped `ruff format --check` (the ci / build-and-test and release-preflight lanes run it), collapsing the message comparison onto one line. Formatting-only; no behavior change. Verified: ruff format --check (87 files, exit 0), ruff check clean, test_cli.py 18 passed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HdCssGnNMhKHNu3TXFstWH
|
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 was closed
Pull Request
Summary
npm auditflags two high-severity transitive dev/build advisories in the committed lockfile:{}groups (GHSA-3jxr-9vmj-r5cp) and unbounded-length OOM crash (GHSA-mh99-v99m-4gvg) — pulled viaminimatch/glob.vite.npm audit fix(lock-only, 3 packages, semver-compatible per-line bumps). Chosen over a singleoverridespin because brace-expansion spans multiple major lines (1.x/2.x/5.x) that must each move to their own patched release. Nopackage.json/ source change.Verification
./scripts/harness/quickcheck.sh— not run in full (the Python/Rust lanes are unaffected by an npm lockfile bump). Ran the npm-affected subset instead:npm audit --audit-level=high→ found 0 vulnerabilitiesnpm ci→ clean (lockfile valid + in sync withpackage.json)npm run build --workspace @bandscope/desktop→ ok (pre-existing chunk-size notice only)npm run test --workspace @bandscope/desktop→ 100% coverage (469/469 stmts, 357/357 branches, 105/105 funcs)Security Notes
Attack surface
brace-expansionvia glob/minimatch,postcssvia vite). Not shipped in the Tauri runtime image or the Python analysis engine.Trust boundary
Mitigations
.trivyignore/audit-suppression added).Test points
npm audit(0 high),npm ci(lock sync), desktop vitest (100% coverage), desktop vite build.Dependency and Supply Chain
overridespin rejected (brace-expansion multi-major-line)i18n impact
Reviewer checklist
develop🤖 Generated with Claude Code
https://claude.ai/code/session_01HdCssGnNMhKHNu3TXFstWH
Generated by Claude Code
Summary by CodeRabbit
버그 수정
localSource가 올바른 객체 형식인지 확인하도록 개선했습니다.invalid_request오류로 안전하게 처리됩니다.테스트
localSource에 객체가 아닌 값이 전달되는 경우의 오류 처리 검증을 추가했습니다.