# Developer Workstation Secrets > The plaintext credentials that accumulate on developer laptops and CI runners (cloud CLI files, shell history, `.npmrc`, SSH keys, browser sessions, AI-agent configs) — invisible to repo scanners and the primary loot of infostealers and supply-chain worms. ## How it works Repo, pre-commit and CI scanning only see what reaches git. The endpoint is where credentials originate and dwell for months, unrotated. Shai-Hulud 2 gave a rare census: across **6,943 compromised systems**, GitGuardian identified 294,842 secret occurrences / 33,185 unique secrets; each live secret sat in ~**8 locations** on the same machine, and **59% of compromised machines were CI/CD runners**, not laptops. ### Scan surface map | Location | Examples | Why it matters | |---|---|---| | Shell history | `.bash_history`, `.zsh_history` | Keys pasted into one-off `curl`/CLI calls persist forever | | Dotfiles / env | `.env*`, `.netrc`, `.gitconfig`, exports in `.zshrc` | Copied between projects, never rotated | | Cloud CLIs | `~/.aws/credentials`, `~/.config/gcloud`, `~/.azure`, Terraform state | Often static keys with no expiry | | SSH / signing | `~/.ssh/`, GPG keys | Reused for years, often no passphrase; no API log of misuse | | Package registries | `.npmrc`, `.pypirc`, `~/.docker/config.json`, `~/.gem/credentials`, HF/Cargo tokens | Publish tokens = supply-chain leverage ([[Malicious Packages]]) | | AI agents / MCP | `.claude/`, `.cursor/`, `~/.continue/`, MCP server configs, `/tmp` | >40% of secrets found on dev endpoints are agent-generated (GitGuardian) | | Browser | Saved passwords, cookies, OAuth/refresh tokens (Chromium: DPAPI-protected) | Session theft bypasses MFA; harvested by Lazagne, SharpChrome, DonPAPI | | Exports / archives | CSV/SQL/XLSX dumps, Downloads, zips | Bulk data + embedded creds | ### AI coding agents widen it - Claude Code auto-loaded `.env`/`.env.local` from the project dir into its process environment (Knostic found it via an unexpected `HTTP_PROXY`); Cursor attempted to upload a local file containing an API key; Claude Code committed a Gemini key into a test file. - "Yes, and don't ask again" writes the full command string — API key included — into `.claude/settings.local.json`; 31,088 distinct secrets (5,343 valid) reached public GitHub that way, incl. 1,955 valid Postgres connection strings. - See [[AI Coding Assistant Risks]] and [[MCP Security]]. ## Notable cases - **LiteLLM PyPI (Mar 2026)** — ~40 min on PyPI; payload escalated to root on CI runners and swept SSH keys, AWS/GCP/Azure creds, K8s SA tokens, `.env`, Docker config. The loot archive: 153 GB, 433,909 files, 118,829 runner dumps from 2,488 orgs. A separate Oct 2026 compromise began with an admin key deleted from a public repo but never revoked. - **wfx-loot (2026)** — 4,837 hijacked GitHub accounts; probe PRs (`docs: dependency audit notes`, branch `wfx-docs`) in 61,764 repos; stealer ran in ≥1,806 repos via workflows or npm `postinstall` (which also runs on developer machines), then reverted and deleted run logs. - **Microsoft `agent-framework` 1.26.1/1.26.2 (PyPI, 17 Nov 2026)** — a `.pth` hook ran the stealer on every Python start in the environment (pip included). It selected env vars whose names contained `TOKEN`, `SECRET`, `PASSWORD`, `KEY`, `AZURE`, `AWS`, `GITHUB`, `OPENAI`, read secret-looking values from other processes and up to 60 (1.26.1) / 80 (1.26.2) credential files: Azure CLI config, npm, pip, `.netrc`, Git, Docker, Hugging Face, Azure DevOps agent creds, `.env` and JSON in app directories; plus Azure DevOps OIDC tokens, managed-identity tokens and, in 1.26.2, GitHub Actions OIDC tokens. One HTTPS POST to a webhook.site URL ([[raw/medium.com/microsoft-s-ai-agent-package-was-hijacked-on-pypi-here-s-how-to-check-15853|incident guide]], [[raw/medium.com/the-credential-was-valid-the-publisher-was-not-15854|VeritasChain on Wiz findings]]; [[Malicious Packages]]). - **Swarm bee-js 13.3.0 / Swarm Desktop 0.56.2 (9 Nov 2026)** — a loader fetched stage-2 code that copied the Swarm Desktop node key **and its password** (wallet control: xDAI, xBZZ, chequebook, stake) and installed a persistent RAT. Because Desktop auto-offers updates, a machine that ran 0.56.2 may now show clean 0.56.3, so the current version is not a reliable check ([[raw/ethswarm.org/swarm-incident-malicious-bee-js-13-3-0-and-swarm-desktop-0-56-2-15953|Swarm Foundation]]). - **AI-service accounts in stealer logs** — infostealer records now include ChatGPT, Claude, Gemini, Copilot and Cursor credentials and sessions, which can expose conversations, uploaded documents and connected services. Brandefense's free AI Exposure Check queries one stealer-log source by domain or work email (severity, platforms, date range, aggregated device data, no raw credentials); a negative result proves nothing and a positive one needs validation ([[raw/medium.com/your-company-s-ai-credentials-could-already-be-exposed-and-google-won-15910|Lerner]]). - **Shai-Hulud family** — worm harvesting dev and CI secrets to self-propagate; see [[Shai-Hulud Worm]]. - **Infostealers** (Lumma, RedLine, Vidar) — stolen cloud keys, GitHub tokens and session cookies resold by access brokers to breach cloud, code and AI environments. ## Defenses - **Non-exportable keys**: SSH keys in the Secure Enclave / hardware tokens. ```bash sc_auth create-ctk-identity -l "ssh-MacBook" -k p-256-ne -t bio export SSH_SK_PROVIDER=/usr/lib/ssh-keychain.dylib ssh-keygen -w /usr/lib/ssh-keychain.dylib -K -N "" ``` Secretive does the same with Touch ID and access notifications. - Prefer the short-lived session tokens cloud CLIs can write over static access keys in `~/.aws/credentials`; [[Workload Identity Federation]] for CI runners. - Keep `.env` outside agent working directories (Knostic's fix); run coding agents in sandboxes such as Docker sandboxes with secret-scanning hooks. - Maintain a **per-machine credential inventory** before an incident, so the "what was on this laptop?" blast-radius question has an answer and rotation can start immediately ([[Credential Rotation and Revocation]]). - For Python environments, list executable `.pth` lines (lines starting with `import` in each site-packages dir) and review unfamiliar ones; `distutils-precedence.pth` from setuptools is normal. Remove hook files before running any Python tooling in a suspect environment, since pip itself triggers them ([[raw/medium.com/microsoft-s-ai-agent-package-was-hijacked-on-pypi-here-s-how-to-check-15853|incident guide]], [[raw/medium.com/the-credential-was-valid-the-publisher-was-not-15854|VeritasChain]]). - Detect behaviour, not signatures, for browser-store theft: processes opening credential DBs and calling `CryptUnprotectData`. ## Related - [[Secrets Management]] - [[Leaked Cloud Credentials]] · [[Secret Scanning]] · [[Credential Rotation and Revocation]] - [[Shai-Hulud Worm]] · [[Malicious Packages]] · [[CI-CD Pipeline Attacks]] · [[AI Coding Assistant Risks]] ## Sources - [[raw/blog.gitguardian.com/every-laptop-is-a-credential-store-where-secrets-hide-10236|Every Laptop Is a Credential Store: Where Secrets Hide]] - [[raw/thehackernews.com/the-state-of-secrets-sprawl-2026-9-takeaways-for-cisos-3777|The State of Secrets Sprawl 2026: 9 Takeaways for CISOs]] - [[raw/blog.gitguardian.com/inside-the-litellm-hack-153gb-433-909-files-2-488-organizations-11384|Inside the LiteLLM hack: 153GB, 433,909 Files, 2,488 Organizations]] - [[raw/thehackernews.com/attacker-used-4-837-hijacked-github-accounts-to-run-a-ci-secret-steale-14735|Attacker Used 4,837 Hijacked GitHub Accounts to Run a CI Secret Stealer]] - [[raw/knostic.ai/from-env-to-leakage-mishandling-of-secrets-by-coding-agents-4346|From .env to Leakage: Mishandling of Secrets by Coding Agents]] - [[raw/blog.gitguardian.com/claude-code-settings-local-json-secrets-17-months-of-exposure-on-githu-13955|Claude Code settings.local.json Secrets: 17 Months of Exposure]] - [[raw/wiz.io/the-infostealer-incursion-how-stolen-credentials-breach-cloud-code-and-12144|The Infostealer Incursion: How Stolen Credentials Breach Cloud, Code and AI]] - [[raw/ipurple.team/browser-stored-credentials-6947|Browser Stored Credentials]] - [[raw/gatezh.com/protecting-ssh-keys-with-macos-secure-enclave-14168|Protecting SSH Keys with macOS Secure Enclave]] - [[raw/github.com/maxgoedjen-secretive-6949|maxgoedjen/secretive]] - [[raw/blog.gitguardian.com/what-was-on-this-machine-answering-the-blast-radius-question-after-a-l-10951|What Was on This Machine? Answering the Blast Radius Question After a Laptop Compromise]] - [[raw/blog.gitguardian.com/the-binance-hack-raises-a-critical-question-what-can-a-compromised-lap-12922|The Binance Hack Raises a Critical Question: What Can a Compromised Laptop Reach?]] - [[raw/snyk.io/zero-day-extensive-npm-package-compromise-shai-hulud-supply-chain-atta-9011|Zero-day Extensive NPM Package Compromise - Shai Hulud]] - [[raw/blog.gitguardian.com/how-the-gitguardian-mixin-kit-extends-docker-sandboxes-for-safer-ai-co-12107|How the GitGuardian Mixin Kit Extends Docker Sandboxes for Safer AI Coding]] - [[raw/medium.com/microsoft-s-ai-agent-package-was-hijacked-on-pypi-here-s-how-to-check-15853|Microsoft's AI Agent Package Was Hijacked on PyPI: Here's How to Check If You're Affected]] - [[raw/medium.com/the-credential-was-valid-the-publisher-was-not-15854|The Credential Was Valid. The Publisher Was Not.]] - [[raw/ethswarm.org/swarm-incident-malicious-bee-js-13-3-0-and-swarm-desktop-0-56-2-15953|Swarm incident: malicious bee-js 13.3.0 and Swarm Desktop 0.56.2]] - [[raw/medium.com/your-company-s-ai-credentials-could-already-be-exposed-and-google-won-15910|Your Company's AI Credentials Could Already Be Exposed — and Google Won't Help You Find Them]]