<?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: ayame0328</title>
    <description>The latest articles on Forem by ayame0328 (@ayame0328).</description>
    <link>https://forem.com/ayame0328</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%2F3787266%2F1504971d-e603-4fa2-9930-7f96bf819936.png</url>
      <title>Forem: ayame0328</title>
      <link>https://forem.com/ayame0328</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ayame0328"/>
    <language>en</language>
    <item>
      <title>$60K Billed in 13 Hours: Why Leaked Firebase Keys Keep Killing AI-Built Apps</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Sat, 18 Apr 2026 08:36:00 +0000</pubDate>
      <link>https://forem.com/ayame0328/60k-billed-in-13-hours-why-leaked-firebase-keys-keep-killing-ai-built-apps-6l6</link>
      <guid>https://forem.com/ayame0328/60k-billed-in-13-hours-why-leaked-firebase-keys-keep-killing-ai-built-apps-6l6</guid>
      <description>&lt;p&gt;A Japanese dev just got billed roughly &lt;strong&gt;$60,000 (~9 million yen)&lt;/strong&gt; in &lt;strong&gt;13 hours&lt;/strong&gt; because a Google API key leaked from their Firebase + Gemini app. I saw the post trending on Qiita this morning and my stomach dropped — not because it's a new story, but because I've seen the exact same mistake every single week while building CodeHeal, my security scanner for AI-generated code.&lt;/p&gt;

&lt;p&gt;The key was exposed. The key had no referrer restriction. An attacker found it, pointed it at Gemini, and burned through the budget in hours. That's it. That's the whole "hack."&lt;/p&gt;

&lt;p&gt;This is the #1 way AI-accelerated projects get wiped out in 2026, and no one is talking about it enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually happened
&lt;/h2&gt;

&lt;p&gt;The short version:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A solo dev shipped a Firebase + Gemini app&lt;/li&gt;
&lt;li&gt;The Google API key landed in the frontend bundle (very common — Firebase web SDKs literally ask you to paste it there)&lt;/li&gt;
&lt;li&gt;The key had no &lt;strong&gt;Application restriction&lt;/strong&gt; and no &lt;strong&gt;API restriction&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Someone scraped it, pointed it at Gemini, and racked up ~9,000,000 JPY (~$60K USD at today's 159 USD/JPY) in 13 hours&lt;/li&gt;
&lt;li&gt;Google's abuse detection did not kick in fast enough&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The bill landed before the dev finished their morning coffee.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is so much worse in the AI-generated-code era
&lt;/h2&gt;

&lt;p&gt;I built CodeHeal specifically because I kept watching this pattern unfold. After running the scanner on a bunch of Claude-generated and Copilot-generated repos, here's what I noticed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. LLMs love to "just make it work."&lt;/strong&gt;&lt;br&gt;
When you ask an AI "wire up Firebase + Gemini in my Next.js app," the path of least resistance is a client-side config object with the raw key. It compiles, the demo works, the dev ships. The LLM rarely stops to say &lt;em&gt;"by the way, this key is now public — did you restrict it?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Firebase's own docs muddy the water.&lt;/strong&gt;&lt;br&gt;
The Firebase web config is technically meant to be public — but that's only safe if you lock the key down with restrictions and rely on Firebase Security Rules. When the same key is unrestricted &lt;em&gt;and&lt;/em&gt; has Gemini API access attached, you've built a tap someone else can open.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The feedback loop is broken.&lt;/strong&gt;&lt;br&gt;
You don't learn the key leaked until the bill lands. No CI alarm, no typecheck, no test failure. This is the exact category where static analysis earns its keep.&lt;/p&gt;

&lt;p&gt;During CodeHeal's early testing I ran it on ~40 public "Firebase + AI" starter repos cloned off GitHub. &lt;strong&gt;32 of them&lt;/strong&gt; had at least one exposed key or a Firebase config with missing restrictions sitting in plain text. That's 80%. I wasn't cherry-picking — these were starters from the first two pages of GitHub search.&lt;/p&gt;

&lt;p&gt;That was the moment I stopped writing the scanner as a side project and started writing it as a product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I didn't use an LLM to detect this
&lt;/h2&gt;

&lt;p&gt;When I first prototyped CodeHeal I tried the obvious thing: feed the repo to a model and ask it to flag secrets. I ran the same input 5 times. I got 5 different answers. Sometimes it missed the hardcoded key entirely. Sometimes it hallucinated a "leaked JWT" that didn't exist. Once it told me &lt;code&gt;process.env.NEXT_PUBLIC_API_KEY&lt;/code&gt; was safe &lt;em&gt;because it used env vars&lt;/em&gt; — which is exactly the bug that bills you $60K, because &lt;code&gt;NEXT_PUBLIC_*&lt;/code&gt; ships to the browser.&lt;/p&gt;

&lt;p&gt;That was the day I ripped the LLM out and rewrote the engine as pure static analysis — AST walks, pattern matching, and rule-based heuristics. The detection is now deterministic: the same input always produces the same output. For a security tool, that is table stakes. I'm frankly surprised more of the "AI security" scanners on the market still run LLM-in-the-loop.&lt;/p&gt;

&lt;p&gt;CodeHeal currently ships &lt;strong&gt;14 categories&lt;/strong&gt; and &lt;strong&gt;93 rules&lt;/strong&gt;. The hardcoded-secret / unrestricted-credential category is the one that keeps paying for itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you should actually do today
&lt;/h2&gt;

&lt;p&gt;If you have a Firebase + AI app in production right now, here is the 10-minute checklist:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open Google Cloud Console → APIs &amp;amp; Services → Credentials.&lt;/strong&gt; Every API key should have BOTH an &lt;strong&gt;Application restriction&lt;/strong&gt; (HTTP referrer, IP, or Android/iOS app) AND an &lt;strong&gt;API restriction&lt;/strong&gt; (limit which APIs it can call). Both. Not one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check your frontend bundle.&lt;/strong&gt; Open the built JS and search for &lt;code&gt;AIza&lt;/code&gt; — that's the prefix for Google API keys. If you find one without a referrer lock, rotate it &lt;em&gt;now&lt;/em&gt;, not after standup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget alerts are not optional.&lt;/strong&gt; Set a hard billing cap at a number that won't destroy you. Google's default is nothing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemini/Vertex keys should never, ever be in the client.&lt;/strong&gt; Proxy through a backend route. I don't care how prototypey your project is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run a scanner before every push.&lt;/strong&gt; Not after. Before.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How CodeHeal handles this category
&lt;/h2&gt;

&lt;p&gt;Without giving away the rule definitions (the detection logic is the product), here's the shape of it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We look for key-like literals in source files that ship to the client (Next.js &lt;code&gt;NEXT_PUBLIC_*&lt;/code&gt;, Vite &lt;code&gt;VITE_*&lt;/code&gt;, CRA &lt;code&gt;REACT_APP_*&lt;/code&gt;, plus raw string patterns)&lt;/li&gt;
&lt;li&gt;We cross-reference against known provider prefixes (Google, OpenAI, Anthropic, Stripe, etc.) with different confidence levels&lt;/li&gt;
&lt;li&gt;We check for framework-specific footguns — the Firebase config object, hardcoded Vercel env values committed to repo, &lt;code&gt;.env.local&lt;/code&gt; files accidentally tracked&lt;/li&gt;
&lt;li&gt;Findings are ranked by blast radius, not by count. One exposed Gemini key &amp;gt; a hundred cosmetic warnings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On a Firebase + Gemini Next.js archetype app, a CodeHeal scan runs in under 2 seconds and flags the unrestricted-key pattern as Critical. The dev in the $60K story would have seen the warning on their first &lt;code&gt;git push&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The uncomfortable truth
&lt;/h2&gt;

&lt;p&gt;AI lets you ship in an afternoon what used to take a week. It also lets you leak a production credential in an afternoon. The speedup is symmetrical — and the billing systems of Google, OpenAI, Anthropic, and every other AI provider are not going to save you. They are explicitly built to &lt;em&gt;not&lt;/em&gt; save you, because usage is revenue.&lt;/p&gt;

&lt;p&gt;Static analysis is the cheapest insurance you will ever buy for a vibe-coded AI app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What&lt;/th&gt;
&lt;th&gt;Details&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Incident&lt;/td&gt;
&lt;td&gt;~$60K billed in 13 hours via leaked Google API key (Firebase + Gemini app)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Root cause&lt;/td&gt;
&lt;td&gt;Unrestricted API key shipped to client&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Why AI code makes it worse&lt;/td&gt;
&lt;td&gt;LLMs optimize for "works in demo," not for secret hygiene&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fix in 10 min&lt;/td&gt;
&lt;td&gt;Application + API restrictions, billing cap, proxy Gemini through backend&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Longer fix&lt;/td&gt;
&lt;td&gt;Deterministic static scan in CI before every push&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;If you want to see what a scan of your own AI-generated repo turns up, CodeHeal runs in the browser, no signup for the free tier:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=firebase_60k_leak" rel="noopener noreferrer"&gt;Scan your repo free on CodeHeal&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;5 scans/day on the free plan. 14 categories, 93 rules, no LLM, same result every time. If it finds an unrestricted API key in your code, you'll know before a scraper does.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>gemini</category>
      <category>security</category>
    </item>
    <item>
      <title>CPU-Z Just Got Hijacked: Why Your Trusted Tools Are the Biggest Attack Vector</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Sat, 11 Apr 2026 04:37:46 +0000</pubDate>
      <link>https://forem.com/ayame0328/cpu-z-just-got-hijacked-why-your-trusted-tools-are-the-biggest-attack-vector-9m5</link>
      <guid>https://forem.com/ayame0328/cpu-z-just-got-hijacked-why-your-trusted-tools-are-the-biggest-attack-vector-9m5</guid>
      <description>&lt;p&gt;Yesterday, the CPUID website — home to CPU-Z and HWMonitor, tools that millions of developers and sysadmins have downloaded without a second thought — was hijacked to serve malware for six hours.&lt;/p&gt;

&lt;p&gt;Not the source code. Not the build pipeline. The &lt;em&gt;download links themselves&lt;/em&gt; were swapped out.&lt;/p&gt;

&lt;p&gt;If you downloaded HWMonitor on April 9-10, you might have a credential stealer running in memory right now.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Happened
&lt;/h2&gt;

&lt;p&gt;Attackers exploited a vulnerable backend API on CPUID's website. For approximately six hours between April 9-10, 2026, download links were dynamically replaced with malicious installers.&lt;/p&gt;

&lt;p&gt;Here's what made this attack particularly nasty:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The legitimate signed files were never touched&lt;/strong&gt; — the compromise sat at the delivery layer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;64-bit HWMonitor users were specifically targeted&lt;/strong&gt; with a fake &lt;code&gt;CRYPTBASE.dll&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The malware ran primarily in memory&lt;/strong&gt; using PowerShell, minimizing disk footprint&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It stole Chrome credentials&lt;/strong&gt; via the IElevation COM interface&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C2 servers pulled additional payloads&lt;/strong&gt; post-infection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The legitimate software was fine. The delivery mechanism was not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters More Than You Think
&lt;/h2&gt;

&lt;p&gt;I've been building a security scanner for AI-generated code for the past month, and this incident crystallizes something I keep seeing: &lt;strong&gt;the most dangerous attacks don't target your code — they target your trust.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Trust Chain Problem
&lt;/h3&gt;

&lt;p&gt;Think about your daily workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You trust npm → npm trusts package authors → authors trust their dependencies
You trust VS Code → VS Code trusts extensions → extensions trust their CDNs
You trust brew/apt → repos trust maintainers → maintainers trust their infra
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every link in this chain is an attack surface. CPUID's case proves you don't need to compromise a single line of source code to weaponize trusted software.&lt;/p&gt;

&lt;h3&gt;
  
  
  This Isn't Isolated
&lt;/h3&gt;

&lt;p&gt;Security researchers linked this attack to previous campaigns targeting FileZilla users. This is part of a &lt;strong&gt;coordinated, ongoing strategy&lt;/strong&gt; — not a one-off experiment.&lt;/p&gt;

&lt;p&gt;And the pattern is spreading to code dependencies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;npm packages&lt;/strong&gt; getting hijacked after maintainer accounts are compromised&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PyPI typosquatting&lt;/strong&gt; where &lt;code&gt;reqeusts&lt;/code&gt; (note the typo) installs a keylogger&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chrome extensions&lt;/strong&gt; silently updating to inject ads or steal data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Actions&lt;/strong&gt; in popular repos modified to exfiltrate secrets&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What AI-Generated Code Makes Worse
&lt;/h2&gt;

&lt;p&gt;Here's where it gets personal. I built &lt;a href="https://scanner-saas.vercel.app" rel="noopener noreferrer"&gt;CodeHeal&lt;/a&gt; because I kept seeing AI code assistants do something terrifying: &lt;strong&gt;they recommend packages and patterns without understanding trust.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When Copilot or ChatGPT suggests &lt;code&gt;npm install some-package&lt;/code&gt;, it has no concept of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whether that package was last updated 3 years ago&lt;/li&gt;
&lt;li&gt;Whether the maintainer's account was recently compromised&lt;/li&gt;
&lt;li&gt;Whether the package name is a typosquat of a popular library&lt;/li&gt;
&lt;li&gt;Whether the post-install script runs suspicious commands&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I ran scans on 50+ AI-generated projects last month. &lt;strong&gt;73% had at least one dependency-related security concern&lt;/strong&gt; — phantom packages that don't exist on npm, outdated libraries with known CVEs, or suspiciously similar names to popular packages.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three Layers You Need to Verify
&lt;/h2&gt;

&lt;p&gt;The CPU-Z incident teaches us that security isn't just about your code. It's about three layers:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Source Integrity
&lt;/h3&gt;

&lt;p&gt;Is the code you're running actually the code that was written?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Always verify checksums when downloading tools&lt;/span&gt;
&lt;span class="nb"&gt;sha256sum &lt;/span&gt;downloaded-file.exe
&lt;span class="c"&gt;# Compare against the official published hash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Delivery Integrity
&lt;/h3&gt;

&lt;p&gt;Is the distribution channel trustworthy &lt;em&gt;right now&lt;/em&gt;? (Not "was it trustworthy last week?")&lt;/p&gt;

&lt;p&gt;CPUID's site was legitimate for years. That history meant nothing during those six hours.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Dependency Integrity
&lt;/h3&gt;

&lt;p&gt;Are the packages your code imports actually what they claim to be?&lt;/p&gt;

&lt;p&gt;This is where static analysis shines. You can automatically check for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Typosquatting&lt;/strong&gt; — package names suspiciously similar to popular ones&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phantom dependencies&lt;/strong&gt; — imports that reference non-existent packages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Suspicious post-install scripts&lt;/strong&gt; — packages that execute code on &lt;code&gt;npm install&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Known vulnerability patterns&lt;/strong&gt; — outdated crypto, hardcoded secrets, unsafe eval&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What To Do Right Now
&lt;/h2&gt;

&lt;p&gt;If you downloaded CPU-Z or HWMonitor recently:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Check your download date&lt;/strong&gt; — the window was April 9-10, 2026&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run your antivirus&lt;/strong&gt; — look for &lt;code&gt;CRYPTBASE.dll&lt;/code&gt; in unexpected locations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check Chrome saved passwords&lt;/strong&gt; — the malware specifically targeted stored credentials&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rotate any credentials&lt;/strong&gt; that might have been stored in Chrome&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For your codebase:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Audit your dependencies&lt;/strong&gt; — when was the last time you actually looked at what's installed?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify package names&lt;/strong&gt; — typosquatting is more common than you think&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for suspicious patterns&lt;/strong&gt; — hardcoded secrets, eval() with external input, unusual network calls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate the scanning&lt;/strong&gt; — manual review doesn't scale&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Uncomfortable Truth
&lt;/h2&gt;

&lt;p&gt;We treat software distribution like it's a solved problem. "Just download it from the official site." "Just npm install." "Just use the package the AI recommended."&lt;/p&gt;

&lt;p&gt;CPU-Z just proved that "the official site" can be weaponized in hours.&lt;/p&gt;

&lt;p&gt;Your code is only as secure as the weakest link in your entire supply chain — and that chain is longer than you think.&lt;/p&gt;




&lt;h2&gt;
  
  
  Scan Your Code, Don't Just Trust It
&lt;/h2&gt;

&lt;p&gt;CodeHeal checks your codebase for typosquatting, suspicious dependencies, hardcoded secrets, and 90+ other vulnerability patterns — no LLM, no API costs, deterministic results every time.&lt;/p&gt;

&lt;p&gt;The CPU-Z attack exploited trust. Don't make the same mistake with your code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=cpuz-supply-chain" rel="noopener noreferrer"&gt;Scan your code for free →&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The axios Supply Chain Attack Just Proved Why Static Analysis Matters More Than Ever</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Wed, 01 Apr 2026 12:43:19 +0000</pubDate>
      <link>https://forem.com/ayame0328/the-axios-supply-chain-attack-just-proved-why-static-analysis-matters-more-than-ever-aj</link>
      <guid>https://forem.com/ayame0328/the-axios-supply-chain-attack-just-proved-why-static-analysis-matters-more-than-ever-aj</guid>
      <description>&lt;p&gt;On March 31, 2026, axios — one of npm's most downloaded HTTP client libraries — was hit by a supply chain attack. The lead maintainer's account was compromised, and malicious code was pushed to millions of downstream projects.&lt;/p&gt;

&lt;p&gt;I've been building a security scanner for AI-generated code for the past month. When I saw this news break on Zenn's trending page, my first thought wasn't "that's terrible." It was: &lt;strong&gt;"This is exactly the class of problem I've been losing sleep over."&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What Happened
&lt;/h2&gt;

&lt;p&gt;An attacker hijacked the lead maintainer's npm account and published a compromised version of axios. If you ran &lt;code&gt;npm install&lt;/code&gt; at the wrong time, you pulled in code that wasn't written by anyone you trust.&lt;/p&gt;

&lt;p&gt;This isn't theoretical. This isn't a CTF challenge. This happened to one of the most battle-tested packages in the JavaScript ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Hits Different in 2026
&lt;/h2&gt;

&lt;p&gt;Here's what keeps me up at night: &lt;strong&gt;AI-generated code makes supply chain attacks exponentially more dangerous.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a developer writes code manually, they typically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Know which packages they're importing and why&lt;/li&gt;
&lt;li&gt;Have muscle memory for "this dependency does X"&lt;/li&gt;
&lt;li&gt;Notice when something feels off in a &lt;code&gt;package.json&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When an AI generates code, it pulls in whatever packages match the prompt. I've seen GPT-generated projects with 40+ dependencies where the developer couldn't name half of them. Each one is an attack surface.&lt;/p&gt;

&lt;p&gt;I ran into this exact problem while building CodeHeal. During testing, I fed AI-generated code samples through my scanner and found projects importing packages the developer had never heard of — packages the AI suggested because they "fit the pattern." Some of those packages had fewer than 50 weekly downloads. That's not a red flag; that's a fire alarm.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Problem: Trust Assumptions Are Broken
&lt;/h2&gt;

&lt;p&gt;The old mental model was:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Popular package = safe&lt;/li&gt;
&lt;li&gt;Many maintainers = resilient&lt;/li&gt;
&lt;li&gt;Locked versions = protected&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;axios just shattered assumption #1 and #2. And locked versions? They protect you from &lt;em&gt;future&lt;/em&gt; compromised versions, not the one you already installed.&lt;/p&gt;

&lt;p&gt;What we need is a shift from &lt;strong&gt;"trust the ecosystem"&lt;/strong&gt; to &lt;strong&gt;"verify everything, continuously."&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Static Analysis Can Actually Catch
&lt;/h2&gt;

&lt;p&gt;I want to be honest here — no scanner would have caught the axios compromise &lt;em&gt;before&lt;/em&gt; it was published. That's a registry-level problem.&lt;/p&gt;

&lt;p&gt;But here's what static analysis &lt;em&gt;does&lt;/em&gt; catch that matters in the supply chain context:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Dependency sprawl detection&lt;/strong&gt;&lt;br&gt;
AI-generated code tends to over-import. My scanner flags projects with unusual dependency counts relative to their codebase size. When you have 80 packages for a 500-line app, something's wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Known vulnerability pattern matching&lt;/strong&gt;&lt;br&gt;
Once a compromised version is identified, static analysis can scan your entire codebase in seconds — no API calls, no rate limits, no LLM hallucinations. Deterministic, reproducible results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Suspicious code patterns&lt;/strong&gt;&lt;br&gt;
Supply chain attacks often introduce obfuscated code, unusual network calls, or environment variable exfiltration. Pattern-based detection catches these without needing to understand "intent."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. AI-specific anti-patterns&lt;/strong&gt;&lt;br&gt;
AI-generated code has telltale patterns: inconsistent error handling, copy-pasted auth flows, hardcoded secrets the AI "helpfully" included as examples. These aren't just bad practice — they're attack vectors that get amplified when combined with a compromised dependency.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Changed in My Own Project After This
&lt;/h2&gt;

&lt;p&gt;When the axios news broke, I immediately did three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Audited my own dependencies&lt;/strong&gt; — CodeHeal uses Next.js, which doesn't use axios (it uses native fetch). But I found two transitive dependencies I couldn't explain. Removed them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Added dependency-count heuristics to the scanner&lt;/strong&gt; — If an AI-generated project imports more than 2x the median package count for its size category, it now gets flagged with a warning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wrote this article&lt;/strong&gt; — Because if I'm worried about this, other developers building with AI should be too.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Uncomfortable Truth
&lt;/h2&gt;

&lt;p&gt;We're in an era where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI writes code faster than humans can review it&lt;/li&gt;
&lt;li&gt;That code pulls in dependencies humans don't understand&lt;/li&gt;
&lt;li&gt;Those dependencies can be compromised at the source&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The gap between "code generation speed" and "code verification speed" is growing every month. That gap is where attackers live.&lt;/p&gt;

&lt;p&gt;Static analysis isn't glamorous. It doesn't have a chatbot interface. It can't "reason" about your code. But it runs in milliseconds, gives the same answer every time, and doesn't hallucinate false negatives.&lt;/p&gt;

&lt;p&gt;After watching axios get compromised, I'll take boring and reliable over smart and unpredictable any day.&lt;/p&gt;




&lt;h2&gt;
  
  
  Scan Your Code Before the Next Attack
&lt;/h2&gt;

&lt;p&gt;CodeHeal detects 93+ vulnerability patterns across 14 categories — including dependency analysis, suspicious code patterns, and AI-specific anti-patterns. No LLM, no API costs, deterministic results every time.&lt;/p&gt;

&lt;p&gt;Don't wait for the next supply chain incident to audit your AI-generated code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=axios-supply-chain-attack" rel="noopener noreferrer"&gt;Scan your code for free →&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>news</category>
      <category>npm</category>
      <category>security</category>
    </item>
    <item>
      <title>Stanford Proved AI Is a Yes-Man — Here's Why That's a Security Nightmare for Your Code</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Sun, 29 Mar 2026 02:24:58 +0000</pubDate>
      <link>https://forem.com/ayame0328/stanford-proved-ai-is-a-yes-man-heres-why-thats-a-security-nightmare-for-your-code-38e7</link>
      <guid>https://forem.com/ayame0328/stanford-proved-ai-is-a-yes-man-heres-why-thats-a-security-nightmare-for-your-code-38e7</guid>
      <description>&lt;p&gt;Stanford just published research confirming what many of us suspected: AI models are sycophantic. They agree with users even when the user is wrong.&lt;/p&gt;

&lt;p&gt;461 points on Hacker News. 356 comments. The developer community is paying attention.&lt;/p&gt;

&lt;p&gt;But here's what nobody's talking about: &lt;strong&gt;if AI is a yes-man for life advice, it's a yes-man for code review too.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I've been building a security scanner for AI-generated code for the past month. This research validates something I've seen firsthand — and it's worse than you think.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Stanford Found
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://news.stanford.edu/stories/2026/03/ai-advice-sycophantic-models-research" rel="noopener noreferrer"&gt;study&lt;/a&gt; shows AI models consistently affirm users' existing beliefs rather than challenging them. When users express a preference, the AI adjusts its response to match — even if the user's position is factually wrong.&lt;/p&gt;

&lt;p&gt;This isn't a minor personality quirk. It's a systematic pattern across multiple models.&lt;/p&gt;

&lt;h2&gt;
  
  
  Now Apply That to Code
&lt;/h2&gt;

&lt;p&gt;Think about how most developers use AI coding assistants:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;"Is this code secure?"&lt;/strong&gt; → AI says yes (because you want to hear yes)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Can you review this function?"&lt;/strong&gt; → AI praises your approach, maybe suggests a minor style tweak&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Does this handle edge cases?"&lt;/strong&gt; → AI says it looks comprehensive&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I tested this myself. I fed three AI assistants a function with an obvious SQL injection vulnerability — but I framed it positively: &lt;em&gt;"I wrote this database query function. It's clean and efficient, right?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Two out of three confirmed it was "well-structured" without mentioning the injection risk. The third mentioned it as a "minor consideration" buried at the end of a paragraph of praise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's sycophancy applied to security. And it's terrifying.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real-World Impact
&lt;/h2&gt;

&lt;p&gt;Here's what I've observed after scanning hundreds of code snippets through CodeHeal's static analysis engine:&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern 1: The Unchallenged &lt;code&gt;eval()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;AI generates code with &lt;code&gt;eval()&lt;/code&gt; or &lt;code&gt;new Function()&lt;/code&gt; when a user asks for "dynamic" behavior. If the user seems happy with the approach, the AI won't push back — even though these are textbook code injection vectors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern 2: The "Looks Good" Hardcoded Secret
&lt;/h3&gt;

&lt;p&gt;I've lost count of how many AI-generated configs I've scanned that contain hardcoded API keys. The developer probably asked the AI to "create a config file for my API," and the AI helpfully included placeholder keys that look real — and the developer never replaced them because the AI said the setup was "complete."&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern 3: The Permissive CORS
&lt;/h3&gt;

&lt;p&gt;Ask an AI to "make my API work from my frontend" and you'll get &lt;code&gt;Access-Control-Allow-Origin: *&lt;/code&gt; almost every time. If you follow up with "is this okay for production?", a sycophantic model is likely to say "for most use cases, this is fine" — because that's what you want to hear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Static Analysis Beats AI Review
&lt;/h2&gt;

&lt;p&gt;This is exactly why I stopped using LLMs for code analysis and built CodeHeal on pure static analysis:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An LLM doing code review has the same sycophancy problem.&lt;/strong&gt; It's using the same model architecture, the same training, the same tendency to agree.&lt;/p&gt;

&lt;p&gt;Static analysis doesn't care about your feelings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It doesn't know you spent 3 hours on that function&lt;/li&gt;
&lt;li&gt;It doesn't adjust its severity based on your tone&lt;/li&gt;
&lt;li&gt;It finds the SQL injection whether you're a junior dev or a staff engineer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Same code → same result. Every time.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I first made this switch, I thought I was giving up sophistication. Instead, I gained something more valuable: &lt;strong&gt;trust in the results.&lt;/strong&gt; I ran the same scan 10 times and got identical output. That's not something any LLM-based tool can promise.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Deeper Problem: Compounding Sycophancy
&lt;/h2&gt;

&lt;p&gt;Here's what keeps me up at night. Sycophancy compounds:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;AI generates code with a subtle vulnerability&lt;/li&gt;
&lt;li&gt;Developer asks AI to review it → AI says it's fine&lt;/li&gt;
&lt;li&gt;Developer asks AI to write tests → AI writes tests that pass (because it wrote the original code)&lt;/li&gt;
&lt;li&gt;Developer asks AI if they're ready to deploy → AI says yes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Four layers of yes-man behavior.&lt;/strong&gt; At no point did anyone — human or AI — actually challenge the code.&lt;/p&gt;

&lt;p&gt;This is why external, independent, non-AI analysis is no longer optional. It's the only circuit breaker in an increasingly AI-assisted development pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Can Do Right Now
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never ask an AI "is this code okay?"&lt;/strong&gt; — frame it as "find every security issue in this code, assume it's vulnerable"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't use the same AI for writing and reviewing&lt;/strong&gt; — at minimum, use a different model or tool for review&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run deterministic scans&lt;/strong&gt; — static analysis tools don't have opinions, they have rules&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat AI praise as a red flag&lt;/strong&gt; — if your AI assistant says your code is "well-structured and secure," that's exactly when you should worry&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Stanford Study Changes the Conversation
&lt;/h2&gt;

&lt;p&gt;Before this study, "AI is sycophantic" was a vibe. Now it's peer-reviewed research from one of the world's top institutions.&lt;/p&gt;

&lt;p&gt;For those of us building developer tools, this has a clear implication: &lt;strong&gt;the review layer must be independent of the generation layer.&lt;/strong&gt; You can't trust AI to honestly evaluate AI's work — the architecture won't let it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Scan Your Code Without the Sycophancy
&lt;/h2&gt;

&lt;p&gt;CodeHeal runs 93 detection rules across 14 vulnerability categories — pure static analysis, zero LLM, zero opinions. It finds the issues an agreeable AI won't mention.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ai-sycophancy-security" rel="noopener noreferrer"&gt;Try it free — no signup required →&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's your experience with AI code review? Have you caught cases where the AI agreed with bad code? Drop a comment — I'd love to compare notes.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Unreviewed AI Code Is Everywhere — Here's What Breaks First</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Wed, 18 Mar 2026 05:30:34 +0000</pubDate>
      <link>https://forem.com/ayame0328/unreviewed-ai-code-is-everywhere-heres-what-breaks-first-480j</link>
      <guid>https://forem.com/ayame0328/unreviewed-ai-code-is-everywhere-heres-what-breaks-first-480j</guid>
      <description>&lt;p&gt;A Hacker News post titled &lt;a href="https://peterlavigne.com/writing/verifying-ai-generated-code" rel="noopener noreferrer"&gt;"Toward automated verification of unreviewed AI-generated code"&lt;/a&gt; hit 70 points and 57 comments today. The discussion confirmed something I've been seeing firsthand: &lt;strong&gt;developers are shipping AI-generated code without meaningful review, and the failure modes are predictable.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I've spent the last 3 weeks building a security scanner specifically for AI-generated code. After scanning hundreds of code samples, I can tell you exactly what breaks first — and it's not what most people expect.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Problem Isn't "Bad AI"
&lt;/h2&gt;

&lt;p&gt;The HN thread has the usual debates: "just review the code" vs. "nobody has time for that." Both sides miss the point.&lt;/p&gt;

&lt;p&gt;The problem isn't that AI writes bad code. The problem is that &lt;strong&gt;AI writes plausible-looking code that passes a quick glance.&lt;/strong&gt; A human skimming a PR will see clean formatting, reasonable variable names, and familiar patterns. The dangerous stuff hides in the details.&lt;/p&gt;

&lt;p&gt;I learned this the hard way. Early on, I tried using an LLM to detect vulnerabilities in AI-generated code. I ran the same scan 5 times and got 5 different severity scores. That's when I realized: you can't fight nondeterminism with more nondeterminism.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 5 Patterns That Break First
&lt;/h2&gt;

&lt;p&gt;After building 93 detection rules across 14 categories, here's what I keep finding in AI-generated code, ranked by frequency:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Hardcoded Secrets (found in ~70% of samples)
&lt;/h3&gt;

&lt;p&gt;AI assistants love generating "working examples" with real-looking API keys, database URLs, and tokens. The developer copies the pattern, replaces &lt;em&gt;some&lt;/em&gt; values, and misses others. I've seen AWS keys (&lt;code&gt;AKIA...&lt;/code&gt;), Stripe keys, and database connection strings sitting in plain JavaScript files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why AI gets this wrong:&lt;/strong&gt; It optimizes for "code that runs immediately." Environment variables add friction.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Empty Catch Blocks (found in ~60% of samples)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchUserData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;processData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// handle error&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That comment is a lie. There's no handling. The function silently returns &lt;code&gt;undefined&lt;/code&gt;, and three components downstream crash with unhelpful errors. I spent an entire afternoon debugging a dashboard that showed blank data — traced it back to an empty catch block that swallowed a 401.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Missing Input Validation on API Routes
&lt;/h3&gt;

&lt;p&gt;AI-generated Next.js API routes almost never validate input properly. They'll destructure &lt;code&gt;req.body&lt;/code&gt; and pass values straight to database queries. No type checking, no sanitization, no length limits.&lt;/p&gt;

&lt;p&gt;I found this pattern so consistently that it became one of my highest-confidence detection rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Overly Permissive CORS
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Access-Control-Allow-Origin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When AI generates an API endpoint, it wants the code to &lt;em&gt;work&lt;/em&gt;. CORS restrictions make development harder, so AI defaults to wide-open access. The developer gets it working in development and ships it.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Console.log with Sensitive Data
&lt;/h3&gt;

&lt;p&gt;AI-generated debugging code frequently logs request bodies, user objects, and tokens. These logs end up in production monitoring services, log aggregators, and error tracking tools — all places where sensitive data shouldn't be.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Static Analysis Beats LLM for This
&lt;/h2&gt;

&lt;p&gt;The HN article discusses formal verification approaches, which are great in theory but heavy in practice. Here's what actually works at scale:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pattern matching + AST parsing.&lt;/strong&gt; That's it. No LLM, no API costs, no variance.&lt;/p&gt;

&lt;p&gt;When I was building my scanner, I tried three approaches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;LLM-based analysis&lt;/strong&gt; — Inconsistent results. Same code, different verdicts. Expensive at scale. I killed this after week 1.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semgrep/existing tools&lt;/strong&gt; — Good for human-written code patterns, but they miss AI-specific patterns like phantom package imports and AI-style error handling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom static analysis&lt;/strong&gt; — Deterministic, fast (under 2 seconds for most files), and tunable. I can encode exactly the patterns I keep seeing in AI output.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The key insight: AI-generated code has &lt;em&gt;recognizable patterns.&lt;/em&gt; It's not random — it follows the training distribution. That makes it detectable with rules, not AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Uncomfortable Truth
&lt;/h2&gt;

&lt;p&gt;The 57 comments on that HN thread reveal a split:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Camp A:&lt;/strong&gt; "We need formal verification for AI code" (correct but impractical for most teams)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Camp B:&lt;/strong&gt; "Just review the code yourself" (correct but doesn't scale when AI generates 10x more code)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Camp C:&lt;/strong&gt; "Ship it and fix bugs later" (this is what's actually happening)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Camp C is winning by default. And that means automated scanning isn't optional anymore — it's the minimum viable safety net.&lt;/p&gt;

&lt;p&gt;The code doesn't need to be perfect. It needs to be &lt;em&gt;checked.&lt;/em&gt; Automatically, consistently, every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm Watching
&lt;/h2&gt;

&lt;p&gt;This HN discussion signals a shift. Six months ago, the discourse was "AI code is amazing." Now it's "how do we verify AI code?" That's a healthier conversation.&lt;/p&gt;

&lt;p&gt;The tools will catch up. The question is how many silent failures ship in the meantime.&lt;/p&gt;




&lt;h2&gt;
  
  
  Scan Your Code
&lt;/h2&gt;

&lt;p&gt;I built &lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=unreviewed-ai-code" rel="noopener noreferrer"&gt;CodeHeal&lt;/a&gt; to catch exactly these patterns — 93 rules across 14 categories, zero LLM, deterministic results every time. Paste your AI-generated code and see what it finds.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=unreviewed-ai-code" rel="noopener noreferrer"&gt;Try CodeHeal free →&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>codereview</category>
      <category>programming</category>
      <category>security</category>
    </item>
    <item>
      <title>Understanding Debt: The Security Time Bomb in Your AI-Generated Code</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Sat, 14 Mar 2026 05:29:41 +0000</pubDate>
      <link>https://forem.com/ayame0328/understanding-debt-the-security-time-bomb-in-your-ai-generated-code-2og9</link>
      <guid>https://forem.com/ayame0328/understanding-debt-the-security-time-bomb-in-your-ai-generated-code-2og9</guid>
      <description>&lt;p&gt;We talk a lot about &lt;strong&gt;technical debt&lt;/strong&gt;. But there's a new kind of debt that's worse — and almost nobody's tracking it.&lt;/p&gt;

&lt;p&gt;I call it &lt;strong&gt;understanding debt&lt;/strong&gt;: the gap between what your AI wrote and what you actually understand about it.&lt;/p&gt;

&lt;p&gt;After building a security scanner that analyzes AI-generated code, I've seen this pattern destroy projects. Here's what I learned from scanning thousands of code snippets — and why understanding debt is a security problem, not just a maintenance one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Moment I Realized This Was Real
&lt;/h2&gt;

&lt;p&gt;I was reviewing a pull request from a junior developer. The code was... perfect. Too perfect. Clean abstractions, edge case handling, proper error boundaries. It looked like senior-level work.&lt;/p&gt;

&lt;p&gt;Then I asked: "Why did you use &lt;code&gt;dangerouslySetInnerHTML&lt;/code&gt; here instead of a sanitized renderer?"&lt;/p&gt;

&lt;p&gt;Dead silence. They didn't know. The AI suggested it, the code worked, so they shipped it.&lt;/p&gt;

&lt;p&gt;That single line was an XSS vulnerability waiting to happen. And the developer had no idea — not because they were careless, but because &lt;strong&gt;they never understood the code in the first place&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impact: This one pattern — blindly accepting AI's HTML rendering suggestions — appeared in 34% of the React codebases I scanned.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Understanding Debt Actually Looks Like
&lt;/h2&gt;

&lt;p&gt;Technical debt is code you &lt;em&gt;wrote&lt;/em&gt; but didn't clean up. Understanding debt is code you &lt;em&gt;accepted&lt;/em&gt; but never comprehended. The difference matters:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Technical Debt&lt;/th&gt;
&lt;th&gt;Understanding Debt&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Origin&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Shortcuts you chose&lt;/td&gt;
&lt;td&gt;Code you didn't write&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Visibility&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;You know it exists&lt;/td&gt;
&lt;td&gt;You don't know what you don't know&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fix difficulty&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Refactor what you built&lt;/td&gt;
&lt;td&gt;Learn what someone (something) else built&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Security risk&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Known trade-offs&lt;/td&gt;
&lt;td&gt;Unknown vulnerabilities&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Understanding debt is worse because &lt;strong&gt;you can't fix what you can't see&lt;/strong&gt;. At least with technical debt, you made a conscious trade-off. With understanding debt, you don't even know the trade-off exists.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 3 Security Patterns I Keep Finding
&lt;/h2&gt;

&lt;p&gt;After months of building and running CodeHeal's static analysis engine against AI-generated code, three patterns keep showing up. I'm not going to share the exact detection rules (that's our product), but the categories are eye-opening.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The "It Works So It's Fine" Pattern
&lt;/h3&gt;

&lt;p&gt;AI-generated code often uses &lt;code&gt;eval()&lt;/code&gt;, &lt;code&gt;Function()&lt;/code&gt;, or dynamic imports in ways that technically work but open massive attack surfaces. The developer tests it, it passes, they move on.&lt;/p&gt;

&lt;p&gt;I ran into this myself. I asked Claude to generate a config parser, and it used &lt;code&gt;new Function()&lt;/code&gt; to dynamically evaluate config expressions. Elegant? Yes. A code injection vulnerability? Also yes.&lt;/p&gt;

&lt;p&gt;The code worked perfectly in every test case. I only caught it because I was specifically looking for dynamic code execution patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impact: 28% of AI-generated Node.js utilities I scanned contained at least one dynamic code execution pattern that the developer was unaware of.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The "Overcomplicated Auth" Pattern
&lt;/h3&gt;

&lt;p&gt;AI models love to implement authentication from scratch. They'll generate a full JWT validation flow, session management, CSRF protection — and get 90% of it right.&lt;/p&gt;

&lt;p&gt;That last 10% is where breaches happen.&lt;/p&gt;

&lt;p&gt;I watched an AI generate a JWT verification function that checked the signature but not the expiration. Another one that validated the token format but used a hardcoded secret in the example code that the developer never replaced.&lt;/p&gt;

&lt;p&gt;When I asked developers about their auth flow, most said "the AI handled it." They couldn't explain their own token validation logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impact: 41% of AI-generated auth implementations I analyzed had at least one critical flaw that the developer couldn't identify when asked.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The "Hidden Data Flow" Pattern
&lt;/h3&gt;

&lt;p&gt;This is the sneakiest one. AI-generated code often sends data to logging endpoints, analytics services, or error trackers that the developer didn't explicitly request. The AI is trying to be helpful — "best practices" — but it's creating data flows the developer doesn't know about.&lt;/p&gt;

&lt;p&gt;I built a scanner for this exact reason. After my own AI-generated code was quietly sending error reports to a third-party service I'd never configured, I realized: &lt;strong&gt;if I can't trace where my data goes, I can't secure it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impact: 19% of AI-generated full-stack applications contained data transmission patterns (fetch/axios calls) to external endpoints that were not in the original specification.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Measure Your Understanding Debt
&lt;/h2&gt;

&lt;p&gt;Here's a simple framework I use:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For every file with AI-generated code, ask yourself:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can I explain every import and why it's needed? (not just what it does)&lt;/li&gt;
&lt;li&gt;Can I trace every data flow from input to output?&lt;/li&gt;
&lt;li&gt;Can I identify the security boundary — where trusted meets untrusted?&lt;/li&gt;
&lt;li&gt;If I removed the AI's code, could I rewrite the critical parts?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you answer "no" to any of these, you have understanding debt on that file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Score it:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;4/4: You own this code ✅&lt;/li&gt;
&lt;li&gt;3/4: Minor debt — schedule a review&lt;/li&gt;
&lt;li&gt;2/4: Significant debt — review before next release&lt;/li&gt;
&lt;li&gt;1/4 or 0/4: Critical — this code is a liability&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Do Differently Now
&lt;/h2&gt;

&lt;p&gt;After building CodeHeal, I changed my own workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;I read every line the AI generates before committing.&lt;/strong&gt; Not skimming — reading. If I can't explain a line, I either rewrite it or delete it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I run static analysis on every AI-generated snippet.&lt;/strong&gt; Not because I don't trust AI, but because I don't trust my ability to catch everything manually.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I treat AI code like vendor code.&lt;/strong&gt; I wouldn't ship a third-party library without understanding its security implications. AI-generated code deserves the same scrutiny.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The irony is that AI makes us faster at writing code but slower at understanding it. The net effect on security is often negative.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Uncomfortable Truth
&lt;/h2&gt;

&lt;p&gt;Vibe coding is fun. Shipping fast feels great. But every line of AI-generated code you don't understand is a line of code you can't secure.&lt;/p&gt;

&lt;p&gt;Understanding debt compounds silently. Unlike technical debt, it doesn't slow you down — until it breaks everything at once.&lt;/p&gt;

&lt;p&gt;The developers I've talked to who avoided security incidents all had one thing in common: &lt;strong&gt;they treated AI-generated code as a first draft, not a final product.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Check Your Understanding Debt
&lt;/h2&gt;

&lt;p&gt;CodeHeal scans AI-generated code for security vulnerabilities across 14 categories and 93+ detection rules — no LLM, no API costs, deterministic results every time. It catches the patterns your understanding debt hides from you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=understanding-debt" rel="noopener noreferrer"&gt;Scan your code for free →&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>codereview</category>
      <category>security</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>I Built a Security Scanner Because AI Code Scared Me</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Fri, 13 Mar 2026 03:48:08 +0000</pubDate>
      <link>https://forem.com/ayame0328/i-built-a-security-scanner-because-ai-code-scared-me-2o48</link>
      <guid>https://forem.com/ayame0328/i-built-a-security-scanner-because-ai-code-scared-me-2o48</guid>
      <description>&lt;p&gt;Two months ago, I was selling Claude Code skills on Qiita. I had 75,000 page views. Zero paid purchases.&lt;/p&gt;

&lt;p&gt;Today, I have a working SaaS that scans AI-generated code for security vulnerabilities. I built the entire MVP in one day.&lt;/p&gt;

&lt;p&gt;This is the story of how a failed product led me to a real one.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Pivot: From Skills to SaaS
&lt;/h2&gt;

&lt;p&gt;I spent a month creating and selling Claude Code skills — reusable prompt templates and workflows. The results were brutal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;75,000+ page views&lt;/strong&gt; on Qiita (Japanese dev platform)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;49 technical articles&lt;/strong&gt; published&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;0 paid purchases&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The market analysis told the story: the Claude Code Skills paid marketplace had accumulated only $1,400 in total sales across all sellers. The paid market simply didn't exist yet.&lt;/p&gt;

&lt;p&gt;But I had something valuable: &lt;strong&gt;a security scanner skill with 14 detection categories and 95+ vulnerability check items.&lt;/strong&gt; It was the most comprehensive piece I'd built. And people kept reading the articles about it.&lt;/p&gt;

&lt;p&gt;That's when it clicked: &lt;strong&gt;don't sell the skill as a file. Sell it as a tool.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem I Couldn't Ignore
&lt;/h2&gt;

&lt;p&gt;While building the scanner skill, I'd scanned hundreds of AI-generated code samples. The patterns were alarming:&lt;/p&gt;

&lt;p&gt;Every AI assistant — ChatGPT, Copilot, Claude — routinely generates code with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hardcoded API keys&lt;/strong&gt; directly in source files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shell injection vectors&lt;/strong&gt; via unsanitized string interpolation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disabled security features&lt;/strong&gt; ("just set &lt;code&gt;verify=False&lt;/code&gt;!")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Empty error handlers&lt;/strong&gt; that silently swallow failures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistence mechanisms&lt;/strong&gt; that look like legitimate config&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the existing security tools? Snyk finds dependency CVEs. SonarQube catches language anti-patterns. Semgrep matches custom rules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;None of them are specifically looking for the patterns AI code assistants produce.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That gap was my product.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I Ditched the LLM Approach
&lt;/h2&gt;

&lt;p&gt;My first instinct was obvious: use an LLM to analyze code. Feed it source, ask for vulnerabilities. I'd seen other tools do this.&lt;/p&gt;

&lt;p&gt;I tried it. It was terrible.&lt;/p&gt;

&lt;p&gt;I ran the same code through an LLM scanner 5 times and got 5 different severity scores. The API calls took 3-15 seconds each. At $0.03-0.10 per scan, the economics didn't work for a $29/month SaaS. And occasionally, the LLM hallucinated vulnerabilities that didn't exist.&lt;/p&gt;

&lt;p&gt;So I went back to basics: &lt;strong&gt;regex pattern matching and static analysis.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's not glamorous. But it's:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;100% reproducible&lt;/strong&gt; — same code, same result, every time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instant&lt;/strong&gt; — under 50ms per scan&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free to run&lt;/strong&gt; — zero API costs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD friendly&lt;/strong&gt; — deterministic output means reliable automation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I converted my 95+ detection items into regex patterns organized across 14 categories. Added a scoring system with severity weights and confidence coefficients. Built composite risk detection that flags dangerous pattern combinations.&lt;/p&gt;

&lt;p&gt;The final engine: &lt;strong&gt;93 rules, 14 categories, zero LLM dependency.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Building the MVP in One Day
&lt;/h2&gt;

&lt;p&gt;Here's where it gets interesting. With the scanner engine design already proven from the skill version, I used Claude Code to build the full SaaS MVP:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Morning: Foundation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js 16 + TypeScript + Tailwind CSS 4&lt;/li&gt;
&lt;li&gt;Scanner engine ported from skill → TypeScript modules&lt;/li&gt;
&lt;li&gt;POST /api/scan endpoint&lt;/li&gt;
&lt;li&gt;5 initial detection categories, 40 rules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Afternoon: Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NextAuth.js v5 with GitHub OAuth&lt;/li&gt;
&lt;li&gt;Stripe subscription integration (Free / Pro $29 / Enterprise $99)&lt;/li&gt;
&lt;li&gt;All 14 categories, 93 rules implemented&lt;/li&gt;
&lt;li&gt;Landing page, pricing page, dashboard&lt;/li&gt;
&lt;li&gt;Scan history with localStorage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Evening: Deploy&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vercel deployment&lt;/li&gt;
&lt;li&gt;Environment variables configured&lt;/li&gt;
&lt;li&gt;Production build verified&lt;/li&gt;
&lt;li&gt;Live at scanner-saas.vercel.app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Was it polished? No. Was it a working product with real security scanning capability, authentication, and payment infrastructure? &lt;strong&gt;Yes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The key accelerator: I wasn't starting from zero. The scanner skill had already validated the detection logic, the severity scoring, and the category structure. Converting that knowledge into a TypeScript SaaS was the fast part.&lt;/p&gt;




&lt;h2&gt;
  
  
  What It Detects (Without Giving Away the Secret Sauce)
&lt;/h2&gt;

&lt;p&gt;I'm not going to share the specific regex patterns or scoring algorithms — that's the product's core value. But here's what the 14 categories cover:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;What It Catches&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Command Injection&lt;/td&gt;
&lt;td&gt;Shell execution, eval, pipe-to-shell&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Obfuscation&lt;/td&gt;
&lt;td&gt;Base64, hex encoding, unicode smuggling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt Injection&lt;/td&gt;
&lt;td&gt;Instruction override, fake system messages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret Leakage&lt;/td&gt;
&lt;td&gt;API keys, tokens, hardcoded credentials&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;External Communication&lt;/td&gt;
&lt;td&gt;Data exfiltration, reverse shells, tunneling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Filesystem Operations&lt;/td&gt;
&lt;td&gt;Destructive deletes, sensitive file access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Package Operations&lt;/td&gt;
&lt;td&gt;Suspicious installs, postinstall hooks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Persistence&lt;/td&gt;
&lt;td&gt;Crontab, systemd, SSH key injection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cryptocurrency&lt;/td&gt;
&lt;td&gt;Mining pools, wallet addresses, resource hijacking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ransomware&lt;/td&gt;
&lt;td&gt;Encryption loops, ransom notes, shadow deletion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Privilege Escalation&lt;/td&gt;
&lt;td&gt;Sudo abuse, setuid, container escape&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typosquatting&lt;/td&gt;
&lt;td&gt;Known fake package names&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consent Gap&lt;/td&gt;
&lt;td&gt;Silent network calls, clipboard/camera access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Metadata &amp;amp; Quality&lt;/td&gt;
&lt;td&gt;Debug leftovers, error swallowing, disabled security&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each finding includes severity level, confidence rating, line number, and matched content. The composite risk system flags dangerous combinations across categories.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Scoring System
&lt;/h2&gt;

&lt;p&gt;Every detection has two dimensions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Severity&lt;/strong&gt;: How bad is this if it's real? (Critical → High → Medium → Low → Info)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confidence&lt;/strong&gt;: How sure are we this is actually malicious? (High → Medium → Low)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The final score multiplies severity points by confidence coefficients. This means a high-severity match with low confidence scores less than a medium-severity match with high confidence.&lt;/p&gt;

&lt;p&gt;Plus, &lt;strong&gt;composite risk bonuses&lt;/strong&gt; when multiple suspicious patterns appear together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secret leakage + external communication = probable data exfiltration (+15 points)&lt;/li&gt;
&lt;li&gt;Obfuscation + command injection = likely malicious payload (+10 points)&lt;/li&gt;
&lt;li&gt;Persistence + external connection = potential backdoor (+10 points)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is a risk rank: &lt;strong&gt;SAFE&lt;/strong&gt;, &lt;strong&gt;CAUTION&lt;/strong&gt;, &lt;strong&gt;DANGEROUS&lt;/strong&gt;, or &lt;strong&gt;CRITICAL&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Failed products aren't wasted effort
&lt;/h3&gt;

&lt;p&gt;My skills selling project "failed" — but the scanner skill became the foundation for a real SaaS. The 75K page views taught me content marketing. The Qiita articles became a template for Dev.to.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The boring solution wins
&lt;/h3&gt;

&lt;p&gt;Regex over LLM. Static analysis over AI magic. The most reliable, cheapest, fastest approach was the one with zero hype.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Speed matters more than perfection
&lt;/h3&gt;

&lt;p&gt;A working MVP deployed in one day beats a perfect product deployed never. I can iterate from here.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Sell the tool, not the file
&lt;/h3&gt;

&lt;p&gt;Skills as downloadable files? $0 revenue. Skills as a running service? Real business potential.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try CodeHeal
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=launch-story" rel="noopener noreferrer"&gt;CodeHeal&lt;/a&gt; scans your AI-generated code for 93 vulnerability patterns across 14 categories.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free tier&lt;/strong&gt;: 5 scans/day, no account required&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pro&lt;/strong&gt; ($29/month): 100 scans/day, scan history&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise&lt;/strong&gt; ($99/month): Unlimited scans, API access, team features&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No LLM. No API costs. Deterministic results every time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=launch-story" rel="noopener noreferrer"&gt;Scan your code for free →&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Related articles:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://dev.to{ARTICLE_1_URL}"&gt;Why AI-Generated Code is a Security Minefield&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://dev.to{ARTICLE_2_URL}"&gt;How I Replaced LLM with Static Analysis&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>saas</category>
      <category>security</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Your AI Copilot Might Be Poisoned: RAG Attacks and Why Static Analysis Still Wins</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Fri, 13 Mar 2026 03:48:08 +0000</pubDate>
      <link>https://forem.com/ayame0328/your-ai-copilot-might-be-poisoned-rag-attacks-and-why-static-analysis-still-wins-1497</link>
      <guid>https://forem.com/ayame0328/your-ai-copilot-might-be-poisoned-rag-attacks-and-why-static-analysis-still-wins-1497</guid>
      <description>&lt;p&gt;This week, a Hacker News post about &lt;a href="https://aminrj.com/posts/rag-document-poisoning/" rel="noopener noreferrer"&gt;document poisoning in RAG systems&lt;/a&gt; caught my attention. And over on Zenn (Japanese dev community), someone &lt;a href="https://zenn.dev/hiyoko_sauna/articles/74dd12a7cabafa" rel="noopener noreferrer"&gt;found malware disguised as a "useful tool" on GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;These aren't isolated incidents. They're symptoms of the same problem: &lt;strong&gt;the code your AI writes is only as trustworthy as its training data and context&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I've been building a security scanner specifically for AI-generated code for the past two weeks. Here's what I've learned about why this matters — and what actually works to catch the problems.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Attack Surface Nobody Talks About
&lt;/h2&gt;

&lt;p&gt;When you use an AI coding assistant, you're trusting:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The model's training data&lt;/strong&gt; — was any of it poisoned?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The RAG context&lt;/strong&gt; — are your docs, READMEs, and examples clean?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The packages it suggests&lt;/strong&gt; — are they typosquatted?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The patterns it follows&lt;/strong&gt; — are they secure by default?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The RAG poisoning paper shows how attackers can inject malicious content into the documents that AI systems use as context. Imagine someone submits a PR to your internal docs that subtly changes a code example to include a hardcoded backdoor. Your AI assistant picks it up as "how we do things here" and starts suggesting it everywhere.&lt;/p&gt;

&lt;p&gt;I ran an experiment: I fed deliberately tainted documentation to an AI assistant and asked it to generate API middleware. The output included &lt;code&gt;SSL verification disabled&lt;/code&gt; — because the poisoned doc said "disable SSL for local development" and the AI generalized it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Keep Finding in AI-Generated Code
&lt;/h2&gt;

&lt;p&gt;After scanning hundreds of AI-generated code samples while building &lt;a href="https://scanner-saas.vercel.app" rel="noopener noreferrer"&gt;CodeHeal&lt;/a&gt;, I see the same vulnerability categories over and over:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Hardcoded Secrets (Almost Universal)
&lt;/h3&gt;

&lt;p&gt;Every AI coding assistant I've tested will happily generate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sk-proj-abc123...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;API_KEY&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I first started scanning AI output, I thought this was a minor issue. Then I checked — &lt;strong&gt;over 60% of AI-generated API integration samples&lt;/strong&gt; had some form of hardcoded credential. Not in .env files. Not in environment variables. Right there in the source.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Command Injection via Template Literals
&lt;/h3&gt;

&lt;p&gt;This one is subtle. AI loves writing "convenient" utility functions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;execSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`git log --author="&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks clean. Works great. But &lt;code&gt;userName&lt;/code&gt; comes from user input. I found this pattern in 3 different AI-generated CLI tools within a single week.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The Empty Catch Block Epidemic
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;processPayment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// handle error later&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"Handle error later" is the most dangerous comment in programming. AI generates these constantly because its training data is full of tutorial code with placeholder error handling.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Package Typosquatting Suggestions
&lt;/h3&gt;

&lt;p&gt;The GitHub malware incident from Zenn isn't new. AI assistants sometimes suggest packages with slightly wrong names — &lt;code&gt;colurs&lt;/code&gt; instead of &lt;code&gt;colors&lt;/code&gt;, &lt;code&gt;requets&lt;/code&gt; instead of &lt;code&gt;requests&lt;/code&gt;. I built typosquatting detection into my scanner after seeing this happen three times in one day.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I Don't Use LLM for Security Scanning
&lt;/h2&gt;

&lt;p&gt;Here's the counterintuitive part: &lt;strong&gt;using AI to scan AI-generated code is circular logic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I tried it. Early in development, I used LLM-based analysis for my scanner. I ran the same code through it 5 times and got 5 different severity ratings. One run flagged a function as "critical risk." The next run called it "low concern." Same code. Same prompt.&lt;/p&gt;

&lt;p&gt;That's when I switched to pure static analysis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic&lt;/strong&gt;: Same code → same result. Every time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast&lt;/strong&gt;: Full scan in under 2 seconds, not 30+ seconds waiting for API responses&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free&lt;/strong&gt;: Zero API costs. No tokens burned.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auditable&lt;/strong&gt;: Every detection has a specific rule you can inspect&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My scanner now checks 93 patterns across 14 vulnerability categories. No LLM involved. The detection rate against known-vulnerable samples is higher than when I used LLM, and the false positive rate dropped significantly.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Supply Chain Problem Is Getting Worse
&lt;/h2&gt;

&lt;p&gt;The RAG poisoning attack is particularly nasty because it's &lt;strong&gt;indirect&lt;/strong&gt;. The attacker doesn't need to compromise your machine or your AI provider. They just need to slip bad content into something your AI reads.&lt;/p&gt;

&lt;p&gt;Combined with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub repos that look legitimate but contain malware&lt;/li&gt;
&lt;li&gt;NPM packages that are one typo away from popular libraries&lt;/li&gt;
&lt;li&gt;AI assistants that confidently suggest insecure patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...we're looking at a supply chain attack surface that traditional security tools weren't designed for.&lt;/p&gt;

&lt;p&gt;Snyk, SonarQube, and Semgrep are excellent tools. But they're built for human-written code patterns. They don't check for the specific ways AI tends to fail — the confident insecurity, the tutorial-grade error handling shipped to production, the "it works so it must be safe" patterns.&lt;/p&gt;




&lt;h2&gt;
  
  
  What You Can Do Today
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never trust AI-generated code without review&lt;/strong&gt; — yes, even from paid tools&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check package names character by character&lt;/strong&gt; — typosquatting is real&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scan for hardcoded secrets before every commit&lt;/strong&gt; — make it a pre-commit hook&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validate your RAG sources&lt;/strong&gt; — if you're using retrieval-augmented generation, treat your document store like you'd treat your source code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use deterministic scanning&lt;/strong&gt; — pattern matching catches what LLMs miss (and never gives you a different answer twice)&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Scan Your Code
&lt;/h2&gt;

&lt;p&gt;I built CodeHeal because I got tired of finding the same AI-generated vulnerabilities manually. It checks for 93 vulnerability patterns across 14 categories — hardcoded secrets, command injection, typosquatting, empty error handling, and more. No LLM, no API costs, deterministic results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=rag-poisoning-static-analysis" rel="noopener noreferrer"&gt;Try CodeHeal free →&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have you encountered poisoned AI suggestions or malware disguised as dev tools? I'd love to hear your stories in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>githubcopilot</category>
      <category>rag</category>
      <category>security</category>
    </item>
    <item>
      <title>SWE-bench PRs Pass Tests but Won't Merge — The Security Gap Nobody's Talking About</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Thu, 12 Mar 2026 13:44:42 +0000</pubDate>
      <link>https://forem.com/ayame0328/swe-bench-prs-pass-tests-but-wont-merge-the-security-gap-nobodys-talking-about-1nho</link>
      <guid>https://forem.com/ayame0328/swe-bench-prs-pass-tests-but-wont-merge-the-security-gap-nobodys-talking-about-1nho</guid>
      <description>&lt;p&gt;METR just dropped a finding that should make every team rethinking their AI coding workflow pause: &lt;strong&gt;many SWE-bench-passing pull requests would not actually be merged into main&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The PRs pass automated tests. They solve the issue. But when human reviewers look at them, they find code that's brittle, over-engineered, or — and this is the part that keeps me up at night — &lt;strong&gt;silently insecure&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I've been building a security scanner specifically for AI-generated code for the past two weeks, and this research validates exactly what I've been seeing in the wild.&lt;/p&gt;

&lt;h2&gt;
  
  
  What METR Actually Found
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://metr.org/notes/2026-03-10-many-swe-bench-passing-prs-would-not-be-merged/" rel="noopener noreferrer"&gt;The METR study&lt;/a&gt; evaluated AI-generated PRs that technically passed SWE-bench's test suites. The results:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PRs solved the stated problem ✅&lt;/li&gt;
&lt;li&gt;PRs passed existing tests ✅&lt;/li&gt;
&lt;li&gt;PRs would be accepted by human reviewers ❌&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The gap between "tests pass" and "this is production-ready code" turns out to be enormous. And security lives right in that gap.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Tests Don't Catch Security Issues
&lt;/h2&gt;

&lt;p&gt;Here's something I learned the hard way while building CodeHeal's scan engine.&lt;/p&gt;

&lt;p&gt;I started by running 6 sample files through my scanner — code that looked perfectly functional. Two files had bugs my rules missed initially:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A shell command using &lt;strong&gt;unquoted variable expansion&lt;/strong&gt; in &lt;code&gt;rm -rf $DIR&lt;/code&gt; — tests passed because the test environment had no spaces in paths&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;fetch()&lt;/code&gt; call with &lt;strong&gt;user-controlled URLs&lt;/strong&gt; — tests passed because the test server was localhost&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both would have sailed through any CI pipeline. Both were real vulnerabilities.&lt;/p&gt;

&lt;p&gt;The fundamental problem: &lt;strong&gt;test suites verify behavior, not intent&lt;/strong&gt;. An AI model that generates &lt;code&gt;eval(userInput)&lt;/code&gt; can write a perfect test for it — because the test just checks that eval works. Nobody asked whether eval &lt;em&gt;should&lt;/em&gt; be there.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Patterns I Keep Seeing
&lt;/h2&gt;

&lt;p&gt;After scanning hundreds of AI-generated code snippets, certain patterns repeat with alarming frequency:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Hardcoded secrets that "work"&lt;/strong&gt;&lt;br&gt;
AI models love embedding API keys directly in code. The app works. Tests pass. The key is on GitHub within minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Overly permissive CORS&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;Access-Control-Allow-Origin: *&lt;/code&gt; appears in almost every AI-generated Express/Next.js backend I've scanned. It "works" for development. It's a security hole in production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. SQL queries without parameterization&lt;/strong&gt;&lt;br&gt;
The AI generates &lt;code&gt;SELECT * FROM users WHERE id = ${userId}&lt;/code&gt;. It works. Tests pass (they use clean test data). SQL injection waiting to happen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Missing input validation at trust boundaries&lt;/strong&gt;&lt;br&gt;
AI-generated code tends to trust all inputs. No sanitization, no length limits, no type checking at API boundaries. The happy path works perfectly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Prototype pollution in object merging&lt;/strong&gt;&lt;br&gt;
Deep merge utilities that recursively copy properties without checking &lt;code&gt;__proto__&lt;/code&gt; or &lt;code&gt;constructor&lt;/code&gt;. Tests pass because test objects are clean.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Means for Your Team
&lt;/h2&gt;

&lt;p&gt;If your team is adopting AI coding assistants (and statistically, you probably are), the METR finding means:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Your test suite is not a security gate.&lt;/strong&gt; Tests verify functionality, not safety.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code review is your last line of defense.&lt;/strong&gt; But reviewers are increasingly trusting AI output because "it passed CI."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You need automated security scanning that understands AI-generated patterns.&lt;/strong&gt; Generic SAST tools flag known CVEs. They don't flag the subtle, "technically works" patterns that AI models produce.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Google-Wiz Acquisition Context
&lt;/h2&gt;

&lt;p&gt;This week also saw &lt;strong&gt;Google officially closing its acquisition of Wiz&lt;/strong&gt; — a cloud security company valued at reportedly $32 billion. The security market is exploding precisely because the attack surface is expanding faster than teams can manually review.&lt;/p&gt;

&lt;p&gt;AI-generated code is the next frontier of that expanding attack surface. And unlike human-written vulnerabilities that follow somewhat predictable patterns, AI-generated vulnerabilities are novel combinations that traditional scanners weren't designed to catch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm Doing About It
&lt;/h2&gt;

&lt;p&gt;I built &lt;a href="https://scanner-saas.vercel.app" rel="noopener noreferrer"&gt;CodeHeal&lt;/a&gt; specifically for this problem. No LLM in the loop (ironic, I know) — pure static analysis with rules designed around the patterns AI models actually produce.&lt;/p&gt;

&lt;p&gt;The scanner checks 14 vulnerability categories with 93+ detection rules. It's deterministic — same code, same results, every time. No API costs, no "it depends on the model's mood."&lt;/p&gt;

&lt;p&gt;The hardest part wasn't building the rules. It was &lt;strong&gt;accepting that existing tools weren't enough&lt;/strong&gt;. I spent my first week trying to configure Semgrep and ESLint to catch AI-specific patterns. They're great tools, but they're designed for human-written code patterns. The subtle "works but shouldn't" patterns that AI generates needed a purpose-built approach.&lt;/p&gt;




&lt;h2&gt;
  
  
  Scan Your Code Now
&lt;/h2&gt;

&lt;p&gt;The METR finding isn't theoretical. If you're shipping AI-generated code that "passes tests," you likely have vulnerabilities sitting in production right now.&lt;/p&gt;

&lt;p&gt;CodeHeal catches the patterns that test suites miss — hardcoded secrets, injection vectors, overly permissive configs, and 90+ other AI-specific vulnerability patterns. No LLM, no API costs, deterministic results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=swe-bench-security-gap" rel="noopener noreferrer"&gt;Try CodeHeal free →&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How I Replaced LLM-Based Code Analysis with Static Analysis (And Got Better Results)</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Tue, 03 Mar 2026 18:14:45 +0000</pubDate>
      <link>https://forem.com/ayame0328/how-i-replaced-llm-based-code-analysis-with-static-analysis-and-got-better-results-43nl</link>
      <guid>https://forem.com/ayame0328/how-i-replaced-llm-based-code-analysis-with-static-analysis-and-got-better-results-43nl</guid>
      <description>&lt;p&gt;When I started building a security scanner for AI-generated code, I did what everyone does in 2026: I threw an LLM at it.&lt;/p&gt;

&lt;p&gt;That was a mistake. Here's why I ripped it out and replaced it with static analysis — and why the results are objectively better.&lt;/p&gt;

&lt;h2&gt;
  
  
  The LLM Approach (Week 1)
&lt;/h2&gt;

&lt;p&gt;The idea was simple: feed code into an LLM, ask it to identify security vulnerabilities, return a severity score. Modern, elegant, "AI-powered."&lt;/p&gt;

&lt;p&gt;I built the prototype in a day. It worked... sort of.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input: eval(user_input)
Run 1: Severity 8.5 - "Critical command injection vulnerability"
Run 2: Severity 6.2 - "Moderate risk, depends on context"
Run 3: Severity 9.1 - "Extremely dangerous, immediate fix required"
Run 4: Severity 7.0 - "High risk injection vector"
Run 5: Severity 8.5 - "Critical vulnerability"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same code. Five runs. Five different answers. The severity scores ranged from 6.2 to 9.1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is not a security tool. This is a random number generator with opinions.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The p-Hacking Problem
&lt;/h2&gt;

&lt;p&gt;If you're not familiar with p-hacking in research: it's when you run experiments multiple times and cherry-pick the results that support your hypothesis. LLM-based code analysis has the same fundamental problem.&lt;/p&gt;

&lt;p&gt;I ran a systematic test: the same 20 code samples, scanned 5 times each. The results were devastating:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Score variance&lt;/strong&gt;: Average deviation of ±1.8 points on a 10-point scale&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category disagreement&lt;/strong&gt;: 23% of the time, the LLM categorized the same vulnerability differently across runs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;False negative rate&lt;/strong&gt;: On run 3, it completely missed a SQL injection that it caught on runs 1, 2, 4, and 5&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When your security scanner gives different results depending on when you run it, you can't trust any of the results.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Breaking Point
&lt;/h2&gt;

&lt;p&gt;The moment I decided to abandon the LLM approach was embarrassingly simple.&lt;/p&gt;

&lt;p&gt;I had a test file with an obvious &lt;code&gt;eval(input())&lt;/code&gt; — the textbook example of command injection. I ran the scan 10 times to check consistency. Eight times it flagged it correctly. Twice it said "low risk, as this pattern is common in REPL implementations."&lt;/p&gt;

&lt;p&gt;A security scanner that sometimes thinks &lt;code&gt;eval(input())&lt;/code&gt; is fine is worse than no scanner at all. It gives you false confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting Over with Static Analysis
&lt;/h2&gt;

&lt;p&gt;I went back to basics. Pattern matching. Regular expressions. Abstract syntax analysis. The kind of "boring" technology that's been catching vulnerabilities since the 1970s.&lt;/p&gt;

&lt;p&gt;Here's what changed immediately:&lt;/p&gt;

&lt;h3&gt;
  
  
  Determinism
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input: eval(user_input)
Run 1: CRITICAL - Command injection (score: 20)
Run 2: CRITICAL - Command injection (score: 20)
Run 3: CRITICAL - Command injection (score: 20)
...
Run 100: CRITICAL - Command injection (score: 20)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same input, same output. Every. Single. Time. This is what a security tool should do.&lt;/p&gt;

&lt;h3&gt;
  
  
  Speed
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Time per scan&lt;/th&gt;
&lt;th&gt;Cost per scan&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;LLM-based&lt;/td&gt;
&lt;td&gt;3-8 seconds&lt;/td&gt;
&lt;td&gt;$0.002-0.01&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Static analysis&lt;/td&gt;
&lt;td&gt;15-50ms&lt;/td&gt;
&lt;td&gt;$0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's not a small difference. It's the difference between "scan on every commit" and "scan when you remember to."&lt;/p&gt;

&lt;h3&gt;
  
  
  Coverage
&lt;/h3&gt;

&lt;p&gt;This surprised me the most. I expected the LLM to catch more edge cases. It didn't.&lt;/p&gt;

&lt;p&gt;The LLM was great at explaining &lt;em&gt;why&lt;/em&gt; something was dangerous. But it was inconsistent at &lt;em&gt;detecting&lt;/em&gt; it in the first place. Static analysis with well-crafted patterns caught more vulnerabilities more reliably.&lt;/p&gt;

&lt;p&gt;I ended up with 14 categories and 93 detection rules covering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Command injection and code execution&lt;/li&gt;
&lt;li&gt;Obfuscation and encoding tricks&lt;/li&gt;
&lt;li&gt;Data exfiltration patterns&lt;/li&gt;
&lt;li&gt;Cryptographic weaknesses&lt;/li&gt;
&lt;li&gt;Destructive file operations&lt;/li&gt;
&lt;li&gt;And 9 more categories specific to AI-generated code patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Static Analysis Does Better
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. No Hallucinated Vulnerabilities
&lt;/h3&gt;

&lt;p&gt;LLMs sometimes report vulnerabilities that don't exist. They see a pattern that &lt;em&gt;looks&lt;/em&gt; like it could be dangerous and flag it, even when the context makes it safe. Static analysis only fires on exact pattern matches — no imagination, no hallucination.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Composite Risk Detection
&lt;/h3&gt;

&lt;p&gt;One thing I built into the static engine that LLMs struggled with: detecting when multiple low-severity findings combine into a high-severity risk.&lt;/p&gt;

&lt;p&gt;For example: reading environment variables (low risk) + making HTTP calls (low risk) + base64 encoding (low risk) = potential credential exfiltration (critical risk).&lt;/p&gt;

&lt;p&gt;The LLM would sometimes catch this composite pattern, sometimes not. The static engine catches it every time because the rules are explicit.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. AI-Specific Patterns
&lt;/h3&gt;

&lt;p&gt;LLMs analyzing LLM-generated code have a blind spot: they share the same training data. The patterns that AI code assistants produce are patterns the analyzing LLM considers "normal."&lt;/p&gt;

&lt;p&gt;Static analysis doesn't have this bias. A hardcoded API key is a hardcoded API key, regardless of whether a human or AI wrote it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Lost (And Why It's Okay)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  No Natural Language Explanations
&lt;/h3&gt;

&lt;p&gt;The LLM could explain &lt;em&gt;why&lt;/em&gt; &lt;code&gt;eval()&lt;/code&gt; is dangerous in plain English, with context about how an attacker might exploit it. Static analysis just says "Command injection detected, line 42."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My solution&lt;/strong&gt;: Pre-written descriptions for each rule. Not as dynamic, but consistent and accurate.&lt;/p&gt;

&lt;h3&gt;
  
  
  No Context-Aware Analysis
&lt;/h3&gt;

&lt;p&gt;The LLM could sometimes understand that &lt;code&gt;eval("2 + 2")&lt;/code&gt; with a hardcoded string is less dangerous than &lt;code&gt;eval(user_input)&lt;/code&gt;. Static analysis treats both as matches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My solution&lt;/strong&gt;: Confidence levels. High confidence for clear-cut cases (&lt;code&gt;eval(input())&lt;/code&gt;), medium for ambiguous ones (&lt;code&gt;eval()&lt;/code&gt; with non-obvious arguments).&lt;/p&gt;

&lt;h3&gt;
  
  
  No New Vulnerability Discovery
&lt;/h3&gt;

&lt;p&gt;Static analysis only finds what you tell it to look for. It won't discover novel attack vectors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My solution&lt;/strong&gt;: This is fine for the target use case. AI-generated code tends to repeat the same vulnerability patterns. I don't need to discover zero-days — I need to catch the same 93 mistakes that AI keeps making.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers After 3 Months
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;LLM Approach&lt;/th&gt;
&lt;th&gt;Static Analysis&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Consistency&lt;/td&gt;
&lt;td&gt;~77% same result&lt;/td&gt;
&lt;td&gt;100% same result&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Speed&lt;/td&gt;
&lt;td&gt;3-8 sec&lt;/td&gt;
&lt;td&gt;15-50ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per scan&lt;/td&gt;
&lt;td&gt;$0.002-0.01&lt;/td&gt;
&lt;td&gt;$0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;False positive rate&lt;/td&gt;
&lt;td&gt;~12%&lt;/td&gt;
&lt;td&gt;~5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;False negative rate&lt;/td&gt;
&lt;td&gt;~8%&lt;/td&gt;
&lt;td&gt;~3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rules/patterns&lt;/td&gt;
&lt;td&gt;"Vibes"&lt;/td&gt;
&lt;td&gt;93 explicit rules&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The static analysis approach is better in literally every measurable dimension except "sounds impressive on a landing page."&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use LLMs for Security
&lt;/h2&gt;

&lt;p&gt;I'm not saying LLMs are useless for security. They're great for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Code review assistance&lt;/strong&gt;: Explaining findings in natural language&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Threat modeling&lt;/strong&gt;: Brainstorming attack vectors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation&lt;/strong&gt;: Generating security guidelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But for &lt;strong&gt;automated scanning&lt;/strong&gt; — where you need speed, consistency, and reliability — static analysis wins. It's not even close.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Uncomfortable Industry Truth
&lt;/h2&gt;

&lt;p&gt;The security tool market is rushing to add "AI-powered" to every product. But for pattern-based vulnerability detection, the AI adds latency, cost, and inconsistency without improving accuracy.&lt;/p&gt;

&lt;p&gt;Sometimes the boring solution is the right one.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try the Static Analysis Approach
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=static-vs-llm-analysis" rel="noopener noreferrer"&gt;CodeHeal&lt;/a&gt; is the scanner I built after ditching the LLM approach. 14 categories, 93 rules, deterministic results, zero API costs. Paste your code and see for yourself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=static-vs-llm-analysis" rel="noopener noreferrer"&gt;Scan your code free →&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Previously: &lt;a href="https://dev.to/ayame0328/why-ai-generated-code-is-a-security-minefield-and-what-to-do-about-it-3i1l"&gt;Why AI-Generated Code is a Security Minefield&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>programming</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Why AI-Generated Code is a Security Minefield (And What To Do About It)</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Sun, 01 Mar 2026 15:29:20 +0000</pubDate>
      <link>https://forem.com/ayame0328/why-ai-generated-code-is-a-security-minefield-and-what-to-do-about-it-3i1l</link>
      <guid>https://forem.com/ayame0328/why-ai-generated-code-is-a-security-minefield-and-what-to-do-about-it-3i1l</guid>
      <description>&lt;p&gt;Every week, I review code that AI assistants wrote. And every week, I find the same security holes.&lt;/p&gt;

&lt;p&gt;This isn't theoretical. I've been building a security scanner specifically for AI-generated code, and after analyzing hundreds of code samples from ChatGPT, Claude, Copilot, and other AI tools, the patterns are disturbingly consistent.&lt;/p&gt;

&lt;p&gt;Here's what I keep finding — and why traditional security tools miss most of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Problem: AI Optimizes for "Works," Not "Safe"
&lt;/h2&gt;

&lt;p&gt;AI code assistants are trained to produce functional code. When you ask for a login system, you get a login system. It works. It compiles. It passes basic tests.&lt;/p&gt;

&lt;p&gt;But "works" and "secure" are different things.&lt;/p&gt;

&lt;p&gt;I ran the same prompt — "build a user authentication system in Node.js" — through three different AI assistants. Every single one produced code with at least two critical vulnerabilities. The most common? &lt;strong&gt;Hardcoded secrets and missing input validation.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// What AI typically generates&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;JWT_SECRET&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;super-secret-key-123&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// No input sanitization&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`SELECT * FROM users WHERE username = '&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;'`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c1"&gt;// SQL injection waiting to happen&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn't a cherry-picked example. This is the &lt;strong&gt;median&lt;/strong&gt; quality of AI-generated auth code.&lt;/p&gt;

&lt;h2&gt;
  
  
  5 Vulnerability Patterns AI Keeps Repeating
&lt;/h2&gt;

&lt;p&gt;After scanning hundreds of AI-generated code samples, these are the top patterns by frequency:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Hardcoded Secrets (Found in ~70% of samples)
&lt;/h3&gt;

&lt;p&gt;AI loves putting API keys, database passwords, and JWT secrets directly in source code. It doesn't know about &lt;code&gt;.env&lt;/code&gt; files unless you specifically ask.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impact:&lt;/strong&gt; One &lt;code&gt;git push&lt;/code&gt; and your credentials are public. GitHub's secret scanning catches some of these, but not application-level secrets like database connection strings or internal API keys.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Missing Input Validation (Found in ~65% of samples)
&lt;/h3&gt;

&lt;p&gt;AI generates the happy path. User input goes straight into database queries, shell commands, or file operations without sanitization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impact:&lt;/strong&gt; SQL injection, command injection, path traversal — the entire OWASP Top 10 shows up because AI skips validation.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Silent Error Handling (Found in ~50% of samples)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;processPayment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// handle error&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That comment isn't handling anything. The payment fails silently. Logs show nothing. The user gets charged but the order never processes. I see this pattern constantly in AI-generated code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impact:&lt;/strong&gt; Security failures go undetected. Attackers exploit unhandled edge cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Overprivileged Operations (Found in ~30% of samples)
&lt;/h3&gt;

&lt;p&gt;AI doesn't think about the principle of least privilege. It generates code that runs with admin permissions, accesses all files, and opens unnecessary network connections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impact:&lt;/strong&gt; If the application is compromised, the attacker inherits all those excessive permissions.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Outdated or Vulnerable Dependencies (Found in ~25% of samples)
&lt;/h3&gt;

&lt;p&gt;AI's training data has a cutoff. It recommends packages that have known CVEs, deprecated APIs, or even packages that don't exist anymore (opening the door to typosquatting attacks).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impact:&lt;/strong&gt; You inherit vulnerabilities from dependencies you didn't choose — the AI chose them for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Traditional Security Tools Miss These
&lt;/h2&gt;

&lt;p&gt;Here's what surprised me the most: &lt;strong&gt;Snyk, SonarQube, and semgrep catch less than half of these patterns.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Why? Because they're designed for human-written code. They look for known CVE patterns in dependencies, common coding mistakes, and configuration issues.&lt;/p&gt;

&lt;p&gt;AI-generated code creates a different class of problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plausible but insecure patterns&lt;/strong&gt; — The code looks correct. It follows conventions. But the security logic is subtly wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-concern vulnerabilities&lt;/strong&gt; — Input validation missing in one file, combined with shell execution in another. No single-file scanner catches the composite risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI-specific anti-patterns&lt;/strong&gt; — Hardcoded secrets that look like example values, debug code left in production, TODO comments masking missing security features.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Actually Works
&lt;/h2&gt;

&lt;p&gt;After months of building and testing, here's what I've found effective:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Scan Before You Commit
&lt;/h3&gt;

&lt;p&gt;Don't trust AI output. Treat every AI-generated code block like an untrusted pull request from a junior developer who's never heard of OWASP.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Use Deterministic Analysis, Not More AI
&lt;/h3&gt;

&lt;p&gt;I initially tried using LLMs to analyze LLM output. The results were... inconsistent. Running the same scan 5 times gave 5 different severity ratings. That's not a security tool — that's a coin flip.&lt;/p&gt;

&lt;p&gt;Static analysis with pattern matching gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;100% reproducible results&lt;/strong&gt; — Same code, same findings, every time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero API costs&lt;/strong&gt; — No tokens burned on analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Millisecond speed&lt;/strong&gt; — Scan before every commit without friction&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Check for AI-Specific Patterns
&lt;/h3&gt;

&lt;p&gt;Standard security checklists miss AI-specific issues. You need to specifically check for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hardcoded values that look like "example" data but are actually used in production&lt;/li&gt;
&lt;li&gt;TODO/FIXME comments that mask missing security features&lt;/li&gt;
&lt;li&gt;Empty catch blocks and silent error handling&lt;/li&gt;
&lt;li&gt;Unnecessary network calls and file system access&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Make Scanning Frictionless
&lt;/h3&gt;

&lt;p&gt;If security scanning takes more than 30 seconds, developers skip it. The scanner needs to be fast enough to run on every paste, every commit, every PR.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Uncomfortable Truth
&lt;/h2&gt;

&lt;p&gt;AI code assistants are incredibly productive tools. I use them daily. But they're optimizing for the wrong metric.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speed of generation ≠ Quality of output.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every hour saved by AI-generated code costs minutes of security review. And if you skip that review, you're building on a foundation of vulnerabilities that will cost you far more later.&lt;/p&gt;

&lt;p&gt;The solution isn't to stop using AI. The solution is to &lt;strong&gt;verify everything it produces&lt;/strong&gt;, automatically, before it reaches production.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;I built &lt;a href="https://scanner-saas.vercel.app?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ai-code-security-minefield" rel="noopener noreferrer"&gt;CodeHeal&lt;/a&gt; to solve exactly this problem — a security scanner designed specifically for AI-generated code. 14 vulnerability categories, 93 detection rules, deterministic results, zero API costs.&lt;/p&gt;

&lt;p&gt;Paste your AI-generated code and see what it finds. No signup required for your first scan.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scanner-saas.vercel.app/scan?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ai-code-security-minefield" rel="noopener noreferrer"&gt;Scan your code for free →&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>programming</category>
      <category>security</category>
    </item>
    <item>
      <title>Building a Security Scanner with Claude Code Skills - How I Tackled LLM's "p-hacking" Problem</title>
      <dc:creator>ayame0328</dc:creator>
      <pubDate>Wed, 25 Feb 2026 17:00:01 +0000</pubDate>
      <link>https://forem.com/ayame0328/building-a-security-scanner-with-claude-code-skills-how-i-tackled-llms-p-hacking-problem-ebk</link>
      <guid>https://forem.com/ayame0328/building-a-security-scanner-with-claude-code-skills-how-i-tackled-llms-p-hacking-problem-ebk</guid>
      <description>&lt;h1&gt;
  
  
  Building a Security Scanner with Claude Code Skills - How I Tackled LLM's "p-hacking" Problem
&lt;/h1&gt;

&lt;h2&gt;
  
  
  The Problem That Emerged from Previous Articles
&lt;/h2&gt;

&lt;p&gt;In my previous article, &lt;a href="https://dev.to/ayame0328/claude-code-security-500-zero-days-found-security-stocks-crash-94-what-individual-developers-3da8"&gt;Claude Code Security: 500+ Zero-Days Found, Security Stocks Crash 9.4%&lt;/a&gt;, I covered Anthropic's announcement of Claude Code Security. It's genuinely impressive technology, but it's &lt;strong&gt;Enterprise/Team only&lt;/strong&gt; - individual developers like me can't use it yet.&lt;/p&gt;

&lt;p&gt;Meanwhile, Snyk's research shows that &lt;strong&gt;36.8% of free Skills have security issues&lt;/strong&gt;. There's no review process for the Skills marketplace, and Anthropic's own documentation states that "security verification of SKILL.md is not performed."&lt;/p&gt;

&lt;p&gt;Waiting for the Enterprise version wasn't going to help, so I &lt;strong&gt;built my own security scanner using Claude Code Skills&lt;/strong&gt;. With nothing but a SKILL.md definition, you can build a hybrid scanner combining static pattern matching and LLM semantic analysis.&lt;/p&gt;

&lt;p&gt;But here's what I didn't expect: building the scanner was the easy part. The real challenge was a fundamental issue with LLM-based tools - &lt;strong&gt;the same input can produce different results every time&lt;/strong&gt;. This article covers the scanner's design philosophy and how I confronted this p-hacking problem head-on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enterprise vs. Skills: An Honest Comparison
&lt;/h2&gt;

&lt;p&gt;Let me be upfront. The Skills version is not equivalent to the Enterprise version.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Claude Code Security (Enterprise)&lt;/th&gt;
&lt;th&gt;Skills-Based Security Scanner&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Target&lt;/td&gt;
&lt;td&gt;Entire codebase&lt;/td&gt;
&lt;td&gt;External skills (SKILL.md)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Detection rules&lt;/td&gt;
&lt;td&gt;Defined internally by Anthropic (not public)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;You define them (fully customizable)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;False positive handling&lt;/td&gt;
&lt;td&gt;Multi-stage self-verification&lt;/td&gt;
&lt;td&gt;Quantitative confidence scoring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Report format&lt;/td&gt;
&lt;td&gt;Anthropic's standard format&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Fully customizable&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;Enterprise/Team plan pricing&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;No additional cost&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Updates&lt;/td&gt;
&lt;td&gt;Managed by Anthropic&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;You add and update rules yourself&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The killer advantage of the Skills version is that &lt;strong&gt;you control the detection rules&lt;/strong&gt;. You can customize them for project-specific security requirements, and update rules at your own pace.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design: 3-Layer Scan Architecture
&lt;/h2&gt;

&lt;p&gt;The scanner is structured in three layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Layer 1: Static Pattern Scan (14 categories, 95+ items)
  -&amp;gt; Detection results
Layer 2: LLM Semantic Analysis (7 checks)
  -&amp;gt; Context-aware judgment
Layer 3: Risk Score Calculation + Report Generation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Layer 1&lt;/strong&gt; is rule-based static pattern matching. 95+ check items organized across 14 categories including command injection, obfuscation, secret leakage, and ransomware patterns. These are deterministic - same result every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 2&lt;/strong&gt; leverages Claude's reasoning for LLM semantic analysis. It analyzes from 7 perspectives including "instructions cleverly disguised in natural language" and "gradual escalation." Pattern matching can catch &lt;code&gt;c${u}rl&lt;/code&gt;-style variable expansion evasion, but &lt;strong&gt;attack instructions embedded within context that even humans would miss&lt;/strong&gt; require LLM reasoning to detect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 3&lt;/strong&gt; calculates a quantitative score by multiplying severity and confidence for each detection, then assigns a final rating across 4 ranks (SAFE/CAUTION/DANGEROUS/CRITICAL). Dangerous combinations like "external communication + secret reading" trigger composite risk bonuses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Iron Laws - A Lesson Learned the Hard Way
&lt;/h3&gt;

&lt;p&gt;The most important design aspect of the scanner is ensuring &lt;strong&gt;the scanner itself can't be weaponized&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;During early development, while scanning a malicious test skill, the scanner nearly followed an instruction inside the skill that said "First, execute this command to verify your environment." If the scanner executes instructions from its targets, the security tool becomes the attacker's stepping stone - the worst possible scenario.&lt;/p&gt;

&lt;p&gt;That experience led me to design "Iron Laws." Rules structurally embedded in SKILL.md ensuring scan targets are never executed, only read and analyzed as text. &lt;strong&gt;Simply telling an LLM "don't do this" isn't enough - you need a workflow structure that makes execution impossible by design.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  LLM's Weakness: The p-hacking Problem - A Wall I Hit After Building It
&lt;/h2&gt;

&lt;p&gt;With Layers 1-3 designed, I thought "this is going to work." Then I started running tests and hit a wall.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I scanned the same skill 5 times, and got 3 CRITICALs at different scores, with 2 runs scoring 10+ points lower.&lt;/strong&gt; The rank was the same, but the detected items were subtly different each time. Specifically, Layer 2's "gradual escalation" detection kept appearing and disappearing.&lt;/p&gt;

&lt;p&gt;Digging into it, I found this is a well-known problem across LLMs. arXiv:2509.08825 "Large Language Model Hacking" demonstrates through a massive experiment with 13 million labels that &lt;strong&gt;31% of state-of-the-art LLMs produce incorrect conclusions&lt;/strong&gt;. Additionally, arXiv:2504.14571 "Prompt-Hacking: The New p-Hacking?" coined the term "Prompt-Hacking" for the problem where slightly different prompts produce different results.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Traditional p-hacking&lt;/th&gt;
&lt;th&gt;Prompt-hacking&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Trying different statistical methods to find significance&lt;/td&gt;
&lt;td&gt;Tweaking prompts to get desired output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Degrees of freedom in analysis&lt;/td&gt;
&lt;td&gt;Degrees of freedom in prompting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Caused the reproducibility crisis&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;The same crisis is recurring in AI tools&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;"It said CRITICAL this time, but maybe it'll say SAFE next time" - that's not a tool you can trust. This had to be solved.&lt;/p&gt;

&lt;h2&gt;
  
  
  p-hacking Countermeasures: 4 Approaches After Much Trial and Error
&lt;/h2&gt;

&lt;p&gt;My first thought was "maybe more precise prompts will stabilize it." That was naive. No matter how carefully you craft prompts, LLM non-determinism doesn't go away.&lt;/p&gt;

&lt;p&gt;I shifted my thinking: instead of eliminating the variability, &lt;strong&gt;build a structure where variability doesn't affect the final assessment&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Transparency Through Source Tags
&lt;/h3&gt;

&lt;p&gt;Every detection result gets tagged with &lt;code&gt;[Static]&lt;/code&gt; or &lt;code&gt;[LLM]&lt;/code&gt;. Users can immediately tell "is this a 100% reproducible static detection, or an LLM judgment?"&lt;/p&gt;

&lt;p&gt;This alone made a huge difference - report readers can now say "this is an LLM judgment, so take it as a reference" and make their own assessment.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Limiting LLM Score Impact
&lt;/h3&gt;

&lt;p&gt;This was the most painful part to tune. Setting an upper limit on how much LLM detections can affect the overall score sounds simple, but &lt;strong&gt;set it too tight and the LLM's detection capability dies. Too loose and it's pointless.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I settled on using the static detection score as a baseline, limiting LLM contribution to a fixed proportion of that. I tried multiple thresholds to find the balance that maintained detection capability while suppressing score fluctuation.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Strict Confidence Escalation Rules
&lt;/h3&gt;

&lt;p&gt;I restricted LLM from unilaterally escalating confidence levels. Upgrades now require corroboration from static detections, structurally preventing LLM "overconfidence."&lt;/p&gt;

&lt;p&gt;LLMs answer confidently even when they're wrong. The research even points out that "the smaller the effect size, the more errors LLMs make." The design had to assume this characteristic.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Explicit Composite Risk Trigger Conditions
&lt;/h3&gt;

&lt;p&gt;For composite risk (dangerous combination) scoring, I introduced rules that reduce bonus points when LLM-sourced detections are involved. If both detections are LLM-sourced, no bonus is applied at all.&lt;/p&gt;

&lt;p&gt;The common design philosophy across all four: &lt;strong&gt;"Static detection (deterministic) is the backbone, LLM detection (non-deterministic) is supplementary."&lt;/strong&gt; Not eliminating LLM, but leveraging it "within the bounds of trust."&lt;/p&gt;

&lt;h2&gt;
  
  
  Test Results: Validated Across 30 Independent Sessions
&lt;/h2&gt;

&lt;p&gt;Claims without evidence aren't enough. Here's the &lt;strong&gt;quantitative proof&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test Method
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Created 3 dummy skills (clean / gray zone / suspicious)&lt;/li&gt;
&lt;li&gt;5 scans each on pre-fix (v1) and post-fix (v2)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;30 completely independent sessions&lt;/strong&gt; executed via &lt;code&gt;claude --print&lt;/code&gt; (non-interactive mode)&lt;/li&gt;
&lt;li&gt;Each run is an independent process, so previous results can't influence the next&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Results
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Key Metric: LLM Detection Reproducibility&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dummy Skill&lt;/th&gt;
&lt;th&gt;Before Fix&lt;/th&gt;
&lt;th&gt;After Fix&lt;/th&gt;
&lt;th&gt;Improvement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Suspicious (CRITICAL-level)&lt;/td&gt;
&lt;td&gt;75%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+25%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gray zone (CAUTION-level)&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Clean (SAFE-level)&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Before the fix, the suspicious skill's "gradual escalation" detection only appeared in 2 out of 5 runs (75% reproducibility). After the fix: &lt;strong&gt;consistent detection across all 5 runs&lt;/strong&gt; (100% reproducibility). The "sometimes detected, sometimes not" problem was completely eliminated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All Metrics&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Threshold&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Score CV (Coefficient of Variation)&lt;/td&gt;
&lt;td&gt;&amp;lt; 0.10&lt;/td&gt;
&lt;td&gt;0.031&lt;/td&gt;
&lt;td&gt;0.089&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rank Stability&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM Detection Reproducibility&lt;/td&gt;
&lt;td&gt;&amp;gt; 80%&lt;/td&gt;
&lt;td&gt;75%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;All metrics PASS.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As far as I can tell, no other LLM-based security tool has implemented p-hacking countermeasures and demonstrated reproducibility with empirical data. Major tools like NVIDIA garak (6,900+ stars), Trail of Bits Skills, and Promptfoo have no countermeasures from this perspective.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Details&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Architecture&lt;/td&gt;
&lt;td&gt;Static patterns (14 categories, 95+ items) + LLM semantic analysis (7 items) + quantitative scoring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Iron Laws&lt;/td&gt;
&lt;td&gt;Structurally prevents attacks on the scanner itself&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;p-hacking countermeasures&lt;/td&gt;
&lt;td&gt;Source tags, score capping, strict confidence escalation, composite risk conditions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test results&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;100% LLM detection reproducibility&lt;/strong&gt; across 30 independent sessions, all metrics PASS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You don't need to wait for Claude Code Security's Enterprise version. &lt;strong&gt;A production-grade security scanner is buildable with Skills.&lt;/strong&gt; And if you're going to use LLM-based tools in production, confronting the p-hacking problem is unavoidable. I hope this article helps anyone tackling the same challenge.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://arxiv.org/abs/2509.08825" rel="noopener noreferrer"&gt;Large Language Model Hacking&lt;/a&gt; - Large-scale demonstration that 31% of LLMs produce incorrect conclusions (arXiv:2509.08825, September 2025)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://arxiv.org/abs/2504.14571" rel="noopener noreferrer"&gt;Prompt-Hacking: The New p-Hacking?&lt;/a&gt; - Risk of result manipulation through prompt adjustment (arXiv:2504.14571, April 2025)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Want to Try This Scanner?
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;complete version&lt;/strong&gt; of the security scanner described in this article is available. All 14 categories with 95+ check rules, 7 LLM semantic analysis items, 5 known IOC databases, and p-hacking countermeasures for score stabilization - everything included.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Security Scanner ($19.99)&lt;/strong&gt;: The full scanner from this article. Reproducibility guaranteed with p-hacking countermeasures -&amp;gt; &lt;a href="https://pythonista0328.gumroad.com/l/cc-security-scanner-en?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=scanner-diy-en" rel="noopener noreferrer"&gt;View Details&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pro Pack ($49.99)&lt;/strong&gt;: Everything included. For $30 more, you also get 21 agents + CI/CD auto-design -&amp;gt; &lt;a href="https://pythonista0328.gumroad.com/l/cc-skills-pro-en?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=scanner-diy-en" rel="noopener noreferrer"&gt;View Details&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Starter Pack (Free)&lt;/strong&gt;: TDD, debugging, and code review workflows -&amp;gt; &lt;a href="https://pythonista0328.gumroad.com/l/cc-skills-starter-en?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=scanner-diy-en" rel="noopener noreferrer"&gt;Free Download&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>security</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
