Recent research reveals systemic risks from leaked non-human identities in container images and repositories, with real-world breaches demonstrating how machine credentials create persistent attack vectors.

Security researchers recently analyzed over 10,000 Docker Hub container images and discovered a troubling pattern: production API keys, cloud tokens, CI/CD credentials, and AI model access tokens routinely leak into public repositories. These non-human identities (NHIs)—machine-to-machine credentials like service accounts and workload identities—power modern development pipelines while creating invisible security risks.
Why Machine Identities Become Attack Vectors
Non-human identities differ fundamentally from human accounts. They authenticate applications and automated services with broad privileges, often without expiration dates or multi-factor authentication requirements. Three high-profile incidents demonstrate the consequences:
The Snowflake Compromise (2024)
Attackers used credentials harvested from historical infostealer malware to access 165 customer environments, including AT&T and Santander systems. These NHIs lacked basic security controls despite protecting sensitive corporate data.Home Depot's Year-Long Exposure (2024-2025)
A single GitHub access token with broad repository and cloud infrastructure access remained active for over 12 months after accidental exposure. Despite external warnings, the credential wasn't revoked until media involvement forced action.Red Hat GitLab Breach (2025)
Consulting repositories containing architectural diagrams and embedded credentials became unintended credential stores. Attackers exfiltrated material that provided authentication pathways into customer environments.
The NHI Exposure Breakdown
Analysis of leaked container images revealed these live credentials:
| Category | Count | Examples |
|---|---|---|
| AI | 191 | Grok/Gemini API keys |
| Cloud | 127 | AWS/Azure/GCP secrets |
| Database | 89 | Postgres/MongoDB credentials |
| API Tokens | 157 | Third-party service keys |
| CI/CD Systems | 44 | GitHub/Docker tokens |
| Payment | 21 | Stripe/Razorpay keys |
Structural Challenges in NHI Management
These incidents reveal systemic issues in credential management:
- Persistence Problem: Machine identities often outlive their creators, remaining active years after initial deployment
- Silent Access: Compromised NHIs bypass detection by mimicking legitimate automation traffic
- Broad Privileges: Service accounts frequently have excessive permissions across environments
- Documentation Creep: Credentials embedded in architectural diagrams and config files create unintended exposure
Practical Defense Strategies
Security teams should implement these controls based on lessons from recent breaches:
Treat NHIs Like Human Identities
- Enforce least-privilege access policies
- Implement mandatory rotation schedules (90-day maximum lifespan)
- Apply behavioral monitoring for anomalous activity
Shift Left Secret Detection
- Integrate automated scanning in IDEs and CI/CD pipelines
- Block commits containing potential credentials
- Use pre-commit hooks with tools like Git Secrets
Adopt Ephemeral Credentials
- Replace static keys with OAuth 2.0 Device Authorization Flow
- Implement cloud-native solutions like AWS IAM Roles Anywhere
- Use workload identity federation (Google Cloud, Azure)
Continuous Public Exposure Monitoring
- Regularly scan public repositories and container registries
- Establish automated revocation workflows
- Monitor underground forums for credential leaks
Credential Lifecycle Governance
- Maintain centralized NHI inventory
- Automate deprovisioning during employee offboarding
- Conduct quarterly entitlement reviews
As NIST Special Publication 800-204 notes, 'The management of machine identities has become as critical as human identity management in cloud-native systems.' Organizations that fail to implement structured NHI governance risk joining the growing list of breach statistics.

Comments
Please log in or register to join the discussion