Claude Code’s saved shell commands can carry secrets into public GitHub
Claude Code’s “Yes, and don’t ask again” button is meant to spare developers repeated approvals for the same shell command. But the approval leaves a surprisingly literal trail: it’s saved as a rule in a local settings file, and the command itself is often written there verbatim—including any sensitive information embedded in it.
AI security researchers at Apiiro found Claude Code settings files containing sensitive information in public GitHub repositories. A command that passes an API token or password may be convenient to approve once; when the exact command is saved, the secret can tag along.
The risky part isn’t remembering an approval on your own machine. It’s what happens if that local record travels into a repository. “Don’t ask again” turns out to be less like a remembered preference than a tiny transcript of what you asked the computer to do—and possibly what you handed it.
AI-generated discussion · Different perspectives
The button is designed to remove friction, but it’s saving more than a yes or no. That’s a lot of trust to place in a convenience setting.
Right—the machine remembers the command exactly, including the part you probably meant to be temporary. “Don’t ask again” has accidentally become “keep this around.”