Skip to content

Switch permissions to allowlist model#29

Open
gonpombo8 wants to merge 4 commits intomainfrom
fix/permissions-allowlist
Open

Switch permissions to allowlist model#29
gonpombo8 wants to merge 4 commits intomainfrom
fix/permissions-allowlist

Conversation

@gonpombo8
Copy link
Contributor

Summary

  • Replaces denylist-based bash command gating with an allowlist model
  • Only known read-only/informational commands (ls, cat, grep, git status, npm test, etc.) pass without prompting
  • Everything else — including previously-missed commands like screencapture, osascript, open — requires user confirmation
  • Git add/commit are no longer auto-allowed (require confirmation)
  • Subcommand-level filtering for git and npm (e.g. git status is safe, git push prompts)
  • Unsafe flags on otherwise-safe commands are caught (e.g. sed -i, curl -X POST)

What could break

  • Commands that were previously auto-allowed (like git add, git commit, cp, mkdir, touch) will now prompt for confirmation
  • The agent may feel slower for users who are used to auto-allowing everything — they can use --no-permissions or "Always allow" to restore speed
  • tee and output redirection (>, >>) still caught, but now via the allowlist gap rather than explicit denylist entries

How to test

  • npm test — all 503 tests pass
  • Run opendcl and try safe commands (ls, git status, npm test) — should pass silently
  • Try screencapture, open, rm, git push — should prompt for confirmation
  • Verify "Always allow" still works per-pattern across a session

🤖 Generated with Claude Code

Only known read-only commands (ls, cat, grep, git status, npm test, etc.)
pass without prompting. Everything else requires user confirmation. This
prevents unknown commands like screencapture from silently executing.
…list

# Conflicts:
#	extensions/permissions/utils.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant