<?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: Mohammad Nawaf</title>
    <description>The latest articles on DEV Community by Mohammad Nawaf (@moenawaf7).</description>
    <link>https://dev.to/moenawaf7</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3841932%2F815a4628-eb98-443a-9595-327f506c8ab3.png</url>
      <title>DEV Community: Mohammad Nawaf</title>
      <link>https://dev.to/moenawaf7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moenawaf7"/>
    <language>en</language>
    <item>
      <title>I accidentally gave my AI agent access to my live Payment key. Here's what I built.</title>
      <dc:creator>Mohammad Nawaf</dc:creator>
      <pubDate>Tue, 24 Mar 2026 16:34:29 +0000</pubDate>
      <link>https://dev.to/moenawaf7/i-accidentally-gave-my-ai-agent-access-to-my-live-payment-key-heres-what-i-built-31cg</link>
      <guid>https://dev.to/moenawaf7/i-accidentally-gave-my-ai-agent-access-to-my-live-payment-key-heres-what-i-built-31cg</guid>
      <description>&lt;p&gt;While building an agent last week, I realized something &lt;br&gt;
uncomfortable: my agent had my live Payment API key sitting in its &lt;br&gt;
context window.&lt;/p&gt;

&lt;p&gt;One prompt injection attack. One malicious tool response. One &lt;br&gt;
leaked log file. And that key is gone.&lt;/p&gt;

&lt;p&gt;I couldn't find a clean solution, so I built one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I built&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AgentGuard is a credential proxy for AI agents. Instead of giving &lt;br&gt;
your agent real API keys, you give it a token. When the agent makes &lt;br&gt;
an API call, it goes through the AgentGuard proxy which:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Validates the agent token&lt;/li&gt;
&lt;li&gt;Decrypts the real credential server-side&lt;/li&gt;
&lt;li&gt;Injects it into the request&lt;/li&gt;
&lt;li&gt;Forwards to the target API&lt;/li&gt;
&lt;li&gt;Logs the call&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The agent never sees the real key. Ever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The code change is 3 lines&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before:&lt;br&gt;
requests.post("&lt;a href="https://api.stripe.com/v1/charges" rel="noopener noreferrer"&gt;https://api.stripe.com/v1/charges&lt;/a&gt;",&lt;br&gt;
  headers={"Authorization": "Bearer sk_live_real_key..."})&lt;/p&gt;

&lt;p&gt;After:&lt;br&gt;
requests.post("&lt;a href="https://proxy.agent-guard.dev/v1/charges" rel="noopener noreferrer"&gt;https://proxy.agent-guard.dev/v1/charges&lt;/a&gt;",&lt;br&gt;
  headers={&lt;br&gt;
    "X-AgentGuard-Token": "your_agent_token",&lt;br&gt;
    "X-AgentGuard-Credential": "your_credential_id"&lt;br&gt;
  })&lt;/p&gt;

&lt;p&gt;That's it. Base URL changes, two headers added, everything else &lt;br&gt;
stays the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you also get&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full audit log of every API call your agent makes&lt;/li&gt;
&lt;li&gt;Instant revocation — one click kills an agent's access&lt;/li&gt;
&lt;li&gt;Zero-knowledge encryption — keys encrypted in your browser, 
we literally cannot read them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Try it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;agent-guard.dev — free to start, no credit card.&lt;/p&gt;

&lt;p&gt;Would love feedback from anyone building agents in production. &lt;br&gt;
What am I missing? What would make this actually useful for you?&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
