Industry

Your AI Agent Is Holding Your Passwords Wrong, and Hackers Already Know It

Rachel Kim||7 min
F12

Right now, somewhere in your company, an AI agent is sitting on a plaintext API key like a golden retriever guarding a steak. And somewhere else, an attacker already knows it. This isn't a theoretical threat. GitGuardian's 2025 State of Secrets Sprawl report found that GitHub Copilot adoption alone caused a 40% spike in secret leaks between 2023 and 2024. That was before computer use agents became mainstream. Before every startup started spinning up agents that browse the web, log into SaaS tools, fill out forms, and execute transactions on real desktops with real credentials. The AI agent revolution is genuinely exciting. The way most teams are handling credentials inside those agents is genuinely terrifying.

The Dirty Secret of the Agentic AI Boom: Everyone Is Hardcoding Everything

Ask any security engineer what the number one credential mistake is. They'll say hardcoding secrets. Ask them what most AI agent deployments are doing in 2025. They'll say hardcoding secrets. It's the same answer. Nothing has changed except now the blast radius is enormous. A July 2025 paper on computer use agent vulnerabilities from arXiv catalogued the attack surface across OpenAI Operator, Anthropic's computer use implementation, and similar tools. The findings were not reassuring. Credential exposure through prompt injection, chain-of-thought leakage, and environment variable misuse showed up across every major platform. Aembit's security research put it bluntly: the dominant pattern for AI agent authentication in 2025 is still hardcoded credentials in environment variables. Trend Micro confirmed the same thing in August 2025, finding widespread misuse of environment variables for secret handling in MCP-based agent deployments. And then there's this gem from Reddit: a thread in June 2025 revealed that Claude Code reads .env files by default, meaning any developer who dropped credentials in a .env file for convenience had just handed them to the agent wholesale. The thread blew up. The fix was a config toggle. The damage, in who knows how many codebases, was already done.

Prompt Injection Is the Attack Nobody Wants to Talk About

Here's the attack that should be keeping every CISO up at night. You deploy a computer use agent. It browses the web, reads emails, interacts with internal tools. Somewhere in that browsing, it encounters a malicious webpage, a poisoned document, or a crafted email that contains hidden instructions. Those instructions tell the agent to exfiltrate credentials, forward sensitive data, or impersonate the user. The agent complies, because it can't always tell the difference between legitimate instructions and injected ones. This is not hypothetical. Obsidian Security documented prompt injection as the most common AI exploit of 2025. Brave's security team published a working attack against Perplexity's Comet browser agent in August 2025. Docker's engineering blog ran an entire horror story series about MCP-based agents being hijacked through GitHub repositories. Palo Alto's Unit 42 identified nine concrete attack scenarios targeting agentic applications, with credential theft appearing in multiple chains. The Salesloft breach in August 2025 happened exactly this way. Attackers compromised an AI chat agent integration through OAuth, then pivoted into Salesforce data. Real company. Real breach. Real credentials. Gone.

Breaches involving stolen or compromised credentials take an average of 292 days to identify and remediate. That's almost 10 months of an attacker living inside your systems, moving laterally, and quietly owning everything your AI agent touched. (IBM Cost of a Data Breach Report, 2025)

What Good Credential Handling for a Computer Use Agent Actually Looks Like

  • Never hardcode credentials in agent configs, prompts, or environment variables. Use a secrets manager with short-lived, scoped tokens that expire. If your agent is compromised, an expired token is useless.
  • Scope permissions aggressively. A computer use agent that handles invoice processing should not have write access to your GitHub repos. Principle of least privilege applies to agents harder than it applies to humans, because agents can be hijacked without ever knowing.
  • Treat every external input as potentially hostile. Webpages, emails, documents, API responses. Any of these can carry injected instructions. Your agent architecture needs to separate trusted instruction channels from untrusted data channels.
  • Audit what your agent actually does with credentials at runtime. Chain-of-thought logging exists. Use it. A 2025 arXiv paper on computer use agents specifically flagged CoT leakage as a vector where credentials show up in reasoning traces and get exposed through logs.
  • Rotate credentials on a schedule that assumes breach. If you're still rotating quarterly, you're operating on the assumption that nothing bad happens for 90 days. In 2025, that assumption is a liability.
  • MCP deployments need special scrutiny. Docker's July 2025 analysis of MCP security found OAuth discovery vulnerabilities, tool poisoning attacks, and secret exposure as the top three threat categories. If you're running MCP-based agents, your threat model needs to be updated today, not next sprint.
  • Zero-trust for agents means agents authenticate to services, not the other way around. Workload identity, not shared secrets. Aembit's research on securing AI agents without static credentials is worth reading if you want the technical depth.

The Competitor Platforms Are Not Solving This For You

Let's be honest about what OpenAI Operator and Anthropic's computer use tools are actually offering on the security front. They're offering capable agents with impressive benchmarks and security guidance that amounts to 'please follow best practices.' The July 2025 systematization paper on computer use agent vulnerabilities specifically called out Operator and Claude's computer use as sharing the same fundamental exposure surface. Neither platform has solved the prompt injection problem at the model level. Neither has a native secrets management integration that prevents hardcoding. Neither is going to stop you from doing something dumb with credentials, and the research is piling up showing that developers are absolutely doing dumb things with credentials because nobody told them not to and the tools don't enforce guardrails. The Claude Code .env situation is a perfect example. That was a default behavior that exposed credentials. A default. Not a misconfiguration. Not a power-user edge case. The default. If you're evaluating computer use agents purely on capability benchmarks and ignoring the security architecture around credential handling, you're making an incomplete decision. Capability without security is just a faster way to get breached.

Why Coasty's Approach to Computer Use Is Built Differently

I'm going to tell you about Coasty not because I'm paid to, but because the security conversation above is exactly why the architecture of a computer use agent matters beyond just benchmark scores. Coasty sits at 82% on OSWorld, which is the highest score of any computer use agent right now. Claude Sonnet 4.5, for comparison, scored 61.4% on the same benchmark. But the capability gap isn't the most interesting part for this conversation. What matters is how Coasty handles the real-desktop, real-browser, real-terminal execution model. When a computer use agent is operating in cloud VMs with proper isolation, running agent swarms in sandboxed parallel environments, the credential surface is fundamentally different from an agent that's been handed your local machine and your .env file. The BYOK support means your API keys don't live in someone else's infrastructure. The architecture is designed around the assumption that the agent will touch sensitive systems, so the question is how to limit and audit that access, not just hope the agent behaves. If you're serious about deploying computer use at scale, the free tier at coasty.ai is the place to start. Not because it's free, but because you can actually test how credential isolation works before you're betting production workflows on it.

Here's where I land on this. The AI agent credential problem is not a niche security concern for paranoid engineers. It's a mainstream enterprise risk that's being systematically ignored because everyone is too excited about what agents can do to think carefully about what they can leak. Stolen credentials caused 22% of all breaches in 2025. Account compromise surged 389% year over year. And we're in the middle of deploying millions of agents that authenticate to every sensitive system in our stack. The math is not good. The teams that get this right in 2025 and 2026 will be the ones who treated credential handling as a first-class design concern, not an afterthought. That means secrets managers, not environment variables. Scoped tokens, not admin keys. Isolated execution environments, not agents running loose on developer laptops. And computer use agents that were built with this threat model in mind from day one. Go look at coasty.ai. Poke at the architecture. Ask hard questions about how it handles credentials. That's the right way to evaluate any computer use tool right now, and most vendors won't have good answers. The ones who do are the ones worth trusting with your production systems.

Want to see this in action?

View Case Studies
Try Coasty Free