<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Keith H</title>
    <description>The latest articles on DEV Community by Keith H (@keith_4569dev).</description>
    <link>https://dev.to/keith_4569dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4254303%2F4e200ca6-f1ab-463d-853a-178f43e95942.png</url>
      <title>DEV Community: Keith H</title>
      <link>https://dev.to/keith_4569dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/keith_4569dev"/>
    <language>en</language>
    <item>
      <title>We didn't feel comfortable giving our AI agent our API keys</title>
      <dc:creator>Keith H</dc:creator>
      <pubDate>Thu, 19 Nov 2026 23:03:44 +0000</pubDate>
      <link>https://dev.to/keith_4569dev/we-didnt-feel-comfortable-giving-our-ai-agent-our-api-keys-4a19</link>
      <guid>https://dev.to/keith_4569dev/we-didnt-feel-comfortable-giving-our-ai-agent-our-api-keys-4a19</guid>
      <description>&lt;p&gt;My brother and I have been running AI agents for a few months now — Hermes-based agents that fetch things, send emails, touch GitHub, do real work while we do other things. Once an agent actually finishes a real task for you, it's hard to go back.&lt;/p&gt;

&lt;p&gt;Then comes the part nobody talks about.&lt;/p&gt;

&lt;p&gt;The agent needs to send Gmail: here's an app password. It needs GitHub: here's a personal access token. It needs to call the model: here's an API key. One by one we pasted live credentials into config files and hoped that nothing weird would ever show up in the context window.&lt;/p&gt;

&lt;p&gt;We kept asking ourselves the same question: &lt;strong&gt;what happens the day our agent gets lied to?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The incidents are not hypothetical
&lt;/h2&gt;

&lt;p&gt;While we were debating, the industry was having a bad semester:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI's own agent attacked Hugging Face&lt;/strong&gt;, fueled by &lt;a href="https://trufflesecurity.com/blog/the-stolen-keys-openai-used-to-breach-hugging-face" rel="noopener noreferrer"&gt;14 leaked API keys&lt;/a&gt;. The agent used a recovered auth key to modify a private repo, open a pull request, and get code executed through the CI pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An attacker simply asked an agent to reveal its model API key.&lt;/strong&gt; That worked — the key sat in an exposed METR agent-orchestration dashboard. The stolen key was used for three weeks to burn through credits worth about &lt;a href="https://metr.org/blog/2026-08-31-security-update/" rel="noopener noreferrer"&gt;$600,000&lt;/a&gt;. (They were free credits from a model developer — run the math if they had been your bill.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One prompt took over an entire AWS estate.&lt;/strong&gt; Zenity Labs' &lt;a href="https://labs.zenity.io/post/agentcorruption-how-a-single-prompt-collapsed-the-entire-cloud-security-model" rel="noopener noreferrer"&gt;AgentCorruption&lt;/a&gt; chain started with a single prompt to one exposed AWS AgentCore agent, pulled its temporary credentials from the instance metadata service, and ended with control of &lt;em&gt;every&lt;/em&gt; AgentCore agent in the account — private conversations, source code, and the API keys and OAuth tokens stored in Secrets Manager.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CrowdStrike's 2026 Global Threat Report&lt;/strong&gt; found adversaries injecting malicious prompts into legitimate GenAI tools at &lt;a href="https://www.crowdstrike.com/en-us/press-releases/2026-crowdstrike-global-threat-report/" rel="noopener noreferrer"&gt;more than 90 organizations&lt;/a&gt;, using them to steal credentials and cryptocurrency. Their phrase for it: &lt;em&gt;prompts are the new malware&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Four very different worlds — frontier labs, AI safety researchers, cloud deployments, enterprises. One pattern:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The agent already had the keys.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why agent-side guardrails lose this fight
&lt;/h2&gt;

&lt;p&gt;The obvious answer is "tell the agent not to leak the keys." Add a line to the system prompt: &lt;em&gt;never reveal your credentials.&lt;/em&gt; Cute. Prompt injection is precisely the attack that edits what your agent believes. If one email can change your agent's behavior, it can ignore one policy sentence.&lt;/p&gt;

&lt;p&gt;The second obvious answer is an approval prompt inside the agent's own UI. But the hijacked agent is the one writing the request you approve. Asking a compromised process to explain what it's about to do is not a security boundary — it's a suggestion box.&lt;/p&gt;

&lt;p&gt;"Use scoped, short-lived keys" is the third answer. Real improvement, still insufficient: scope limits what a stolen key can do, it doesn't stop the theft. An OAuth token that can send one email is an attacker who can send email.&lt;/p&gt;

&lt;h2&gt;
  
  
  So we took the keys away from the agent
&lt;/h2&gt;

&lt;p&gt;That's the whole idea behind &lt;strong&gt;aiSecurityWarden&lt;/strong&gt;. My brother and I built it for ourselves first — we were running Hermes and genuinely did not want to hand it our Gmail, Github or other credentials. It's a human approval gate that sits between your agents and their secrets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On protected connectors, the agent &lt;strong&gt;never holds your credential&lt;/strong&gt; — it &lt;em&gt;asks&lt;/em&gt; to use it.&lt;/li&gt;
&lt;li&gt;The request shows up on your phone (Telegram, nfty or Discord) with the exact payload: recipient, subject, body preview. Written by nobody you can see, approved by nobody but you.&lt;/li&gt;
&lt;li&gt;Approve or deny, 2FA on your side. The secret is attached to the call outside the agent's environment, only after your yes.&lt;/li&gt;
&lt;li&gt;Zero-knowledge by design: the server never holds anything decryptable, so even our database isn't a credential dump waiting to happen.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In practice: your agent tries to send an email, your phone buzzes, you read the actual body and tap &lt;strong&gt;Approve&lt;/strong&gt; — or &lt;strong&gt;Deny&lt;/strong&gt; with a comment the agent has to respect. Deny-by-default on gated connectors; everything that doesn't touch a secret keeps running free.&lt;/p&gt;

&lt;p&gt;And there's nothing hobby-project about how it's built. Zero-knowledge storage, 2FA-protected approvals, deny-by-default — the same guarantees an enterprise security team would demand, just without the enterprise price tag, the procurement process, or the sales call. You shouldn't have to be a company to deserve real security infrastructure for your agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it costs you
&lt;/h2&gt;

&lt;p&gt;Friction. If you gate everything you'll hate yourself by day two — gate the handful of actions that actually matter (sends, writes, money) and let the rest run. It's also our hosted service today, not a self-hosted tarball; there's a free option at &lt;a href="https://aisecuritywarden.com" rel="noopener noreferrer"&gt;aisecuritywarden.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We didn't invent the idea — "don't hand the executor your keys" is the oldest rule in security. What changed is that the executor is now a very convincing chatbot that reads untrusted text all day long. And I'd rather not admit it, but the news cycle keeps validating the product for us.&lt;/p&gt;

&lt;p&gt;If you run agents with real credentials, I'd genuinely like your feedback — especially where you think we're wrong. What deserves gating? How much context should an approval card show before a human can &lt;em&gt;actually&lt;/em&gt; judge it? Where does human-in-the-loop break a real workflow? Tell me in the comments, or at &lt;a href="https://aisecuritywarden.com" rel="noopener noreferrer"&gt;aisecuritywarden.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The approval flow in 90 seconds:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=XbWsWIrdldg" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=XbWsWIrdldg&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
