[BUG] wildcard permission should not allow unrelated commands
Status Closed — not planned
Reported on v2.1.47
Maintainer reply None cached
Activity 4 comments · opened Feb 19, 2026 · closed Mar 20, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
"Bash(cat:*)" in permissions.allow seems to allow something like "cat && unsafe-command-here"
What Should Happen?
"Bash(cat:*)" should not allow "unsafe-command-here" unless that is also in the allow permissions.
Error Messages/Logs
Steps to Reproduce
This is dependent on the AI picking what commands to do. Recently it seems to run multiple unrelated commands together to save time.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.47 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗