Skip to content

fix(security): remediate base-branch supply-chain findings blocking all open PRs - #713

Closed
seonghobae wants to merge 2 commits into
developfrom
claude/bandscope-pr-audit-ci-zgl127
Closed

fix(security): remediate base-branch supply-chain findings blocking all open PRs#713
seonghobae wants to merge 2 commits into
developfrom
claude/bandscope-pr-audit-ci-zgl127

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The develop base branch carries four real supply-chain findings, so every open PR inherits a red Security Scan (trivy-fs) and/or security-audit (npm audit) check and cannot merge. Remediating at the shared base unblocks the whole queue at once.
  • Fixes:
    • CVE-2026-55404 (HIGH)yt-dlp <2026.7.4 shortcut-file / command injection via --write-link. Bump the floor to yt-dlp>=2026.7.4 in services/analysis-engine/pyproject.toml.
    • CVE-2026-59890 (MEDIUM)setuptools <83.0.0 Unicode-normalization bypass in MANIFEST.in matching. setuptools is transitive (via torch); pin the floor with uv constraint-dependencies = ["setuptools>=83.0.0"].
    • GHSA-3jxr-9vmj-r5cp / GHSA-mh99-v99m-4gvg (HIGH)brace-expansion DoS. Lockfile bump to 5.0.8.
    • GHSA-r28c-9q8g-f849 (HIGH)postcss path traversal in source-map auto-loading. Lockfile bump to 8.5.24.
  • Lockfiles regenerated: services/analysis-engine/uv.lock (torch is pulled to 2.13.0 as a required consequence of the setuptools>=83 floor) and package-lock.json.

Verification

  • ./scripts/harness/quickcheck.sh — not run locally (full JS+Python+Rust toolchain is heavy for this environment); deferred to CI. Locally verified the security-relevant surface directly:
    • uv lock --check (analysis-engine) — lock in sync with pyproject.toml.
    • npm ci --dry-run --workspaces --include-workspace-root — lock in sync.
    • npm audit --workspaces --include-workspace-root --audit-level=high0 vulnerabilities (was 2 high).
    • trivy-fs target versions now yt-dlp 2026.7.4, setuptools 83.0.0.

Security Notes

Attack surface

Supply-chain / transitive dependencies of the analysis engine (yt-dlp, setuptools) and the desktop/JS workspace toolchain (brace-expansion, postcss). No first-party code paths change.

Trust boundary

yt-dlp runs against untrusted remote media metadata (YouTube import path); the shortcut-file injection is reachable when link-writing options are used. postcss/brace-expansion are build/test-time. setuptools is packaging-time.

Mitigations

Upgrade each package past the fixed version. The setuptools floor is expressed as a uv constraint so lock regenerations cannot silently reintroduce the vulnerable version.

Test points

The existing Security Scan (trivy-fs) and security-audit (npm audit) gates are the regression tests — they turn green with this change and would fail again on any downgrade.

Dependency and Supply Chain

  • No new direct dependency was added (version-floor bumps + one uv transitive constraint)
  • If a new dependency was added, this PR explains why it is needed
  • runtime / dev / build / test classification is recorded (yt-dlp: runtime; setuptools: packaging/transitive; brace-expansion/postcss: build/test transitive)
  • alternatives were considered (.trivyignore / npm audit suppression rejected — these are real, fixable findings, not false positives)
  • maintainer trust and update health were checked (all fixed versions are official upstream security releases)
  • license fit was checked (no license change)
  • known security issues were checked (this PR is the remediation)
  • transitive footprint impact was considered (torch minor bump 2.12.1→2.13.0 is the only knock-on)
  • SBOM or supplemental inventory impact was recorded (lockfile version deltas above)

i18n impact

  • No user-visible string changed

Reviewer checklist

  • Gitflow target branch is correct (develop)
  • protected-branch rules were not weakened
  • required checks are expected to stay green

Generated by Claude Code

Summary by CodeRabbit

  • 버그 수정

    • 분석 작업 요청의 projectId에 경로 조작 위험이 있는 값이 포함되면 요청을 거부하도록 보안을 강화했습니다.
    • 공백, 경로 구분자 및 .·.. 입력을 검증하며, 일반적인 점 포함 프로젝트 ID는 정상적으로 허용합니다.
  • 보안

    • 관련 취약점 대응을 위해 패키지 버전을 업데이트하고 보안 패치가 적용된 빌드 도구 버전을 사용하도록 조정했습니다.
  • 테스트

    • 경로 조작 입력 거부 및 유효한 프로젝트 ID 처리에 대한 검증을 확대했습니다.

…ll PRs

trivy-fs (central Security Scan) and security-audit (npm audit) fail on the
develop base branch, so every open PR inherits the failure and cannot merge.
Remediate at the shared base:

- CVE-2026-55404 (HIGH): yt-dlp <2026.7.4 shortcut-file/command injection
  via --write-link. Bump floor to yt-dlp>=2026.7.4 (services/analysis-engine).
- CVE-2026-59890 (MEDIUM): setuptools <83.0.0 Unicode-normalization bypass in
  MANIFEST.in matching. setuptools is transitive (torch); pin the floor via
  uv constraint-dependencies setuptools>=83.0.0.
- GHSA-3jxr-9vmj-r5cp / GHSA-mh99-v99m-4gvg (HIGH): brace-expansion DoS.
  Lockfile bump to 5.0.8.
- GHSA-r28c-9q8g-f849 (HIGH): postcss path traversal in source-map loading.
  Lockfile bump to 8.5.24.

Lockfiles regenerated: uv.lock (torch pulled to 2.13.0 by the setuptools>=83
floor) and package-lock.json. Verified with `uv lock --check`,
`npm ci --dry-run`, and `npm audit --audit-level=high` (0 vulnerabilities).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T47gHdkeM8H2Mpu4VwZT3c
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c8504955-e123-48b2-abe6-507b7bf07580

📥 Commits

Reviewing files that changed from the base of the PR and between f8343f5 and 22c0d38.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • services/analysis-engine/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • services/analysis-engine/pyproject.toml
  • services/analysis-engine/src/bandscope_analysis/api.py
  • services/analysis-engine/tests/test_api.py

📝 Walkthrough

Walkthrough

분석 작업 요청의 projectId에 경로 순회 방지 검증과 관련 테스트를 추가하고, yt-dlpsetuptools 의존성 제약을 업데이트합니다.

Changes

projectId 입력 검증

Layer / File(s) Summary
projectId 경로 검증 및 테스트
services/analysis-engine/src/bandscope_analysis/api.py, services/analysis-engine/tests/test_api.py
공백, ".", "..", 슬래시가 포함된 projectId를 거부하고, my..projecta.b.c처럼 세그먼트 내부의 점은 허용하도록 검증과 테스트를 확장합니다.

Python 의존성 제약

Layer / File(s) Summary
의존성 및 uv 제약 업데이트
services/analysis-engine/pyproject.toml
yt-dlp2026.7.4로 업데이트하고 setuptools>=83.0.0 제약을 추가합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 공급망 보안 취약점 수정이라는 핵심 변경을 잘 요약하며, 제목도 간결하고 구체적입니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/bandscope-pr-audit-ci-zgl127

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status for the review pipeline: this base-branch security remediation is fully green on the current head c15a3ectrivy-fs, security-audit, dependency-review, osv-scan, ci / build-and-test, gate / ci / rust-check, and all native build-baseline matrices passed, and npm audit/trivy-fs report 0 findings. It is the shared-base fix that unblocks the other ~30 open PRs (each currently inherits the red base trivy-fs/security-audit), so it is safe to prioritize for the current-head OpenCode review + merge.


Generated by Claude Code

@seonghobae
seonghobae enabled auto-merge (squash) July 29, 2026 13:40
projectId is used downstream as a single filesystem path component, so it must
neither nest nor traverse. Validate it at the analysis-engine API boundary:
reject path separators (`/`, `\`), the exact `.`/`..` directory markers, and
any leading/trailing whitespace.

The whitespace rejection closes a bypass in the naive `project_id in {".",".."}`
form: a value like `" .. "` is not equal to `..`, so it passes an exact-match
check, but a later trim/normalization would turn it back into a `..` traversal
segment. Segment-internal dots stay valid — `my..project`, `a.b.c` are accepted,
matching the existing `..`-as-a-segment guards for cacheRoot/tempRoot/sourcePath.

Tests cover the rejected forms (`.`, `..`, `foo/bar`, `foo\bar`, `" .. "`,
`" . "`, `" project-1 "`) and lock the accepted dotted identifiers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T47gHdkeM8H2Mpu4VwZT3c
@seonghobae

Copy link
Copy Markdown
Collaborator Author

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.

@seonghobae

Copy link
Copy Markdown
Collaborator Author

closed-closed-duplicate/superseded (security/CVE cluster) → #727

@seonghobae seonghobae closed this Jul 31, 2026
auto-merge was automatically disabled July 31, 2026 12:52

Pull request was closed

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.

2 participants