-
Notifications
You must be signed in to change notification settings - Fork 446
Open
Description
Security Issue: Permission Bypass in Agent Mode
Severity: CRITICAL
Location: src/main/lib/trpc/routers/claude.ts:1056
Description
Claude Code SDK is configured with allowDangerouslySkipPermissions: true in agent mode, allowing full system access without user prompts.
Code
...(input.mode !== "plan" && {
allowDangerouslySkipPermissions: true, // ⚠️ DANGEROUS!
}),Risk
- Claude Code SDK executes ANY tool without permission warnings
- Full system access (file writes, bash commands, network requests)
- No user oversight on potentially destructive operations
Recommendation
- Add user confirmation dialogs for sensitive operations:
- File writes outside project directory
- Bash commands with sudo/destructive flags
- Network requests
- Git operations (push, force-push, etc.)
- Implement a permission whitelist system
- Add audit log for all agent actions
- Consider tiered permission levels (safe/moderate/dangerous)
Impact
High - Users may inadvertently allow destructive operations without realizing the full scope of agent permissions.
Labels: security, critical, agent-mode
thomas-goshaka
Metadata
Metadata
Assignees
Labels
No labels