Support fine-grained per-command permission rules for bash tool invocations
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:
- Trust all bash execution (unsafe for destructive commands), or
- 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
🤖 Potential Duplicate Detected
This issue appears to be similar to:
- #5207: Allow read-only git commands in Plan Agent (85% similar)
- #5071: Feature Request: Subagent tool approval improvements (85% similar)
- #4962: Allow trustedCommands wildcards in the middle of command strings and within command words (85% similar)
- #4743: Trusted Commands is not working. (85% similar)
- #4317: Prompts to add trusted command should include more granular options (85% similar)
What happens next?
- ⏰ This issue will be automatically closed in 3 days
- 🏷️ Remove the
duplicatelabel 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.
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.
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.