Which AI model for audit and secure code ?

To review code before release, find a vulnerability and deliver the fix, we choose Claude Fable 5.2: the best score on CWE-bench v2, at $8 per million tokens. Claude Opus 5.5 costs half as much; Gemini 4 Hydrogen is the non-Anthropic alternative. Hosted on your premises, DeepSeek V4.1 Flash publishes good defensive scores.

Our recommendation.

Notre choix

Claude Fable 5.2

Anthropic · served via API

Price per million tokens, input / output
8 $ / 40 $
Its profile and scores
Alternative 1

Claude Opus 5.5

Anthropic · served via API

Price per million tokens, input / output
4 $ / 20 $
Its profile and scores
Alternative 2

Gemini 4 Hydrogen

Google · served via API

Price per million tokens, input / output
1.5 $ / 7.5 $
Its profile and scores

Why this choice

Claude Fable 5.2 leads CWE-bench v2 at 75%, ahead of Gemini 4 Hydrogen (68.1%) and Claude Opus 5.5 (67.1%). We keep Opus 5.5 for routine audits. CyberGym results, published by only three open models, do not yet allow the large closed models to be compared.

À héberger chez vous

DeepSeek V4.1 Flash

DeepSeek · poids ouverts

Price per million tokens, input / output
0.30 $ / 1.2 $
On your premises
On a server cluster · About 640 Go of GPU memory (8 × NVIDIA H100)

DeepSeek V4.1 Flash, under the MIT licence, publishes its scores on CWE-bench and CyberGym. It needs a multi-GPU server: a choice for a security team, not an individual workstation.

Its profile and scores

An integrator's recommendation: it weighs the benchmarks below against price, speed and what we see in real projects. It is no substitute for a trial on your own cases.

What the benchmarks say.

The scores published on the 2 tests that measurent this task best. At the top of the table are the models that publish the most of these tests, then their average score out of 100; the best score in each column is highlighted in colour. Click a score to open its source.

Scores published on the task benchmarks: Audit and secure code
ModelCWE-benchCyberGymAverage score
DeepSeek V4.1 Flash57,6 %88,1 %88 on 2 tests
GLM-5.342 %84,5 %76 on 2 tests
Claude Fable 5.275 %not published100 on 1 test
DeepSeek V4 Pronot published83,3 %95 on 1 test
Gemini 4 Hydrogen68,1 %not published91 on 1 test
Claude Opus 5.567,1 %not published89 on 1 test
Muse Wonder66,1 %not published88 on 1 test
Gemini 4 Argon65 %not published87 on 1 test
GPT-6 Astra64,2 %not published86 on 1 test
Mistral Large 445,6 %not published61 on 1 test
Qwen3.8 Max45,4 %not published61 on 1 test
Kimi K3.1 Pro45,3 %not published60 on 1 test

CWE-bench

Code security

250 audit and patch tasks covering 185 types of vulnerability, in six languages: find the weakness and deliver the patch that closes it.

Collinear · 11 tracked models publish it

The official ranking

CyberGym

Cybersecurity

1,507 real vulnerabilities to analyse and reproduce, to assess a defensive security agent.

UC Berkeley · 3 tracked models publish it

The official ranking

The criteria for choosing well.

Fix, not just flag

A report with 200 alerts is useless. CWE-bench scores the ability to close the vulnerability with a fix that works.

Controlled defensive use

Providers restrict offensive use of their most capable models. An audit is carried out on your code, with your written consent.

A human signs off

The model finds and proposes. A specialist approves the fix and assesses the residual risk.

The questions we get asked.

Can AI carry out a penetration test?

It assists an auditor: reading the code, suggesting attack paths, drafting the report. The penetration test itself remains governed by a contract and carried out by specialists, as our cyber team does.

Should AI-written code be audited?

As much as code written by a person, and with the same tools. The 2026 models write safer code than before, but with no guarantee that it is free of vulnerabilities.

Is it safe to send our code to a model for auditing?

With a zero-retention enterprise plan, yes. For highly sensitive code, the audit can run on an open model hosted on your own infrastructure.

What is the best AI model for audit and secure code?

Our choice is Claude Fable 5.2, à 8 $ le million de jetons en entrée, with Claude Opus 5.5 et Gemini 4 Hydrogen as alternatives. On the task benchmarks as recorded on 15 November 2026, Claude Fable 5.2 leads CWE-bench (75 %) et DeepSeek V4.1 Flash leads CyberGym (88,1 %). Our choice weighs these scores against price and what we see in real projects.

Which local AI for audit and secure code?

DeepSeek V4.1 Flash, open-weight, on a server cluster (about 640 Go of GPU memory (8 × NVIDIA H100), d'après BenchLM). DeepSeek V4.1 Flash, under the MIT licence, publishes its scores on CWE-bench and CyberGym. It needs a multi-GPU server: a choice for a security team, not an individual workstation.

The right model for your specific case.

We test the recommended model and an alternative on your own examples, then connect it to your tools. The first meeting is used to scope the task and the volume.