Executive Summary

In November 2026, software security firm Apiiro disclosed that Anthropic's Claude Code AI coding assistant was silently persisting plaintext credentials inside a project-level settings file, .claude/settings.local.json, whenever developers selected the 'Yes, and don't ask again' permission option. Across 103,617 public GitHub repositories, researchers identified 1,122 copies of the file containing at least 1,379 distinct secrets, including 379 database passwords, 43 SSH credentials, 42 VCS tokens, and 23 AWS access keys. Because Claude Code adds the file only to a user's global git excludes rather than the project's own .gitignore, the protection fails to travel with repositories, leaving committed secrets permanently accessible in git history and forks. At least one confirmed live credential was found prior to disclosure, and 63 organizations were identified among the affected file owners.

This incident highlights a systemic risk posed by AI-assisted development tooling: implicit trust in convenience features can silently erode credential hygiene at scale. As agentic AI tools become standard in software pipelines, the attack surface for credential harvesting expands dramatically, demanding that security teams extend secret-scanning policies, gitignore governance, and pre-commit controls explicitly to agent configuration and memory files.

Why This Matters Now

Agentic AI coding assistants are now embedded in mainstream developer workflows across thousands of organizations. This exposure demonstrates that a single default behavior in one widely adopted AI tool can passively leak credentials into public repositories at scale, with no attacker action required. Regulatory pressure around software supply chain security and AI governance is intensifying globally, making unaddressed AI tool misconfigurations an immediate compliance and liability risk.

Attack Path Analysis

MITRE ATT&CK® Techniques

Potential Compliance Exposure

Sector Implications

Sources

Frequently Asked Questions

When developers approved shell commands using the 'Yes, and don't ask again' option, Claude Code saved the exact command verbatim—including any embedded passwords or API keys—in the project file .claude/settings.local.json. Because the tool only added this file to the user's global git excludes rather than the project's own .gitignore, it could be committed and pushed to public repositories without triggering standard protections.

Cloud Native Security Fabric Mitigations and ControlsCNSF

Based on the attack progression modeled above, these are the defensive controls that would constrain each stage.

Aviatrix Zero Trust CNSF is relevant here because harvested credentials — though obtained passively from public repositories — required open network paths and unrestricted cloud API reachability to be operationally useful. By enforcing identity-aware segmentation, controlled egress, and east-west flow policies, CNSF would likely have constrained the blast radius even after credentials were exposed, limiting how far adversaries could move and what data they could reach.

Initial Compromise

Control: Cloud Native Security Fabric (CNSF)

Mitigation: Inline inspection of AI agent output artifacts and real-time policy enforcement could have flagged credential-containing configuration files before they propagated outward, reducing the window during which live secrets were publicly accessible and actionable.

Privilege Escalation

Control: Zero Trust Segmentation

Mitigation: Identity-based policy enforcement with least-privilege SmartGroups would likely constrain how far stolen credentials could be leveraged, reducing the privilege scope accessible to an adversary using valid but out-of-context credentials.

Lateral Movement

Control: East-West Traffic Security

Mitigation: East-west segmentation policies enforcing workload-to-workload isolation and inter-region flow controls would likely detect and constrain anomalous service-to-service authentication patterns, reducing the reachability of stolen credentials across internal cloud segments.

Command & Control

Control: Multicloud Visibility & Control

Mitigation: Centralized multicloud traffic observability and policy enforcement could surface anomalous API call patterns and out-of-baseline automation behaviors, reducing the window during which adversaries could establish persistence undetected across cloud control planes.

Exfiltration

Control: Egress Security & Policy Enforcement

Mitigation: FQDN-based egress filtering and outbound traffic policy enforcement would likely constrain unauthorized data transfers to unrecognized external destinations, reducing the number of viable exfiltration paths available to adversaries using stolen cloud and database credentials.

Impact (Mitigations)

Even with credentials already exposed, prior CNSF enforcement across earlier stages would likely have reduced the operational blast radius — limiting how many cloud resources, databases, and downstream repositories adversaries could have reached with stolen secrets before detection.

Impact at a Glance

Affected Business Functions

  • Software Development and CI/CD Pipelines
  • Cloud Infrastructure Access Management (AWS, GitHub, GitLab, npm registries)
  • Database Administration and Data Access (PostgreSQL, MySQL, medical records systems)
  • SSH and Remote Server Administration
Operational Disruption

Estimated downtime: N/A

Financial Impact

Estimated loss: N/A

Data Exposure

Across 1,994 public GitHub repositories, 2,539 secrets were exposed including 379 database passwords (including at least one owner-level password for a medical-records database), 43 SSH credentials for public servers, 42 OAuth and registry tokens for GitHub, GitLab, and npm, and 23 AWS cloud access keys including at least one admin-level key belonging to a database vendor. Secrets were confirmed live in at least one organization at time of disclosure. Additionally, 734 secrets persist in deleted file versions across git history in 509 repositories, and 211 forks of 74 repositories propagate the same secrets as their originals. Affected organizations include 63 entities, predominantly software companies of varying sizes. Data categories at risk include cloud infrastructure credentials, source code repository access tokens, database authentication credentials, remote server login credentials, and potentially regulated health information accessible via exposed medical-records database credentials.

Recommended Actions

  • • Treat all AI agent configuration folders (.claude/, .cursor/, .gemini/) as potential secret stores equivalent to .env files — enforce organization-wide .gitignore templates and pre-commit secret scanning hooks that detect passwords embedded inside shell commands, not only known API key formats, to prevent credential commits before they reach any repository.
  • • Deploy Egress Security & Policy Enforcement (FQDN filtering, outbound DLP) to block unauthorized data transfers initiated by compromised cloud credentials, ensuring that even valid keys harvested from public repositories cannot be used to exfiltrate data to attacker-controlled destinations without triggering policy violations.
  • • Apply Zero Trust Segmentation with identity-based, least-privilege SmartGroup policies so that cloud credentials — even when valid — are only honored from approved workload identities and network contexts, preventing lateral movement from developer endpoints to production databases or cloud management APIs using stolen tokens.
  • • Activate Multicloud Visibility & Control to establish behavioral baselines for cloud API usage and flag anomalous patterns such as credential use from new geographic locations, unexpected IAM role assumptions, or bulk database queries that deviate from normal developer workflows associated with the exposed key identities.
  • • Integrate Cloud Native Security Fabric (CNSF) inline enforcement across CI/CD pipelines and cloud control planes to provide real-time inspection of agentic AI outputs — including configuration files written by coding assistants — ensuring secrets are detected and blocked at the point of artifact creation rather than discovered months later through passive public repository scanning.

Secure the Paths Between Cloud Workloads

A cloud-native security fabric that enforces Zero Trust across workload communication—reducing attack paths, compliance risk, and operational complexity.

Cta pattren Image