Skip to content

fix: skip Claude permissions by default (with opt-out for safety mode)#14

Merged
ethanplusai merged 1 commit into
mainfrom
fix/skip-permissions-default-on
May 15, 2026
Merged

fix: skip Claude permissions by default (with opt-out for safety mode)#14
ethanplusai merged 1 commit into
mainfrom
fix/skip-permissions-default-on

Conversation

@ethanplusai
Copy link
Copy Markdown
Owner

Summary

PR #11 was a great security hardening, but it bundled a behavior change that doesn't fit JARVIS's UX: it flipped the default for `--dangerously-skip-permissions` from always on to off unless JARVIS_SKIP_PERMISSIONS=true. For a voice-driven assistant, Claude's interactive permission prompts have no UI surface — subprocess calls silently hang.

This PR keeps the env var as an opt-out toggle but flips its default back so JARVIS works out of the box.

All security improvements preserved

The actual injection fixes from #11 — proper AppleScript escaping in 9 call sites, the shared `applescript_escape()` helper, and the unit tests — are unaffected. This commit only touches one line per file (4 files) plus the doc comment in `.env.example`. The escape work is the real security win and it stays.

Behavior table

`JARVIS_SKIP_PERMISSIONS` Effective behavior
unset (default) Skip permissions ✅ — works out of the box
`true` / `1` / `yes` Skip permissions
`false` / `0` / `no` Require prompts (interactive Terminal mode only)

Test plan

  • All 34 tests pass: `python3 -m pytest tests/`
  • Behavior verified across 9 env var values (unset, "true", "TRUE", "1", "yes", "false", "FALSE", "0", "no") — all behave correctly
  • No conflicts with main

🤖 Generated with Claude Code

PR #11 (the AppleScript injection hardening) flipped the default for
--dangerously-skip-permissions from "always on" to "off unless
JARVIS_SKIP_PERMISSIONS=true is set." That was a defense-in-depth
addition bundled with the injection fixes, but it's an awful default
for a voice-driven assistant: Claude's interactive permission prompts
have no UI surface in JARVIS, so subprocess calls silently hang
waiting for input nobody can give.

This commit keeps the env var as an opt-out toggle but flips its
default back to "skip permissions = true", so JARVIS works out of the
box. All the injection escapes from #11 are preserved — the actual
security win (proper string escaping in AppleScript interpolation) is
unaffected.

Truth table:
  unset                       -> skip = True   (default, works OOTB)
  JARVIS_SKIP_PERMISSIONS=true -> skip = True
  JARVIS_SKIP_PERMISSIONS=1    -> skip = True
  JARVIS_SKIP_PERMISSIONS=false-> skip = False  (opt-in to prompts)
  JARVIS_SKIP_PERMISSIONS=0    -> skip = False
  JARVIS_SKIP_PERMISSIONS=no   -> skip = False

Updated .env.example comment to reflect the new default.
@ethanplusai ethanplusai merged commit df3044f into main May 15, 2026
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