Skip to content
AI

Why does my AI write code that is correct in isolation but insecure in my system?

85

Kans

AI coding assistants generate code that is syntactically valid and functionally correct at the function level but have no model of the security invariants of the surrounding system: the trust boundaries, IAM policies, data classification, and threat model that make a pattern safe or dangerous in a specific codebase. The result is structurally valid code that exposes tokens in logs, omits row-level access checks, or misconfigures permissions in ways an engineer familiar with the system would catch immediately. CVE-2025-48757 is a concrete case where an AI tool generated database schemas without row-level security, silently exposing 170 production applications. Research shows AI-assisted commits leak secrets at more than twice the rate of human-only commits. No current assistant ingests or reasons about a codebase's existing security model before generating code.

Waarom het belangrijk is

Security context unawareness produces a class of vulnerabilities that pass every syntax check and unit test but are trivially exploitable once deployed.

Hoe ik de kans beoordeel

De Opportunity Score is mijn eigen inschatting, geen meting: hoe ernstig het pijn doet, hoe vaak het toeslaat, en hoe weinig er vandaag de dag bestaat om het op te lossen. Hoger betekent dat ik denk dat het meer de moeite waard is om te bouwen.

Ernst9/10

Hoeveel pijn het veroorzaakt wanneer het zich voordoet.

Frequentie8/10

Hoe vaak mensen er daadwerkelijk tegenaan lopen.

Witruimte8/10

Hoe weinig goede tools er vandaag de dag voor bestaan.

Meer problemen die het oplossen waard zijn