Skip to content

Same NestJS Prompt. Claude Got 6 Security Errors. Gemini Got 2. Here's What Both Got Wrong.

8.3 relevance
Score Breakdown
technical depth
8
novelty
7
actionability
8
community
5
strategic
5
personal
9

Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.

Direct comparison of AI code generation security is highly actionable.

Security dev.to
Same NestJS Prompt. Claude Got 6 Security Errors. Gemini Got 2. Here's What Both Got Wrong.
Summary

Claude Sonnet 4.6 generated 6 security errors (no guards, exposed fields, debug endpoint) while Gemini 2.5 Flash produced 2 errors (both missing rate limiting) for the same NestJS users service prompt. Both omitted rate limiting on login, but Gemini's output included class-level guards and @Exclude() on password, showing toolchain choice affects default security posture.

Author

Ofri Peretz

More from Ofri Peretz →