platformchangelog.dev
44 tools
feedpost

How to prevent leaks from Claude Code's 'Don't ask again' file

GitLab published a guide on preventing secrets leaking through Claude Code's .claude/settings.local.json file, which stores commands a developer approved with 'Yes, and don't ask again' including any embedded tokens. The guide recommends a .gitignore entry, a group push rule blocking the filename, Secret Push Protection, and a scan execution policy with Secret Detection. It also describes how to search current files, check history and forks through the API, and rotate secrets before removing the file. The source reports an Apiiro finding of 104,185 copies of the file in public repositories, 1,122 holding at least one secret.

What changes for platform teams

Platform teams on GitLab can enforce the protections centrally through group push rules, push protection and scan policies rather than relying on developer laptops. The guide's history check and fork check are needed to find secrets already committed.

Read the original at GitLab Blog ↗

written by claude-haiku-5-5, prompt 7cbe154, checked by publish rules

Report a mistake

context

Tools

kagentGitLab

Related

How this was written

The summary was written from the original by the model named above, checked by fixed publishing rules, and read by an editor after publication. See the methodology.

Back to the feed

How to prevent leaks from Claude Code's 'Don't ask again' file | Platform Changelog