<?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>Forem: Martijn Mik</title>
    <description>The latest articles on Forem by Martijn Mik (@martijn_mik_917c2ea0241de).</description>
    <link>https://forem.com/martijn_mik_917c2ea0241de</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%2F3901974%2F29d60e39-92d6-49b7-a004-4871186a26e3.jpg</url>
      <title>Forem: Martijn Mik</title>
      <link>https://forem.com/martijn_mik_917c2ea0241de</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/martijn_mik_917c2ea0241de"/>
    <language>en</language>
    <item>
      <title>Why AI Is Breaking Your API Security Model (And Nobody on Your Team Notices)</title>
      <dc:creator>Martijn Mik</dc:creator>
      <pubDate>Tue, 28 Apr 2026 12:10:32 +0000</pubDate>
      <link>https://forem.com/martijn_mik_917c2ea0241de/why-ai-is-breaking-your-api-security-model-and-nobody-on-your-team-notices-5aoo</link>
      <guid>https://forem.com/martijn_mik_917c2ea0241de/why-ai-is-breaking-your-api-security-model-and-nobody-on-your-team-notices-5aoo</guid>
      <description>&lt;p&gt;Your API gateway is lying to you. &lt;/p&gt;

&lt;p&gt;While you’ve been perfecting your OAuth flow and rate-limiting on the front door, AI has been busy building back doors. Over the last year, our "official" API documentation has become a work of fiction. For every documented endpoint, there are now three more living in the shadows, scaffolded by AI, pushed in a hurry, and completely invisible to our security stack.&lt;/p&gt;

&lt;p&gt;At first, it felt like a superpower. Need a CRUD wrapper? Copilot it. Need a specialized data transformation endpoint? AI scaffold. We were moving at a velocity that made our previous sprints look like they were stuck in molasses.&lt;/p&gt;

&lt;p&gt;But it also showed that velocity has a price. A few weeks ago, during a routine infrastructure audit, we asked one simple question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Can we list every unique endpoint currently routing traffic in production?”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The silence from the DevOps team was deafening. We realized that AI hadn’t just helped us write code; it had created a "Dark Matter" API layer that no one was tracking.&lt;/p&gt;




&lt;h2&gt;
  
  
  The 4 Horsemen of AI-Driven API Sprawl
&lt;/h2&gt;

&lt;p&gt;We realized our actual attack surface had bloated far beyond our Swagger docs. We started seeing the same four patterns over and over:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The "Just for Now" Endpoint:&lt;/strong&gt; AI generates a "temporary" health check or migration route. It gets merged, deployed, and forgotten.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protocol Drift:&lt;/strong&gt; One service uses strictly enforced mTLS, while a newer AI-scaffolded peer defaults to standard HTTP because the prompt was too vague.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadow Logic:&lt;/strong&gt; Endpoints that bypass centralized auth middleware because the AI suggested a "quick" local validation logic that was subtly flawed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Over-Sharing (PII Leakage):&lt;/strong&gt; AI-generated schemas that default to &lt;code&gt;SELECT *&lt;/code&gt; patterns, exposing internal metadata that should never leave the VPC.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The scariest part? &lt;strong&gt;The metrics looked perfect.&lt;/strong&gt; No 5xx errors. No latency spikes. Just a growing cloud of endpoints we no longer controlled.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the "Fortress" Mentality is Failing
&lt;/h2&gt;

&lt;p&gt;Most of us were taught the &lt;strong&gt;"Fortress" model&lt;/strong&gt;: you define the walls (OpenAPI/Swagger), you gate the entrance (API Gateway), and you monitor the traffic.&lt;/p&gt;

&lt;p&gt;But AI has turned every developer into a high-speed architect who can build new doors in seconds. When your creation rate exceeds your documentation rate, the "Fortress" becomes a sieve. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Problem: Gateways Can’t See Intent.&lt;/strong&gt; A Gateway only sees traffic once it’s already live. It doesn't know that &lt;code&gt;/debug/user-sync&lt;/code&gt; was a hallucination that bypasses your PII masking. It just sees an authorized request and lets it through. &lt;/p&gt;

&lt;p&gt;To fix this, we tried to do it manually. I spent hours clicking into every single endpoint in Swagger, one by one, trying to remember: &lt;em&gt;"Did I protect this route? Is this one supposed to be public?"&lt;/em&gt; It was a nightmare. The documentation said one thing, but the code said another. I realized that if you want to secure an AI-driven environment, &lt;strong&gt;you have to stop looking at the traffic and start looking at the DNA—the source code.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What We Changed: From Gatekeepers to Automated Guardrails
&lt;/h2&gt;

&lt;p&gt;This is why I built &lt;strong&gt;ApiPosture&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I needed a way to visualize every endpoint and its security posture instantly, directly from the source code, before it ever hit the Gateway. I didn't want to click through 50 Swagger tabs; I wanted a single source of truth that couldn't lie because it was derived directly from the logic.&lt;/p&gt;

&lt;p&gt;By moving from manual spot-checks to &lt;strong&gt;Automated API Security Testing (SAST)&lt;/strong&gt;, we stopped playing "Whack-a-Mole" with shadow APIs. We now scan the code for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hidden Routes:&lt;/strong&gt; Detecting endpoints in the source that aren't in the official specs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth Deviations:&lt;/strong&gt; Identifying when AI logic bypasses our global middleware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Exposure:&lt;/strong&gt; Flagging unreviewed endpoints that dump sensitive metadata.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We stopped treating API security as a network problem and started treating it as a code-level requirement. We now ensure that AI-generated endpoints are audited against our security standards before the first byte of traffic ever hits it." &lt;/p&gt;




&lt;h2&gt;
  
  
  The "Sobering" Standup Challenge
&lt;/h2&gt;

&lt;p&gt;Try this at your next sync. Don't ask for the "approved" list. Ask your Lead Dev:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"If I look at our raw ingress logs right now, how many endpoints will I find that aren't in our Postman collection?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the answer involves a shrug, you don't have a security problem. You have a &lt;strong&gt;visibility crisis&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I made &lt;strong&gt;ApiPosture&lt;/strong&gt; open-source because this isn't just my problem. It’s the inevitable result of building at the speed of AI. If we’re going to let AI write our code, we need a "Security Architect" that can read it just as fast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are you guys seeing this "Shadow API" creep? How are you tracking auth rules across hundreds of endpoints without losing your mind? Let's chat in the comments.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://apiposture.com" rel="noopener noreferrer"&gt;https://apiposture.com&lt;/a&gt; &amp;gt; free community edition available&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>api</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
