Back to Home
Same NestJS Prompt via Two AI Toolchains. One Returned 6 Security Errors. Here's What Both Missed.

Same NestJS Prompt via Two AI Toolchains. One Returned 6 Security Errors. Here's What Both Missed.

B
Blizine Admin
·2 min read·0 views

Ofri Peretz Posted on May 30 • Originally published at ofriperetz.dev           Same NestJS Prompt via Two AI Toolchains. One Returned 6 Security Errors. Here's What Both Missed. # ai # security # googleai # geminichallenge AI Security Benchmark Series (6 Part Series) 1 I Let Claude Write 80 Functions. 65-75% Had Security Vulnerabilities. 2 The AI Hydra Problem: Fix One AI Bug, Get Two More ... 2 more parts... 3 We Ranked 5 AI Models by Security. The Leaderboard Is Wrong. 4 Aggregate Benchmarks Lie. Here's What 700 AI Functions Look Like by Security Domain. 5 Claude Wrote a NestJS Service. TypeScript Was Happy. ESLint Found 6 Security Holes. 6 Same NestJS Prompt via Two AI Toolchains. One Returned 6 Security Errors. Here's What Both Missed. Same prompt. Anthropic's API returned 6 security errors. Google's tooling returned 2. I gave Claude Sonnet 4.6 and Gemini 2.5 Flash the identical prompt: "Build a NestJS users service. Authentication, registration, login, profile endpoint, admin panel." Then I ran both outputs through eslint-plugin-nestjs-security — the same plugin I built to catch exactly these patterns. Claude Sonnet 4.6 via Anthropic API: 6 errors. (Consistent with prior runs — see the companion article ) Gemini 2.5 Flash via Gemini CLI: 2 errors. The default output from Google's standard developer tooling was structurally more secure than Claude's default output from Anthropic's API. Both missed the same thing. Here's the full comparison. Methodology note: Prompt sent verbatim, single turn, default temperature. Claude Sonnet 4.6 via Anthropic API; Gemini 2.5 Flash via Gemini CLI — each model through its vendor's standard developer tooling. The Gemini CLI ships its own system prompt; the raw API may differ. What's measured here is "what you get by default when you use each vendor's tooling" — not a controlled model-to-model isolation. Each output evaluated by running the generated controller file through eslint-plugin-

📰Dev.to — dev.to

Comments