rm -rf ~/.kube/config
Enter fullscreen mode
Exit fullscreen mode
I deleted the kubeconfig on my Mac for every GKE and EKS cluster I work with. Not because kubeconfig is a bad format, but because of who else can read it.
Anything that runs as your macOS user can do what you can do: an AI agent, an npm postinstall script, an editor extension, malware. If that includes reading ~/.kube/config and the cloud logins behind it, it includes running kubectl against production.
Supply chain attacks now go after cloud and Kubernetes credentials
Three incidents from 2025 show the pattern.
Nx "s1ngularity", August 2025. Compromised Nx releases on npm ran a postinstall script that looked for Claude Code, Gemini CLI and Amazon Q on the machine and ran them with --dangerously-skip-permissions , --yolo and --trust-all-tools to search the disk for secrets. The malware didn't bring its own scanner. It used the developer's AI agents.
Shai-Hulud, September and November 2025.…