What a small model on a 12 GB graphics card can do with security work
Nine security tasks for a small open model on a 12 GB card in my own Linux box: 5 of 6 fixes, all 18 planted flaws found, and no false alarm on 21 decoys.
The small open model on my graphics card fixed vulnerable code in five of six tasks, found all 18 flaws I’d planted in three pieces of code, and raised no false alarm on any of the 21 safe-looking decoys beside them. All nine tasks took 29 minutes.
It runs on a mobile RTX 4080 with 12 GB of memory, in the Linux box I keep at home. It costs nothing per task and nothing I give it leaves the house, which is the attraction for security work. What I didn’t know was whether it was any good at it, so I built a set to find out.
Nine tasks
Three languages, Python, TypeScript and PHP, with three tasks in each: two fixes and one audit. The code is synthetic, between 60 and 244 lines, written for the test.
In a fix task the model gets code with two planted vulnerabilities and a prompt that names them. Hidden tests then run against its patch. Each real exploit has to stop working, and the normal behaviour of the code has to keep working. In an audit task the model reads 210 to 244 lines holding six planted flaws and six to eight decoys, which are safe code that looks risky. It writes a list of findings. A finding counts only when it names the file and line of a planted flaw.
Each task had a 15 minute limit. One model ran at a time on an otherwise idle box, and it wasn’t allowed to run any tests of its own.
What came back
I ran a second open model through the same set. Both rows are copied straight from my report.
| Model | Fix tasks solved | Exploits blocked | Behaviour broken | Planted flaws found | False positives (21 decoys) | Total time |
|---|---|---|---|---|---|---|
| The small open model | 5 of 6 | 38 of 39 | 0 | 18 of 18 | 0 | 29 min |
| A second open model | 5 of 6 | 38 of 39 | 0 | 17 of 18 | 0 | 50 min |
Both models solved every fix task except one TypeScript task, where each blocked seven of the eight exploits and broke nothing else. The second model also missed one planted flaw in the TypeScript audit, five of six. The first took between 1 and 8 minutes a task and the second between 1.5 and 12, so the first finished in 58 per cent of the other’s time.
The column I looked at first was the false positives. A model that flags everything finds every planted flaw too, and then I have to read every flag. Neither model flagged a single decoy.
Verdicts decided by code
No verdict depends on how an answer reads. A fix is right when the hidden tests say so. A finding is right when it names the flaw’s file and a line within two of it, and a whole audit passes when at least 80 per cent of the planted flaws are found with no more than one false alarm.
Before any model touched the set, each task was checked against itself: the reference fix has to pass everything, every exploit has to succeed against the vulnerable code, and the decoy ranges have to register as decoys. The audit scoring is strict on purpose. A model that reports the line where a flaw is called, instead of the line where it lives, is marked wrong.
What the result does not show
Both models scored eight of nine, which is near the ceiling, so this set can’t rank two models that are close. It needs longer code, subtler flaws and flaws that only show across files before it can.
The code is synthetic and short, so none of this says how the model would do on a real application. I ran each task once. I haven’t run the same set against the large hosted models, so I have no figure comparing them for security work.
Both models missed the same exploit in the one TypeScript fix. I haven’t looked at which one yet. If it’s something a reasonable fix could miss, the test is too strict, and I’ll check that before I use the set again.
What I use it for
The set didn’t separate the two on correctness, so the faster one stayed my pick. I use it for two narrow jobs: fixing a named flaw in code I can test, and a first read of a file for flaws. Because it runs here, I can give it code I wouldn’t send out.
It let one exploit in 39 through, and I only know that because a test existed for it. Long changes across many files, and anything I can’t check with a test, still go to a large hosted model.
Featured projects
-
Apple News API
Publish articles and live coverage to Apple News from PHP, with the whole Apple News Format built from objects.
-
GitHub Auditor
Health, access and activity reports for more GitHub and Bitbucket repositories than you can keep in your head.
-
PrintMD
Markdown in, and a designed PDF, Word or PowerPoint file out. Its PDF service runs on your own computer.
-
Where Should I Live
Which city would leave you best off? Cities ranked by take-home pay, living costs, visas and the way you live.
-
Solar Calendar
Thirteen months of exactly four weeks, with the year starting on the first Monday on or after the spring equinox.
Latest writing
-
Many sessions at once, and what still needs me
Fifteen coding-agent sessions across two Linux boxes, one session that watches the rest, what it may answer for me, what it never may, and why a yes it passes on gets checked against what I typed.
-
61 public repos of agent tooling, none installed, six ideas kept
One author, 61 public repositories of coding-agent tooling: what I checked before any of it got near my Linux boxes, why none of it was installed, and the six ideas I built my own way.
-
Rules a coding agent cannot talk its way round
The hook that reads every command a coding agent wants to run on my Linux boxes: what it refuses, the 27 proofs that its tests fail when a rule is taken out, and the four lines every report opens with.
-
Dozens of repos, one person
46 repositories and two Linux boxes with nobody else on them: the diary, the decision table, the rebuild guide and the job that keeps both sets of clones in step.