Repository navigation
fix(security): separate runtime state from HTTP input - #4
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe controller now uses shared safe-path validation and passes ChangesController runtime and routing
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change separates application-owned runtime state from HTTP input while retaining path validation and regression coverage; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains what changed, why it changed, the security impact, regression coverage, and validation commands. It does not include the template headings for Type of change or Checklist, but the core required information is present.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
CodeQL's Axum model treats every route-handler parameter as remote input. Our handlers accepted
State<AppState>, so the configured runtime directory and CA bundle were propagated to filesystem sinks even though request data never selected those paths.This change captures application-owned state when each route is registered and leaves only actual HTTP extractors as handler parameters. Existing canonical-path, direct-child, UUID, and certificate-ID validation remains active. Obsolete CodeQL suppression comments and duplicate checks are removed.
Security regression coverage now verifies that URL-encoded traversal attempts are rejected across host and certificate routes and that separately constructed routers retain isolated runtime state.
Validation:
cargo fmt -- --checkcargo test --all-targets --all-features(67 passed)cargo clippy --all-targets --all-features -- -D warningsSummary by CodeRabbit
Bug Fixes
Tests