Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Support fine-grained per-command permission rules for bash tool invocations

Open territov opened this issue 9 months ago • 3 comments

Summary: Claude Code supports declarative allow/ask/deny permission rules that match specific bash commands via pattern matching (e.g., Bash(my-cli read *)). This lets teams ship a project-level config that auto-approves safe read-only CLI commands while requiring confirmation for mutating ones. Kiro has no equivalent — /trust is all-or-nothing for bash execution.

Problem: When building CLI tools designed for agentic use, some commands are always safe (reading data, listing resources) while others are risky (updating configurations, deleting resources). Today in Kiro, users must either:

  1. Trust all bash execution (unsafe for destructive commands), or
  2. Approve every single bash invocation (friction kills the agentic workflow)

There's no middle ground.

Proposed Solution: Support permission rules in a project-level config (e.g., .kiro/settings.json) with pattern matching on bash commands:

json { "permissions": { "allow": ["Bash(my-cli list *)", "Bash(my-cli get *)"], "ask": ["Bash(my-cli update *)", "Bash(my-cli run *)"], "deny": ["Bash(my-cli delete *)"] } }

Evaluation order: deny → ask → allow → default (prompt).

Why this matters:

  • CLI tools are the most common integration layer for developer tooling
  • MCP adoption is still early; bash is the universal interface
  • This is table stakes for agentic workflows — Claude Code already ships it
  • Teams can commit permission configs to their repo so everyone gets the right safety defaults

Prior art: Claude Code's settings.json permission system with Bash(pattern *) syntax. See: https://code.claude.com/docs/en/settings#permission-settings

territov avatar Feb 06 '26 23:02 territov

🤖 Potential Duplicate Detected

This issue appears to be similar to:

What happens next?

  • ⏰ This issue will be automatically closed in 3 days
  • 🏷️ Remove the duplicate label if this is NOT a duplicate
  • 💬 Comment on the original issue if you have additional information

Why is this marked as duplicate? Both issues request fine-grained permission controls for bash commands - the new issue proposes a general pattern-matching system while #5207 specifically requests allowing read-only git commands. They address the same core problem of needing selective bash command permissions rather than all-or-nothing trust.

github-actions[bot] avatar Feb 06 '26 23:02 github-actions[bot]

This issue has been automatically closed as it appears to be a duplicate of #5207.

If you believe this is incorrect, please comment on this issue and a maintainer will review it.

github-actions[bot] avatar Feb 10 '26 00:02 github-actions[bot]

Thank you for your feedback! 🙏

The duplicate label has been removed and this issue has been sent back for maintainer review.

A maintainer will review this issue shortly.

github-actions[bot] avatar Feb 20 '26 15:02 github-actions[bot]