You can use Touch ID for sudo
16 points by modulovalue
16 points by modulovalue
I'm not sure what commands you need sudo for, but if you trust your agents with it then running sudo visudo and adding this to the bottom:
# Replace last term with your target command.
agent_user ALL = (ALL) NOPASSWD: /usr/bin/gdb
will give your agents access to run just that command without being prompted. This is in addition to the Touch ID solution; it addresses y-fatigue by prompting you only for fingerprints when the agent is running something you haven't explicitly approved of in advance.
This year I've gotten into the habit of only running LLMs in containers which has been a nice alternative to worrying about it affecting my host OS.
If you don't trust the agent with full root, giving it the ability to run gdb as root is not any safer.
Agents aren’t malicious humans and guardrails aren’t the same as security.
While it often isn't malicious, it can "unknowingly" delete files you don't want it to, like rm -rf $STEAM_ROOT/appcache. If sudo or gdb is needed for debugging, a VM will give the agent all the access it wants.
I block Bash access and make it use Bun Shell. Works a treat for these cases. One I encountered was echo "$text" | jq ... which preprocesses \n (at least on my mac) and then jq doesn't like literal ␊. Not in Bun Shell!
Weird. This just works out for the box on Linux. I wonder why it requires all that setup on Mac.