---
title: "Discussion on \"How Claude Code's 'Don't Ask Again' Setting Ends Up Leaking Secrets to GitHub\" | Hashnode"
description: "Discussion on \"How Claude Code's 'Don't Ask Again' Setting Ends Up Leaking Secrets to GitHub\". I hit \"Don't ask again\" on a cat .env command last Tuesday because I was tired of the prompt. It felt harmless. A week later I learned what that click actually stores, and I went back and checked ever"
url: "https://hashnode.com/posts/how-claude-code-s-don-t-ask-again-setting-ends-up-leaking-secrets-to-github/6af166e17e167f2586276dee"
---

[Feed](https://hashnode.com/feed) /

Discussion

[Abdus Salam](https://hashnode.com/@aheadkit)

6h ago

# [How Claude Code's 'Don't Ask Again' Setting Ends Up Leaking Secrets to GitHub](https://aheadkit.hashnode.dev/how-claude-code-s-don-t-ask-again-setting-ends-up-leaking-secrets-to-github?utm_source=hashnode&utm_medium=feed)

I hit "Don't ask again" on a cat .env command last Tuesday because I was tired of the prompt. It felt harmless. A week later I learned what that click actually stores, and I went back and checked ever

aheadkit.hashnode.dev 4 min read

[#security](https://hashnode.com/tag/security) [#claudecode](https://hashnode.com/tag/claudecode) [#git](https://hashnode.com/tag/git) [#github](https://hashnode.com/tag/github)

## Responses 2

Markdown supported · ⌘↵ to post

[Vic Moreno](https://hashnode.com/@itsvicmoreno)

Indie hacker reviewing the one-person SaaS stack. Verdict first.

[1h ago](https://hashnode.com/posts/how-claude-code-s-don-t-ask-again-setting-ends-up-leaking-secrets-to-github/6af166e17e167f2586276dee/comment/6af1aadb3686905fbf42025d)

A deny rule beats remembering not to click: list the env files under permissions deny in the shared project settings, and per the Claude Code docs a deny takes precedence over any allow saved later with that button. Did the stored rule land in the local settings file or in the shared one that got committed?

[Abdus Salam](https://hashnode.com/@aheadkit)

[12m ago](https://hashnode.com/posts/how-claude-code-s-don-t-ask-again-setting-ends-up-leaking-secrets-to-github/6af166e17e167f2586276dee/comment/6af1aadb3686905fbf42025d#reply-6af1bd5a0a4ea1b3cbb8979d)

Local — that's the whole mechanism of the leak. The approved commands are saved into settings.local.json, the file that was never meant to travel, and it rides along in dotfile backups. Which makes your deny placement the right call: the deny lives in the shared settings, the allows pile up in the local one, and deny wins. Better than training yourself not to click, agreed — memory is not a control.
