قالت شركة الأمن البرمجي Apiiro إن خيار «Yes, and don't ask again» في Claude Code ممكن يحفظ الأمر اللي وافقت عليه حرفيًا، ومعه أي كلمة مرور أو مفتاح كتبته داخله، في ملف اسمه .claude/settings.local.json داخل المشروع، حسب The Hacker News في 7 نوفمبر. وكرّر الباحثون المشكلة نفسها على أحدث النماذج.
ولقت Apiiro في المستودعات العامة على GitHub 104,185 نسخة من هذا الملف، منها 1,122 نسخة فيها سر واحد على الأقل، والمجموع 1,379 سرًا مختلفًا. وأكثر من ثلثها يفتح قواعد بيانات مباشرة، منها 379 كلمة مرور لقواعد بيانات، إضافة إلى 43 دخول SSH و42 رمزًا لـ GitHub وGitLab وnpm و23 مفتاح AWS. والشركة ما اختبرت إذا الأسرار لسا تشتغل، لكن شركة وحدة بلّغها الباحثون أكدت إن مفتاحها كان شغّال.
وClaude Code يضيف الملف لإعدادات git العامة عند المستخدم على جهازه، لكن هذي الحماية ما تنتقل مع المشروع، ولا تفيد لو الملف موجود من قبل في سجل git. وفيه 215 ملفًا فيها أسرار ما لقطها لا gitleaks ولا TruffleHog، وهي أدوات لفحص الأسرار، لأن أغلب اللي فاتها كلمات مرور مكتوبة داخل أوامر.
ونصيحة الباحثين: غيّر أول شي كل كلمة مرور ومفتاح كان في الملف، وبعدين نظّف. أوقف تتبّع الملف بالأمر git rm --cached وأضفه إلى .gitignore الخاص بالمشروع، وامسح من نسختك المحلية أي قاعدة فيها سر، واستخدم متغيرات مثل $DB_URL بدل كتابة الأسرار في الأوامر، ووافق على أنماط أوامر بدل أوامر كاملة. وتقول Apiiro إن أربعة بلاغات سابقة عن المشكلة أغلقها بوت آلي بدون رد من Anthropic.
Security company Apiiro says Claude Code's "Yes, and don't ask again" option can save the approved command word for word, including any password or key typed into it, in a project file called .claude/settings.local.json, The Hacker News reported on 7 November. The researchers reproduced the behaviour with the latest models.
Apiiro found 104,185 copies of the file on public GitHub; 1,122 of them hold at least one secret, 1,379 different secrets in total. More than a third open a database directly, including 379 database passwords, plus 43 SSH logins, 42 tokens for GitHub, GitLab and npm, and 23 AWS keys. Apiiro did not test whether the secrets still work, but one company it notified confirmed its key had been live.
Claude Code adds the file to the user's global git excludes on their own computer, but that protection does not travel with the project and does nothing for a file already in git history. The secret scanners gitleaks and TruffleHog both missed 215 of the files with secrets, mostly because they were passwords typed inside commands.
The researchers' advice: rotate every password and key the file has ever held first, then clean up. Stop tracking the file with git rm --cached and add it to the project's own .gitignore, delete any rule with a secret from your local copy, refer to secrets as variables such as $DB_URL instead of typing them into commands, and approve command patterns rather than full commands. Apiiro says four earlier reports about the issue were closed by an automated bot without a reply from Anthropic.
وش يعني لك؟What it means for you
لو تستخدم Claude Code، افتح ملف .claude/settings.local.json في مشاريعك وامسح أي أمر فيه كلمة مرور أو مفتاح، وأضف الملف إلى .gitignore الخاص بالمشروع. ولو سبق ورفعته على GitHub، غيّر كل مفتاح كان فيه قبل أي تنظيف.If you use Claude Code, open .claude/settings.local.json in your projects, delete any command that contains a password or key, and add the file to the project's own .gitignore. If you have already pushed it to GitHub, rotate every key it held before cleaning up.
المصدرSource: The Hacker News · 7 Nov 2026 ↗
كتبنا الخبر بأسلوبنا اعتمادًا على المصدر الأصلي. للتفاصيل الكاملة ارجع للمصدر.Written in our own words from the original source. See the source for full details.