Skip to content

feat: subcommand-level allowlist for --enable-commands#218

Open
EricYangTL wants to merge 2 commits intosteipete:mainfrom
EricYangTL:feat/subcommand-allowlist
Open

feat: subcommand-level allowlist for --enable-commands#218
EricYangTL wants to merge 2 commits intosteipete:mainfrom
EricYangTL:feat/subcommand-allowlist

Conversation

@EricYangTL
Copy link

Extend --enable-commands to support dotted subcommand paths (e.g., gmail.search, gmail.drafts.create) in addition to top-level commands.

Top-level entries like 'gmail' remain backward-compatible and allow all subcommands. Dotted entries restrict to specific subcommand paths. My specific use case here is to enable gmail drafts but not sends, which is not available with top-level allowlist.

Examples:
--enable-commands='gmail.search,gmail.drafts.create,calendar'
--enable-commands='gmail.search,gmail.get,gmail.labels'

Refs #110 (related: per-service scope control for agent sandboxing)

Extend --enable-commands to support dotted subcommand paths (e.g.,
gmail.search, gmail.drafts.create) in addition to top-level commands.

Top-level entries like 'gmail' remain backward-compatible and allow
all subcommands. Dotted entries restrict to specific subcommand paths.

Examples:
  --enable-commands='gmail.search,gmail.drafts.create,calendar'
  --enable-commands='gmail.search,gmail.get,gmail.labels'

Refs steipete#110 (related: per-service scope control for agent sandboxing)
@steipete
Copy link
Owner

steipete commented Mar 8, 2026

Compared against #173 and #366, this looks like the cleaner runtime-policy path. It solves the concrete dotted subcommand allowlist gap in the existing enabled_commands flow, while #366 is a separate compile-time safety mechanism. If stock gog wants one runtime restriction feature, I would keep this one and drop #173.

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.

2 participants