Skip to content
D Consultants

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.

Published 4 min readD Consultants team
Stacked translucent panels with a small glowing key slipping through a gap as a curved shield of light closes it
Share this article
Summarize with AI

Key points

  1. 01Apiiro research published November 6, 2026 found 2,539 secrets in coding agent files across 1,994 public repositories.
  2. 02The leak comes from saved command approvals that include passwords or tokens typed into the command.
  3. 03Common secret scanners missed many of the leaked files.
  4. 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.

The findings, as reported:

  • 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

  1. Find the files

    Search every repository and its git history for .claude/settings.local.json and .claude/settings.json. Include forks and archived projects.

  2. 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.

  3. Fix the ignore rules

    Remove the local file from tracking with git rm --cached and add it to each repository's .gitignore. Add it to your organization's .gitignore template.

  4. 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.

  5. 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.

Tags:software securityAI coding agentssecrets managementGitHubUAE business
Share this article

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.

Profile

More articles to explore

All articles

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