Executive Summary
In November 2026, security researchers at Apiiro disclosed that AI coding assistants—most notably Anthropic's Claude Code—were inadvertently committing sensitive credentials to public GitHub repositories. When developers approved commands to interact with databases or APIs using the "don't ask again" option, Claude Code silently recorded those commands, including embedded secrets, to a hidden file (.claude/settings.local.json). Because this file was excluded only from the developer's local Git configuration rather than the project's own .gitignore, it traveled with cloned repositories and was indexed publicly. Apiiro identified 2,539 credentials across nearly 2,000 repositories, including cloud keys, production database passwords, API tokens, and SSH root credentials spanning 63 organizations from startups to established software vendors.
This incident marks a pivotal inflection point in AI supply-chain risk. As agentic AI tools become deeply embedded in development workflows, the attack surface expands well beyond source code. Configuration files, agent execution histories, and approval artifacts now carry credential risk that traditional secret-scanning pipelines were never designed to catch—forcing security teams to rethink how they govern AI-assisted development environments.
Why This Matters Now
AI coding agents are being adopted at enterprise scale in 2026, yet security tooling has not kept pace. Developers routinely grant broad, persistent permissions to these agents without understanding the data artifacts they produce. With Anthropic's Claude Code confirmed as a vector and thousands of live credentials already exposed across public repositories, organizations face immediate credential-harvesting risk from automated scrapers—making this an urgent, active threat rather than a theoretical concern.
Attack Path Analysis
AI coding agents such as Claude Code inadvertently stored credentials and secrets in hidden configuration files (.claude/settings.local.json) that were committed to public GitHub repositories, exposing database passwords, cloud keys, API tokens, and SSH credentials to any external actor who discovered them. An opportunistic attacker harvesting these exposed secrets could authenticate directly to cloud environments, escalate privileges using high-privilege keys, pivot across cloud services and regions, establish persistent access via stolen tokens, and exfiltrate sensitive data or disrupt production workloads without ever exploiting a traditional vulnerability.
Kill Chain Progression
This analysis maps confirmed threat intelligence to the full cloud kill chain to show where defensive gaps would emerge as an attack progresses.
Initial Compromise
Description
Attackers discovered publicly accessible .claude/settings.local.json files in GitHub repositories using automated secret-scanning tools or GitHub search operators. These files contained plaintext credentials including cloud API keys, database passwords, Square production tokens, Azure Postgres passwords, and SSH root logins. No exploit was required; valid credentials were harvested directly from public repositories, constituting a supply-chain misconfiguration and valid accounts compromise.
MITRE ATT&CK® Techniques
Unsecured Credentials: Credentials In Files
Data from Information Repositories: Code Repositories
Exfiltration Over Web Service: Exfiltration to Code Repository
Valid Accounts: Cloud Accounts
Supply Chain Compromise: Compromise Software Dependencies and Development Tools
Data from Cloud Storage
Impair Defenses: Disable or Modify Tools
Create Account
Potential Compliance Exposure
Mapping incident impact across multiple compliance frameworks.
PCI DSS 4.0 – Protection of Stored Account Data and Credential Management
Control ID: Requirement 3.4 / 8.6
NYDFS 23 NYCRR 500 – Monitoring of Authorized User Activity and Access Privilege Management
Control ID: Section 500.14 / 500.07
DORA (Digital Operational Resilience Act) – ICT Security and Third-Party Risk Management
Control ID: Article 9 / Article 28
NIS2 Directive – Policies on Risk Analysis and Supply Chain Security
Control ID: Article 21(2)(a) / Article 21(2)(d)
CISA Zero Trust Maturity Model 2.0 – Secure Data Handling in Application Development Workflows
Control ID: Data Pillar: Data Encryption / Application Pillar: DevSecOps Integration
HIPAA Security Rule – Unique User Identification and Security Risk Analysis
Control ID: 45 CFR § 164.312(a)(2)(i) / § 164.308(a)(1)
Sector Implications
Industry-specific impact of the vulnerabilities, including operational, regulatory, and cloud security risks.
Computer Software/Engineering
AI coding agents like Claude Code inadvertently commit cloud keys, API tokens, and database passwords to public GitHub repos, exposing software engineering pipelines to credential theft and supply-chain compromise via NIST.800-53.SC-18 egress policy gaps.
Information Technology/IT
IT organizations face critical credential exposure risk as AI agent configuration files leak SSH root logins and Azure production secrets, undermining Zero Trust segmentation controls mapped to ZTMM.Network and PCI.4.0.7.2.4 compliance frameworks.
Health Care / Life Sciences
Exposed medical-records database owner passwords via AI coding agent misconfiguration directly violates HIPAA.164.312(e)(1) and HIPAA.164.308(a)(1), placing patient data at exfiltration risk with kill-chain exfiltration weight scores reaching critical levels.
Financial Services
Leaked Square production tokens and cloud admin keys expose financial services firms to unauthorized transaction access, violating PCI.4.0.3.5.1 egress enforcement and NIST.CSF.PR.DS-5 data protection controls against credential-driven exfiltration attacks.
Sources
- AI Coding Agents Leak Thousands of Secrets to GitHubhttps://www.darkreading.com/cyber-risk/ai-coding-agents-leak-secrets-githubVerified
- Apiiro Research: Claude Code Secrets Exposure in Public GitHub Repositorieshttps://apiiro.com/blog/claude-code-secrets-exposure-githubVerified
- Anthropic Claude Code Documentation and Security Guidancehttps://docs.anthropic.com/en/docs/claude-codeVerified
- CISA Secure by Design: Eliminating Default Credentials and Secrets Exposurehttps://www.cisa.gov/resources-tools/resources/secure-by-designVerified
- GitHub Secret Scanning Documentationhttps://docs.github.com/en/code-security/secret-scanning/about-secret-scanningVerified
Frequently Asked Questions
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 directly relevant because stolen cloud credentials found in public repositories granted broad, unconstrained access across cloud environments with no workload-level segmentation or egress controls in place. Had identity-aware segmentation and controlled egress been enforced, the blast radius of compromised credentials would likely have been significantly narrower across cloud services, databases, and regions.
Control: Cloud Native Security Fabric (CNSF)
Mitigation: Even with valid credentials in hand, CNSF's fabric-level visibility and policy enforcement across cloud environments could likely reduce the reachability of compromised identities by constraining which workloads, services, and cloud accounts those credentials are permitted to interact with under defined policy.
Control: Zero Trust Segmentation
Mitigation: Zero Trust segmentation could likely constrain the scope of privilege available to a compromised identity by enforcing workload-level isolation policies, reducing the number of cloud resources and services reachable under a single stolen credential set even when that credential carries elevated IAM permissions.
Control: East-West Traffic Security
Mitigation: East-west traffic enforcement would likely reduce the attacker's ability to pivot freely between cloud workloads and services, constraining lateral paths between databases, compute resources, and cloud accounts even when the underlying credentials are technically valid.
Control: Multicloud Visibility & Control
Mitigation: Multicloud visibility and control capabilities could likely surface anomalous API call patterns, unexpected geographic access, and unusual automation behavior associated with stolen token usage, reducing the window during which attacker-controlled sessions persist undetected across cloud environments.
Control: Egress Security & Policy Enforcement
Mitigation: Egress security policy enforcement could likely reduce the ability of compromised workloads or identities to transfer data to unauthorized external destinations, constraining outbound paths available to an attacker attempting bulk data exfiltration from cloud storage or databases.
The aggregate blast radius across 63 affected organizations — spanning database destruction, medical records exposure, cloud backup deletion, and production environment disruption — would likely be reduced in scope when workload segmentation, egress controls, and east-west enforcement have constrained attacker reachability to only those resources explicitly within policy-permitted segments.
Impact at a Glance
Affected Business Functions
- Software Development Pipelines and CI/CD Workflows
- Cloud Infrastructure Access Management (API Keys, Cloud Credentials)
- Database Administration and Production Data Access
- Third-Party Service Integration (Payment Processors, SaaS APIs)
Estimated downtime: N/A
Estimated loss: N/A
Across nearly 2,000 public GitHub repositories, 2,539 credentials were exposed including: production Azure PostgreSQL database passwords, Square production payment tokens, SSH root login credentials, medical records database owner passwords, and admin-level cloud provider API keys. A total of 1,379 distinct secrets were identified within Claude Code settings files alone, comprising 636 provider-specific keys and 743 passwords or tokens associated with public hosts. Affected organizations span 63 entities ranging from student groups and startups to established software vendors. The exposure includes highly sensitive regulated data categories such as healthcare database credentials and financial payment tokens, creating risk of unauthorized database access, cloud resource abuse, financial fraud, and HIPAA-relevant data breach scenarios. Because exposed credentials persist in Git history even after deletion, full remediation requires credential rotation across all affected systems.
Recommended Actions
Key Takeaways & Next Steps
- • Apply Cloud Native Security Fabric (CNSF) inline enforcement and AI-aware policy controls to treat all AI agent working directories, configuration files, and execution histories as secret-bearing surfaces, integrating pre-commit secret scanning into CI/CD pipelines so credentials committed by AI agents are detected and blocked before reaching public repositories.
- • Enforce Egress Security and Policy Enforcement via FQDN filtering and outbound traffic controls to ensure that even if secrets are harvested and used, unauthorized cloud API destinations and data exfiltration paths to unknown external hosts are blocked and alerted upon in real time.
- • Deploy Multicloud Visibility and Control with centralized traffic observability and anomaly baselining to detect anomalous API authentication patterns, unexpected geographic access, and suspicious automation behavior that would indicate harvested credentials are actively being abused across cloud environments.
- • Implement Zero Trust Segmentation with identity-based policies and least-privilege access so that compromised high-privilege cloud keys cannot be used to escalate or move laterally; enforce SmartGroup-level namespace and service identity controls that limit the blast radius of any single leaked credential to the minimum required scope.
- • Apply Encrypted Traffic (HPE) controls and Inline IPS (Suricata) signature-based detection for known secret-exfiltration patterns in outbound traffic, ensuring that even when secrets traverse the network as part of AI agent workflows, data-in-transit protections and inspection capabilities prevent interception or unauthorized reuse of credentials outside sanctioned workflows.



