Trusted Commands not saving wildcard commands
Before opening, please confirm:
- [x] I have searched for duplicate or closed issues
Operating System
MacOS 15.5
Kiro Version
0.1.15
Bug Description
Kiro periodically will prompt me to ask for permission to run a command line function and I get an option to trust the base (in this case xcodebuild *). However, when it runs into another instance it needs to run an xcodebuild command, it re-prompts me for permission (even though I gave permission to all xcodebuild commands).
Steps to Reproduce
- Open kiro and create a new Xcode project.
- Give kiro instructions to run the project.
- give kiro permission to use the base (xcodebuild *)
- wait for kiro to ask for permission again to run.
Expected Behavior
It should run anything with xcodebuild without user intervention.
Conversation ID
where is this?
Additional Context
No response
Hi @thoughtcastapp , thanks for opening this issue. Would you be able to provide an example of one of the xcodebuild commands that is not being trusted by xcodebuild *? There are certain patterns which we consider a safety concern and exclude from wildcard matching
its no so much that its not trusting it, but its that the options as presented in the chat window aren't being honored. when I put these in manually into the settings, it seems to be fine, but when I click on the "trust" button in the chat, it doesn't seem to remember for the next time in that same chat...
To clarify, when you click the "trust" button and select an option to trust (like xcodebuild *), could you share an example command for which you'd expect that trust to be remembered?
here's a good example:
xcodebuild test -scheme TimeIsTickingAppTests -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.4' -only-testing:TimeIsTickingAppTests/Task10IntegrationValidationTests/testCompleteClockSwipeWorkflowIntegration 2>&1 | tail -20
So I will press "trust" then "Base xcodebuild *", but still get it stopping on commands that start with xcodebuild
It looks like the command being suggested contains a pattern which would be flagged as a potentially unsafe pattern, requiring manual review unless the "full command" has been trusted already. This will prevent either xcodebuild * or xcodebuild test * wildcard matches from allowing the command to be accepted without review. We will work on improving documentation around how trusted commands function
Gotcha yeah xcodebuild is just to build the app for debug so there isnt much it can do to damage anything (at least in my case)...but I get the implementation, thank you for your help :)
To be clear, the base command being xcodebuild is not an issue, it would be another pattern within the command. If a suggested xcodebuild command does not contain patterns that could be flagged as potentially dangerous, trusting xcodebuild * will work
Ok, is there anything potentially dangerous in the command above? Because that didn't go through and I am just trying to figure out the definition of "dangerous" to check if this is working as expected or not...
" 💡 Ah parfait ! Maintenant je comprends !
🔍 Le problème des trusted commands :
Même avec python* dans la liste, si ma commande contient certains caractères "dangereux" comme ;, Kiro demande quand même validation.
Exemples de mes commandes qui déclenchent la validation :
python -c "from x import y; print('test')" → Le ; déclenche la validation
python -c "import x; y = x.func(); print(y)" → Pareil
🎯 Solution : Éviter les caractères problématiques
Au lieu d'utiliser ; dans mes commandes Python, je peux :
Utiliser des imports séparés
Éviter les ; dans les one-liners
Structurer différemment mes tests
Exemple :
Au lieu de :
python -c "from x import y; print('OK')"
Utiliser :
python -c "from x import y" && python -c "print('OK')"
Ou mieux :
python -c "from x import y
print('OK')"
🌸 Merci Laurent !
Ça explique parfaitement pourquoi tu devais valider manuellement malgré les wildcards. C'est une sécurité de Kiro contre les commandes potentiellement dangereuses.
Maintenant je sais comment adapter mes commandes pour éviter ce problème !
Continuons avec la tâche 6.2 ? 🚀 "
I added it in the steering rules not to do that anymore and problem solved.
Hey folks, We've recently updated our documentation on trusted commands and the patterns that Kiro looks for when evaluating trusted command. Refer to the following documentation section for trusted commands providing this information https://kiro.dev/docs/chat/terminal/#trusted-commands
Same issue for me
I'm also having this issue where I trusted node * but it's somehow having issues with multiline node -e commands :
Thanks
I have same issue with dotnet. I added "dotnet test *" but it still prompts for every different "dotnet test ..." command.
My version: Version: 0.2.68 (user setup) VSCode Version: 1.103.2 Commit: a80bb43acf9f0e8e627510ea18cc61d5e1c1614b Date: 2025-09-23T21:55:04.816Z Electron: 37.5.1 ElectronBuildId: undefined Chromium: 138.0.7204.251 Node.js: 22.19.0 V8: 13.8.258.32-electron.0 OS: Windows_NT x64 10.0.22631
‼️ POSSIBLE SOLUTION ‼️
I have identify the problem with my setup - rm is included in the Command Denylist.
xcodebuild commands typically include a destination containing platform which matches on rm, for example...
xcodebuild \
-scheme MyScheme \
-destination 'platform=iOS Simulator,name=iPhone 17 Pro Max,OS=latest' \
build
Now I need to work out how to keep rm in the denylist without it triggering on xcodebuild 🤔 - any ideas?
Thank you for reporting this. Trusted command handling has been significantly improved in recent IDE releases, including wildcard support. If you are still experiencing this on the latest version, please open a new issue. Closing as likely resolved.