Can AI Really Keep Our Code Secure?

Large Language Models (LLMs) are expanding into software development, but can they ensure security? A new benchmark, TOSSS, aims to measure their effectiveness.
Large Language Models (LLMs) are like the Swiss Army knives of the tech world, versatile, indispensable, and continuously finding new applications in industries. As they infiltrate software engineering, the pressing question is: Can they handle security? With cybersecurity investments soaring, integrating LLMs might introduce vulnerabilities that could unravel existing security efforts.
The TOSSS Benchmark
Enter TOSSS, or Two-Option Secure Snippet Selection. This isn't just another benchmark. It's a litmus test for LLMs' ability to discern secure code snippets from vulnerable ones. Unlike existing benchmarks that cover a narrow scope, TOSSS taps into the CVE database, offering an adaptable framework that evolves with the discovery of new vulnerabilities. Think of it this way: it's like giving LLMs a security scorecard, ranging from 0 (always picking the vulnerable snippet) to 1 (always choosing the secure one).
Performance Report Card
In a recent evaluation of 14 popular open-source and proprietary models, scores ranged between 0.48 and 0.89. So, what does this tell us? If you've ever trained a model, you know a range like this is a mixed bag. Some models are halfway there, while others show promise. But here's the thing, the gap between being ‘good enough’ and ‘secure’ can have serious implications. Would you trust software that's only 48% secure?
Why This Matters
Here's why this matters for everyone, not just researchers. Software vulnerabilities can lead to catastrophic breaches that affect everyday users. As LLMs become more embedded in development workflows, understanding their security prowess isn't just academic. it's essential. The analogy I keep coming back to is, if you're building a house, you want to ensure the foundation is solid before adding the upper floors. LLMs might be building the house, but TOSSS checks if the foundation is secure.
So, is TOSSS the ultimate answer? Not yet. It's a step in the right direction, but the scores suggest there’s more work to be done. It could, however, become a staple in model benchmark reports, offering a security-focused perspective that's often missing.
As the tech community continues to innovate, the balance between functionality and security must be a priority. With TOSSS, we're beginning to see how LLMs measure up. The real question is, will developers and organizations take heed?
Get AI news in your inbox
Daily digest of what matters in AI.