I built Klarion, a secret scanner that asks an LLM before it alerts
Описание и применение
Klarion, сканер секретов с использованием LLM, сократил ложные срабатывания в 33‑кратном объёме по сравнению с gitleaks и более чем в 1000‑кратном по сравнению с detect‑secrets, сохраняя при этом высокую точность и полноту обнаружения реальных секретов.
Задача
Secret scanners generate many false positives, especially in typed languages, causing developers to ignore alerts and miss real leaks.
Результат
Klarion reduced alerts by 33× compared to gitleaks and >1,000× compared to detect‑secrets, while achieving 1.7× the recall of gitleaks at similar precision.
Рабочий процесс
- Detect candidates using keyword gate, 81 regex rules, and normalized Rényi entropy.
- For each candidate, an LLM reads the surrounding code and returns "secret", "false positive", or "uncertain" with a one‑line reason.
- If the LLM flags a secret, Klarion raises an alert; otherwise it suppresses it.
Доказательства
Klarion + model 11 alerts on the 4 repos, 0.18 per 1k files, 33x fewer alerts than gitleaks and over 1,000x fewer than detect‑secrets
After it, Klarion's rate is 0.18 per 1k files on the typed repos and 0.20 on the control, so the language effect is gone.
Klarion + model 0.35 recall, 0.89 precision; gitleaks 0.21 recall, 0.91 precision; detect‑secrets 0.35 recall, 0.34 precision.
- Дата записи: 2026-10-04T18:55:49.891Z