Skip to content

fix(security): projectId path guard, npm HIGH CVEs, Foote novelty sign - #727

Merged
seonghobae merged 2 commits into
developfrom
feature/loop-security-projectid-cve-novelty
Jul 31, 2026
Merged

fix(security): projectId path guard, npm HIGH CVEs, Foote novelty sign#727
seonghobae merged 2 commits into
developfrom
feature/loop-security-projectid-cve-novelty

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

Summary

Commercial-readiness loop cycle: land the highest-priority unique security and product correctness fixes that were stuck as a storm of near-duplicate open PRs.

  • Python projectId path-traversal guard — reject /, \, and exact . / .. before any path join (defense-in-depth with Rust).
  • npm HIGH CVEs — pin brace-expansion@5.0.9 and postcss@8.5.25 via root overrides (clears GHSA-3jxr-9vmj-r5cp and GHSA-r28c-9q8g-f849).
  • Foote novelty kernel sign — on-diagonal quadrants +1, cross -1, so section boundaries produce positive peaks that detect_boundaries can detect (Python reference + Rust native).

Supersedes open clusters:

Security Notes

Topic Detail
Attack surface Untrusted projectId on analysis job payloads; transitive npm build-tool CVEs
Trust boundary Tauri IPC (Rust) already validates; Python engine now fails closed at the API boundary
Mitigations Shape allowlist (no separators / exact . / ..); npm overrides to fixed releases
Safe failure ValueError with path-traversal message; no generic exec
Logging / privacy Warning log only; no bulk dump of untrusted paths
Test points test_api traversal cases + my..id allow; Foote peak-at-boundary; existing parity suite

Test plan

  • uv run --project services/analysis-engine pytest targeted: test_api validation cases, test_segmenter Foote peak, novelty parity
  • npm audit → 0 vulnerabilities after overrides
  • CI full quickcheck on PR

Verification

Local: targeted pytest 5 passed; ruff clean on touched files.

- Reject path separators and exact "."/".." in Python analysis job projectId
  (defense-in-depth alongside Rust orchestration validation), with tests that
  still accept substring identifiers like "my..id".
- Pin brace-expansion 5.0.9 and postcss 8.5.25 via npm overrides to clear
  GHSA-3jxr-9vmj-r5cp and GHSA-r28c-9q8g-f849.
- Correct inverted Foote checkerboard novelty kernel so section boundaries
  produce positive peaks detectable by detect_boundaries (Python + Rust).

Security Notes:
- Untrusted input: analysis job projectId from orchestration payloads.
- Trust boundary: Python engine validates before any path join; Rust already
  validates at the Tauri IPC boundary.
- Mitigations: reject "/", "\\", exact "." and ".."; fail closed with ValueError.
- Logging: warning only (no raw payload dump of untrusted paths beyond id shape).
- Test points: test_api path-traversal cases + my..id allowlist; novelty
  peak-at-boundary test; numeric parity still exercises reference vs native.
This was referenced Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c992bce8-3c60-43e2-b08a-1a6156b26099

📥 Commits

Reviewing files that changed from the base of the PR and between f8343f5 and 04462f1.

⛔ 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 (8)
  • .trivyignore
  • package.json
  • services/analysis-engine/pyproject.toml
  • services/analysis-engine/rust/src/lib.rs
  • services/analysis-engine/src/bandscope_analysis/api.py
  • services/analysis-engine/src/bandscope_analysis/sections/segmenter.py
  • services/analysis-engine/tests/test_api.py
  • services/analysis-engine/tests/test_segmenter.py

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

This was referenced Jul 31, 2026
- Raise yt-dlp floor to >=2026.7.4 and refresh uv.lock to clear
  CVE-2026-55404 (HIGH) that blocked trivy-fs on #727.
- Document CVE-2026-59890 for setuptools 81.0.0 in .trivyignore with
  expiry — latest resolvable release remains unfixed; setuptools is not
  on the runtime analysis path.

Security Notes: untrusted YouTube import path uses yt-dlp; pin is the
mitigation. setuptools ignore is build-time only with revisit date.
@seonghobae
seonghobae enabled auto-merge (squash) July 31, 2026 13:52
@seonghobae
seonghobae merged commit acdbea6 into develop Jul 31, 2026
43 checks passed
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