fix: add path traversal sanitization to plugin namespaces in setup.sh (t305)#1188
fix: add path traversal sanitization to plugin namespaces in setup.sh (t305)#1188marcusquinn merged 1 commit intomainfrom
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4304d7f to
4c6b0ce
Compare
4c6b0ce to
ec5e581
Compare
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Thu Feb 12 02:40:41 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
Add escalating conflict resolution to rebase_sibling_pr(): 1. Plain rebase (no conflicts) 2. Rebase with -Xtheirs (feature branch wins on conflicts) 3. AI CLI resolution for complex cases (Strategy 3 fallback) Also adds: - resolve_rebase_conflicts() for AI-assisted per-file resolution - Stale worktree cleanup (abort stuck rebases, fix detached HEAD) - Temp worktree creation when no worktree exists (avoids dirty tree) - CONFLICTING added to t298 handler (was only BEHIND/DIRTY) - Phase 7b: periodic retry of merge-conflict-blocked tasks (30min) Tested: resolved 4 blocked PRs (#1171, #1187, #1188, #1191) that were stuck with merge conflicts — all resolved with -Xtheirs.
… (t305) Add sanitize_plugin_namespace() function that uses basename to strip path components and rejects dot-prefixed, empty, or whitespace-containing names. Applied at all 3 plugin namespace usage points: - Namespace collection for preserved dirs (line ~3057) - Disabled plugin cleanup with rm -rf (line ~3279) - Enabled plugin clone path construction (line ~3302) Prevents malicious plugins.json namespace values like '../../../etc/passwd' from causing path traversal in rm -rf or git clone operations. Fixes CodeRabbit finding from PR#762.
ec5e581 to
87d4791
Compare
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Thu Feb 12 02:47:34 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
…1203) Add escalating conflict resolution to rebase_sibling_pr(): 1. Plain rebase (no conflicts) 2. Rebase with -Xtheirs (feature branch wins on conflicts) 3. AI CLI resolution for complex cases (Strategy 3 fallback) Also adds: - resolve_rebase_conflicts() for AI-assisted per-file resolution - Stale worktree cleanup (abort stuck rebases, fix detached HEAD) - Temp worktree creation when no worktree exists (avoids dirty tree) - CONFLICTING added to t298 handler (was only BEHIND/DIRTY) - Phase 7b: periodic retry of merge-conflict-blocked tasks (30min) Tested: resolved 4 blocked PRs (#1171, #1187, #1188, #1191) that were stuck with merge conflicts — all resolved with -Xtheirs.
|



Summary
sanitize_plugin_namespace()function to prevent path traversal attacks via maliciousplugins.jsonnamespace valuesrm -rf), and enabled plugin clone path constructionbasenameto strip path components + regex to reject dot-prefixed/empty/whitespace namesSecurity Fix
A malicious
plugins.jsoncould contain namespace values like../../../etc/passwdwhich would be used unsanitized in:rm -rf "$target_dir/$namespace"(disabled plugin cleanup)git clone ... "$target_dir/$namespace"(enabled plugin deployment)rsync --exclude=$namespace/andtar --exclude=$namespace(namespace preservation)The new
sanitize_plugin_namespace()function:basename(primary defense)., containing.., whitespace, or path separatorsTesting
Fixes CodeRabbit finding from PR#762.