July 2026 Summaries
1 posts from Lakera
Filter
Month:
Year:
Post Summaries
Back to Blog
Claude Code's permission model, designed for managing shell command execution, can inadvertently lead to sensitive credential exposure when its settings file, .claude/settings.local.json, is included in npm packages. This file, which records approved shell commands and any embedded credentials, is often overlooked due to its inconspicuous nature and lack of default exclusion in npm's publish process. A study monitoring approximately 46,500 npm packages found that 428 contained this settings file, with 33 of those containing sensitive credentials such as npm authentication tokens, GitHub personal access tokens, and Telegram Bot API tokens. The issue arises from developers allowing permanent command approvals during development, which can embed sensitive information into the file. To prevent such exposures, developers are advised to add .claude/ to their .npmignore and .gitignore files, ensuring that this settings file is excluded from published packages and version control, and to rotate any credentials that have already been exposed.
Jul 23, 2026
810 words in the original blog post.