Cole Medin walks through the parts of a coding setup worth checking before giving an agent more authority: what runs automatically, what can read credentials, and what a stolen key could spend.

Review what can run without asking

  • Inventory startup hooks, editor extensions, skills with scripts, and Model Context Protocol (MCP) servers, which connect agents to external tools. Review changes to shared and local settings alongside changes to code.
  • Medin cites a Google Threat Intelligence case involving tampered agent settings. He also cites two compromised agent-framework releases, 1.26.1 and 1.26.2, identified by supply-chain researchers. Keep installs and upgrades reviewable, and isolate environments that run them.
  • A startup warning helps you notice a hook. Verify who added it and what it does before trusting it.

Keep secrets out of prompts and approval rules

  • A secret in a prompt may survive in a session transcript. A secret passed in a command can also end up in a saved approval rule.
  • Apiiro counted 1,122 of 104,185 current public copies of a Claude Code local settings file with at least one secret. That count describes files in its scan, not the share of all Claude Code users affected.
  • Check that local approval files stay out of Git. If a secret was exposed, revoke or rotate it; deleting the file does not invalidate the credential.
  • Keep production credentials out of the agent’s environment where possible. When a task needs authenticated access, use a narrowly scoped identity or tool and enforce the boundary with permissions or a sandbox.

Limit what a stolen key can do

  • Separate development and production keys. Where the provider supports hard limits, set them and turn on usage alerts. An alert tells you about spend; it does not stop it.
  • Mandiant reports cases of unauthorized model usage exceeding $100,000 in a day and some cumulative charges reaching $1 million. Those were incident figures, not typical bills.
  • Medin’s audit on his own Archon repository surfaced false positives. Treat an automated report as a list to review. Check the source of any audit tool before giving it access to your workspace.

“You are surveying your system. You’re seeing the things that are actually hooked into your coding agent.”

Caveat: A rule that blocks a direct read of a secret file adds a layer of protection. Isolation and limited credentials still matter when an agent can launch other programs.