Coding agents are leaking passwords to GitHub: what UAE software teams should check today
New research found thousands of secrets in coding agent settings files on public GitHub. Here is how the leak happens and the five checks your software team should run this week.

Key points
- 01Apiiro research published November 6, 2026 found 2,539 secrets in coding agent files across 1,994 public repositories.
- 02The leak comes from saved command approvals that include passwords or tokens typed into the command.
- 03Common secret scanners missed many of the leaked files.
- 04Rotate exposed credentials first, then fix the files, the ignore rules and the way your team approves commands.
On November 6, 2026, security firm Apiiro published research showing that AI coding agents are leaving passwords and keys in public GitHub repositories, as reported by The Hacker News. The leak comes from a settings file that stores the commands a developer approves.
What changed
When a developer picks "Yes, and don't ask again" for a shell command, Claude Code saves that approval as an allow rule in .claude/settings.local.json. Apiiro found that the saved rule is the exact command, including any password or token typed into it.
Claude Code adds this file to the developer's global git excludes the first time it writes it, according to its documentation. That protection lives on one machine. It does not cover a file created by hand, a file already committed, or a teammate's setup.
- Scale. 2,539 secrets across 1,994 public repositories, counting old versions, forks, the shared settings file and saved agent chat logs.
- Type. Database passwords were the largest group at 379. There were also 43 SSH logins for public servers and 23 AWS keys.
- Detection. Of 1,122 settings files with secrets, neither gitleaks nor TruffleHog flagged 215. Most misses were passwords inside commands.
- Tools. Of 16 coding agents reviewed, Claude Code was the only one confirmed to save the full approved command in a project file by default.
The report did not include a fix or a statement from Anthropic.
Why it matters for UAE businesses
Coding agents are now part of daily work in many software teams. Approval prompts are frequent, and one click saves a rule. That is how a production password ends up in a file nobody reviews.
A leaked database password is a data incident, not a coding issue. It can expose customer records, payments and internal systems. The same risk applies to agencies and contractors who work across many client repositories.
The risk does not stop at public repositories. A private repository today can become public tomorrow, or be cloned to a laptop that leaves the company. Treat these files as secrets wherever they sit.
What to do now
Run these checks this week. We handle this work through SaaS, mobile app and custom software development and Support, maintenance and migrations.
Your next steps
Find the files
Search every repository and its git history for
.claude/settings.local.jsonand.claude/settings.json. Include forks and archived projects.Rotate before you clean
Change every password, token and key those files have held. Deleting the file does not remove it from history or from copies.
Fix the ignore rules
Remove the local file from tracking with
git rm --cachedand add it to each repository's.gitignore. Add it to your organization's.gitignoretemplate.Change how you approve commands
Keep secrets in a secrets manager and pass them as variables. Approve command patterns rather than single commands that contain a password.
Scan agent folders in CI
Add folders such as
.claude/,.cursor/and.gemini/to pre-commit and CI secret scanning, including history. Test that your scanner catches passwords inside commands.
Questions
Does this affect only Claude Code?
Claude Code was the only agent of the 16 reviewed that saves the full approved command in a project file by default. Other agents keep their own folders and memory files, so scan those too.
Our repositories are private. Are we safe?
You are at lower risk, not no risk. Private repositories can be made public, shared with contractors or cloned to personal devices. Rotate any secret you find either way.
Is deleting the file enough?
No. The secret stays in git history and in any fork or clone. Rotate the credential first, then remove the file and update your ignore rules.
Written by
D Consultants team
Software and AI team, Dubai
The people who build and run dconsults.com, our own products atnos, Vline and blaaa, and websites and AI agents for businesses across the UAE.
ProfileMore articles to explore
All articles
AI agents / Dubai approves the City AI Agent initiative: what UAE businesses should prepare nowOn November 18, 2026, Dubai approved the City AI Agent initiative and launched 93 AI agents that handle HR, finance and procurement across 85 government entities. Here is what changed, what is not yet known and how UAE businesses can get one process agent-ready.
AI agents / Dubai approves a City AI Agent: what UAE businesses should prepare nowDubai approved the City AI Agent initiative on November 18, 2026, and launched 93 AI agents for government HR, finance and procurement. Here is what changed, what is not live yet and how UAE businesses can apply the same pattern to one process.
AI agents / Microsoft Ignite 2026 puts AI agents under admin control: what UAE businesses should set up nowMicrosoft opened Ignite 2026 on November 17 with new controls for AI agents: spend limits, cleanup of ownerless agents, free usage insights and Defender protection for coding agents. Here is what is live, what is still in preview and how UAE businesses can act this week.
Tell us what you are building.
Free 30-minute call. We map your workflow, find the highest-impact opportunity and send a clear proposal.
+971 50 807 0826