Skip to main content
150 Secrets Per Developer Machine: What GitGuardian FoundIncident
4 min readFor Compliance Teams

150 Secrets Per Developer Machine: What GitGuardian Found

The Discovery

GitGuardian's analysis revealed an average of 150 secrets per developer machine. These secrets weren't found in repositories or CI/CD logs but on local workstations — hidden in shell histories, config files, IDE caches, and tool directories. Private keys accounted for 38% of the unique secrets discovered.

This is not a theoretical risk. Recent supply chain attacks, such as Shai-Hulud, Megalodon, and Miasma, have specifically targeted developer endpoints to harvest credentials. Attackers compromised the Nx Console developer tool to collect credentials from machines running it. Even GitHub, a company known for secure development practices, was affected by these attacks.

The pattern is clear: your developers' laptops have become high-value targets, and your security controls haven't caught up.

Evolving Threat Landscape

Pre-2020: Supply chain attacks primarily targeted public packages and repositories. Developer endpoints were not systematically targeted.

2020-2022: The rise of AI-assisted coding tools, IDE plugins, and cloud development environments led to credentials being cached and stored in local directories.

2023-2024: Credential-harvesting campaigns emerged. Attackers shifted from injecting malicious code into packages to stealing credentials directly from developer machines. The Nx Console compromise exemplifies this approach: compromise a legitimate developer tool to harvest secrets from machines where it's installed.

Current State: GitGuardian's analysis reveals 150 secrets per endpoint. Security teams focus on scanning repositories and CI/CD pipelines, leaving developer machines as unmonitored secret repositories.

Missing Controls

Endpoint Secret Detection: Developer workstations aren't scanned for exposed credentials. Your secret scanning tools check commits and pull requests but not the .bash_history files, .aws/credentials directories, or IDE cache folders where developers work.

Least Privilege for Development: Developers use production credentials on local machines. They copy production API keys for testing against staging environments and store admin tokens in environment files for troubleshooting.

Credential Lifecycle Management: No rotation occurs when a developer leaves or a machine is compromised. Many of the 150 secrets per endpoint are orphaned credentials from completed projects, still valid and exploitable.

Supply Chain Vetting for Developer Tools: The Nx Console compromise occurred because developer tools are treated differently from production dependencies. You scan your package.json and requirements.txt, but not the VS Code extensions and CLI tools installed daily.

Segmentation Between Development and Production: Developer machines have network access to production systems for "debugging" or "quick fixes." One compromised laptop can become a direct path to production databases and internal APIs.

Compliance Standards

PCI DSS v4.0.1 Requirement 8.2.2: "Interactive login credentials are protected against misuse." Storing unencrypted API keys in shell history or config files violates this control.

PCI DSS v4.0.1 Requirement 12.3.2: "An inventory of system components that are in scope for PCI DSS is maintained and kept current." Developer laptops accessing cardholder data environments are in scope and require the same controls as servers.

ISO/IEC 27001:2022 Annex A.9.4.3: "Management of privileged access rights." Developer credentials that can deploy code or access production data are privileged access and must be controlled and monitored.

NIST 800-53 Rev 5 IA-5(7): "Ensure that unencrypted static authenticators are not embedded in applications or stored in easily accessible function keys." Storing credentials in plaintext .env files on laptops fails this control.

SOC 2 Type II CC6.1: "The entity implements logical access security software, infrastructure, and architectures over protected information assets to protect them from security events." Developer endpoints accessing customer data are "protected information assets." The 150 secrets per machine demonstrate a failure in logical access controls.

Actionable Steps for Your Team

Deploy Endpoint Secret Scanning: Install secret detection agents on developer machines. Tools like GitGuardian, Talisman, or git-secrets can run locally. Configure them to scan not just git commits but shell histories, config directories, and common credential storage locations. Set up alerts when secrets are detected.

Implement Short-Lived Credentials for Development: Replace long-lived API keys with temporary credentials that expire after hours. Use AWS IAM roles, HashiCorp Vault dynamic secrets, and cloud provider workload identity. Grant production access through time-limited sessions, not permanent tokens.

Inventory Your Developer Tools: Create a list of IDE extensions, CLI tools, and development utilities your team uses. Treat this like a software bill of materials (SBOM). When Nx Console was compromised, did you know which developers had it installed? Could you identify affected machines within an hour?

Segment Development Networks: Developer laptops should not have direct network access to production databases or internal APIs. Require VPN or bastion hosts for production access. Log these connections. Provide sanitized datasets in isolated environments for testing against production data.

Rotate Credentials After Developer Offboarding: When a developer leaves, rotate every credential they could have accessed. The GitGuardian analysis proves they stored them — you just don't know which ones.

Monitor for Credential Use from Unexpected Locations: If a production API key is used from a developer's home IP address instead of your CI/CD pipeline, investigate. This catches both compromised credentials and developers who copied secrets to local machines for "convenience."

The 150 secrets per endpoint aren't just a developer problem. They're a control design problem. Your security architecture assumed credentials lived in repositories and CI/CD systems. Attackers know better. Now you do too.

Topics:Incident

You Might Also Like