In April 2026, a GCP service account key was accidentally committed to a git repo. A routine push, a credentials file that should have been gitignored. By May 9 — 41 days later — a Bulgarian IP address was using it to spin up a cryptomining VM fleet. We discovered it on May 23.
The lateral movement audit showed zero access to pre-existing production VMs. The VMs spun up were net-new, isolated, and caught before they ran long. But 41 days of exposure is 41 days. And the response — auditing 54 secrets in Secret Manager, adding gitleaks CI scanning across 4 repos, reviewing access logs — surfaced a more important architectural insight about AI infrastructure specifically.
The proxy layer is where your AI credentials live. That makes it your security control plane — not just a routing hop.
Timeline:
The attacker's behavior was straightforward: spin up high-CPU VMs, run a miner, move on before discovery. There was no evidence of lateral movement to existing production infrastructure. The compromised key's IAM permissions were scoped to Compute Engine instance creation — not to storage, databases, or secrets.
Scope limitations saved us. But we got lucky on scope. That's not a strategy.
This is the diagnostic gap that stings most. GCP Data Access audit logs (ADMIN_READ, DATA_READ, DATA_WRITE) were not enabled on the affected project during the 41-day window.
Result:
The response: Data Access logs are now enabled across all production projects. The cost is approximately $8/month in log storage for our traffic volume. The cost of not having them, measured in uncertainty during an incident, is not worth comparing.
Enable audit logging before the incident. Not after.
In AI infrastructure, there are two credential tiers:
Provider keys: sk-ant-api03-..., sk-proj-..., Gemini API keys. These are raw API keys issued by Anthropic, OpenAI, Google. If leaked, they provide unrestricted access to your account — unlimited spending, all models, no budget caps, no audit trail at the provider level beyond their own billing dashboard. A leaked provider key is a full-access credential to an account that can accumulate five-figure charges in hours.
Virtual keys: Keys issued by your AI proxy (in Trimio's case, trimio-vk-...). Your application code sends requests to the proxy using the virtual key. The proxy holds the real provider key. If a virtual key leaks:
This isn't a novel idea — it's the same principle as database connection poolers, OAuth access tokens, or any other credential indirection layer. The point is that the proxy is the natural place to implement it for AI, because the proxy already sits in the request path.
Your application code should never see a raw Anthropic or OpenAI API key. It should see a virtual key. The proxy resolves the virtual key to the provider key at routing time, inside a trusted boundary.
The same week (TechCrunch, May 21, ~175 HN points): scammers were found abusing an internal Microsoft account to send spam. The mechanism was different — social engineering or phishing to compromise the account — but the structural problem is identical: a credential at the infrastructure layer was compromised and used for unauthorized resource consumption.
Cryptomining VMs, spam campaigns, LLM inference at scale — they're all the same attack pattern: gain access to a credential that authorizes resource consumption, consume resources before detection. The cost of detection latency is proportional to how much the credential can authorize.
A virtual key with a $500/month budget cap means the maximum exposure from a leaked credential is $500. A raw provider key with no cap means the maximum exposure is "however much Anthropic will let you spend before their fraud detection fires."
The response to the incident included adding gitleaks scanning across all 4 active repos. Implementation:
.github/workflows/gitleaks.yml — scans every push and every PR:
name: gitleaks
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
.pre-commit-config.yaml — catches it before the push even happens:
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
Why gitleaks instead of GitHub Advanced Security (GHAS) secret scanning? GHAS requires a paid GitHub plan. gitleaks is open-source, runs identically in CI and locally, and has a well-maintained ruleset covering 150+ credential patterns including all major AI provider key formats (sk-ant-, sk-proj-, AIza, etc.).
The pre-commit hook is the higher-value gate: it fires before the secret ever leaves the developer's machine. The CI check is a safety net for the cases where the hook wasn't installed or was bypassed. You want both.
Actions in rough priority order:
.env, *credentials*.json, *service-account*.json, and similar patterns are in the root .gitignore across all repos.None of this is exotic. Most of it should already be in place. The Trimio incident happened because a developer committed a credentials file that wasn't gitignored, and there was no CI gate to catch it. Both gaps are now closed. The cost of closing them: one afternoon of engineering time. The cost of not having them closed: 41 days of exposure and a full security audit.