-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Source
ChatGPT security review feedback
Problem
validate_tool_path contains a #[cfg(test)] block that returns Ok(()) if SELFWARE_TEST_MODE is set, bypassing all path validation. Even under cfg(test), this normalizes the idea that safety checks are optional and is the kind of thing a security reviewer will screenshot.
Fix
Option A (recommended):
- Delete the env var bypass entirely
- For tests, inject a
SafetyConfigwith an allowlist rooted in a temp dir - If E2E fixtures need bypass, hard-restrict to
tests/e2e-projects/with a compile-time flag
Option B (next-level — capability-based filesystem):
- Introduce a
WorkspaceRootcapability (likecap-stdstyle) - Require every file tool to operate relative to it
- Path validation becomes structural — escaping is impossible by design
Priority
P0 — credibility multiplier before public push
Labels
security, P0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request