Don’t Make This Mistake: Painful Learnings of Applying AI in Security
Where
Talks
LASCON 2024
Duration
49 min
Shows where generative AI fails at fixing code vulnerabilities and how a hybrid approach can work more reliably.
Summary
The talk starts from a familiar problem: static analysis scans can return tens of thousands of findings, and triaging and fixing each one takes hours of developer time, so backlogs keep growing. The speaker frames the goal as automatically remediating first-party code so teams can keep shipping features while shortening the time between discovery and fix, at scale.
Early attempts used general-purpose chat models, prompted with a vulnerability description and the affected line. Results depended heavily on the prompt and the code. In a comparison across two intentionally vulnerable web applications and two commercial scanners, under a third of suggested fixes solved the problem cleanly, while many broke application logic, patched the wrong place, or deleted code. A live demo was disrupted by poor network connectivity. One SQL injection fix looked correct but broke the query because a numeric identifier was wrapped in quotes, and spotting that error required senior expertise. Reviewing thousands of model outputs one by one was shown to be too slow.
The alternative presented was a hybrid model. Deterministic, rule-based rewrites based on the code's syntax tree handle the transformation, while the model is limited to narrow sub-tasks such as locating user input or adding a null check. This gives repeatable output that is easier to review and scale, though each pattern takes effort to build. The takeaways: treat AI as a copilot rather than an autopilot, scope prompts tightly, validate every change, and expect developers to lose trust if bad fixes keep arriving. A tip on requesting machine-readable output was also shared.
Related talks
Talks·48 min
Eitan Worcel
Shows how a prompt-driven pipeline filters false positives and generates verifiable code fixes, and where AI remediation still fails.
Talks·40 min
Vineeta Sangaraju
Shows why LLMs need deterministic tooling, data preparation and human oversight to be useful for application security.
Talks·50 min
Chris Lindsey
Shows how AI-generated .NET and React code can ship with injection, XSS and authentication flaws, and how to catch them.


