Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere Programmierung(d+019) OpenGL(20.09.2026 um 15:51 Uhr)
Sichere ProgrammierungYou Released an App. Now What?(20.09.2026 um 15:52 Uhr)
Sichere Programmierung(d+023) Triangle(20.09.2026 um 15:53 Uhr)
Sichere ProgrammierungHow many coding agents are you using for the same project?(20.09.2026 um 15:57 Uhr)
Sichere ProgrammierungCapyToolkit: 45+ free browser tools, each with a how-to guide(20.09.2026 um 16:00 Uhr)
Sichere ProgrammierungDay-01: Starting My Cybersecurity Journey(20.09.2026 um 16:02 Uhr)
Sichere ProgrammierungWhat crt.sh's Error Pages Taught Me About Retry Logic(20.09.2026 um 16:03 Uhr)
Sichere ProgrammierungI taught my shell to stop me *before* I run `rm -rf /`(20.09.2026 um 16:09 Uhr)
Sichere ProgrammierungTraditional Coding vs Agentic Coding: The Flow State Problem(20.09.2026 um 16:19 Uhr)
Sichere Programmierung(d+019) OpenGL(20.09.2026 um 15:51 Uhr)
Sichere ProgrammierungYou Released an App. Now What?(20.09.2026 um 15:52 Uhr)
Sichere Programmierung(d+023) Triangle(20.09.2026 um 15:53 Uhr)
Sichere ProgrammierungHow many coding agents are you using for the same project?(20.09.2026 um 15:57 Uhr)
Sichere ProgrammierungCapyToolkit: 45+ free browser tools, each with a how-to guide(20.09.2026 um 16:00 Uhr)
Sichere ProgrammierungDay-01: Starting My Cybersecurity Journey(20.09.2026 um 16:02 Uhr)
Sichere ProgrammierungWhat crt.sh's Error Pages Taught Me About Retry Logic(20.09.2026 um 16:03 Uhr)
Sichere ProgrammierungI taught my shell to stop me *before* I run `rm -rf /`(20.09.2026 um 16:09 Uhr)
Sichere ProgrammierungTraditional Coding vs Agentic Coding: The Flow State Problem(20.09.2026 um 16:19 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Unreviewed AI Code Is Everywhere — Here's What Breaks First

Reagiere als Erste:r — dein Feedback zählt!

A Hacker News post titled "Toward automated verification of unreviewed AI-generated code" hit 70 points and 57 comments today. The discussion confirmed something I've been seeing firsthand: developers are shipping AI-generated code without meaningful review, and the failure modes are predictable.

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.

The Real Problem Isn't "Bad AI"

The HN thread has the usual debates: "just review the code" vs. "nobody has time for that." Both sides miss the point.

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

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.

The 5 Patterns That Break First

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

1. Hardcoded Secrets (found in ~70% of samples)

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

Why AI gets this wrong: It optimizes for "code that runs immediately." Environment variables add friction.

2. Empty Catch Blocks (found in ~60% of samples)

try {
  const data = await fetchUserData(id);
  return processData(data);
} catch (e) {
  // handle error
}

That comment is a lie. There's no handling. The function silently returns undefined, 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.

3. Missing Input Validation on API Routes

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

I found this pattern so consistently that it became one of my highest-confidence detection rules.

4. Overly Permissive CORS

res.setHeader('Access-Control-Allow-Origin', '*');

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

5. Console.log with Sensitive Data

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.

Why Static Analysis Beats LLM for This

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

Pattern matching + AST parsing. That's it. No LLM, no API costs, no variance.

When I was building my scanner, I tried three approaches:

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

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

The Uncomfortable Truth

The 57 comments on that HN thread reveal a split:

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

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

The code doesn't need to be perfect. It needs to be checked. Automatically, consistently, every time.

What I'm Watching

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.

The tools will catch up. The question is how many silent failures ship in the meantime.

Scan Your Code

I built CodeHeal 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.

Try CodeHeal free →

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Unreviewed AI Code Is Everywhere — Here's What Breaks First

Thematisch verwandte Begriffe: Unreviewed, Code, Everywhere, Heres · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-93956 | A flaw has been found in olivier-ls PHP-FTS up to 1.1.2. Affected by thi…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick