fix(security): address CodeRabbit critical findings#31
Conversation
- Plugin path traversal: sanitize_plugin_name() rejects .., /, \ - --yes override order: config applied first, --yes takes precedence - Empty model override: filter empty strings in subagent - Redundant format! macro removed
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPermission policy construction now applies config-defined per-tool overrides before evaluating the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Fixes 4 issues found by CodeRabbit:
🔴 Plugin path traversal —
/plugin remove ../../could delete arbitrary dirs. Addedsanitize_plugin_name()rejecting..,/,\.🔴 --yes override — config
tool_permissionswas applied AFTER--yes, overriding it. Now config applies first,--yestakes precedence.🟠 Empty model override — `Some("")" in subagent now falls back to default model.
🟡 Redundant format! — removed unnecessary
format!("{system_prompt}").180 tests pass.
Summary by CodeRabbit
--yesflag.