VeriKQL by Kaushik Saha

How it works

Why not just ask Claude?

You can, and most people do. The answer looks right, and sometimes it names a column that doesn't exist, a table from the wrong product, or an ATT&CK id that was revoked. Nothing checks it until the rule fails in Sentinel, or never fires. VeriKQL keeps your assistant and adds the check.

Three ways to get a detection

What most people do

Ask the AI directly

  1. You ask for a detection
  2. Claude or ChatGPT writes it from memory
  3. KQL, unchecked, pasted into Sentinel

Errors surface in production, or never.

Free · live now

Ask the AI, with VeriKQL connected

  1. You ask the same assistant
  2. It drafts, then calls VeriKQL to look up tables and check the query
  3. It reads the exact error, fixes it, checks again: up to 6 rounds
  4. Verified KQL, with a proof record

Your assistant writes. VeriKQL only checks, so it costs you nothing.

In development · not public yet

VeriKQL Studio, the agentic pipeline

  1. A request, or a threat advisory
  2. Plan up to 3 detection ideas, each written, checked and repaired
  3. Reviewed by a model from another vendor, then by you
  4. A Sentinel analytic rule and a Defender XDR custom detection

One model never marks its own work, and nothing ships without your approval.

What a round looks like

A round is one turn in which the assistant asks VeriKQL something and reads the answer. A typical case, "failed sign-ins for one user":

1 · findsearch_tables("failed sign-in")SigninLogs, AADNonInteractiveUserSignInLogs
2 · readget_table_schema("SigninLogs")the real columns: ResultType, UserPrincipalName, IPAddress …
3 · checkverify_kql(draft)fail · KS142, line 2, column 9: ResultTyp is not a known column
4 · re-checkverify_kql(fixed)pass · proof record issued

Six is a ceiling, not a target. Most cases need two to four. After six, the tools are taken away and the assistant answers with what it has.

What a pass proves, and what it doesn't

A pass proves

  • The query parses, with Microsoft's own Kusto.Language 12.4.1.
  • Every table, column, function and type binds against a pinned schema bundle: 2,409 tables and 1,293 functions, including 1,016 ASIM parsers.
  • It is a plain read-only query: no management commands, no workspace(), no plugins. A list loaded with externaldata is checked, with a warning naming its URL; VeriKQL never fetches it.
  • ASIM parsers are called with valid parameters.
  • The record names the exact query (SHA-256), parser version and bundle version, so anyone can re-check it.

It doesn't prove

  • That the logic catches the attack. That needs attack data and a review.
  • That your workspace has the table, or that it has rows.
  • False-positive rate, run time or cost.
  • That the query is safe to run on a 90-day window. VeriKQL never runs it.

Questions a Sentinel engineer asks

Does it run my query, or see my data?

No. It parses and binds against public schemas in memory and returns a verdict. It never connects to a workspace and never stores the query; logs hold the tool name, verdict and duration only.

Where do the schemas come from, and how fresh are they?

Two public sources, pinned by commit: Microsoft's Azure Monitor table reference (942 tables, 2026-10-29, CC BY 4.0) and the Azure-Sentinel repository's own KQL validation schemas (1,600 tables, 251 functions and the ASIM parsers, 2026-10-29, MIT). A weekly schema watch spots what Microsoft adds or changes, and the bundle is rebuilt after review. Every proof record names the bundle version it used.

Sentinel or Defender XDR advanced hunting?

Both are in the data. The connector's verify_kql binds against the Sentinel and Log Analytics schemas today, so a Defender query that uses Timestamp fails there; use TimeGenerated, which is what Sentinel stores. The library and Studio also bind against a separate advanced hunting view (65 tables from Microsoft Learn); exposing that on the connector is next.

My custom tables (_CL) and watchlists?

Not yet. A custom table isn't in the public bundle, so it fails as an unknown table (KS204), and _GetWatchlist() is refused as an unknown function.

Does it catch logic mistakes?

Some. A column used after a summarize that dropped it, or a join key that doesn't exist on one side, fails to bind and is reported with its line and column. Whether the rule detects the attack is not something a parser can tell you.

Can I use it offline, or in CI?

Yes, with the command line (verikql verify rule.kql) and a GitHub Action that posts results to code scanning. Both come with the public release.

How do I know it actually helps?

A pre-registered benchmark measured it, twice. The first run missed its bar; its results showed what to fix, and the second run, after those fixes, passed. Both are below and published in full.

The evidence: a pre-registered benchmark

The same model, Claude Sonnet 5.5, wrote 84 real detection requests three times each: once alone, and once with VeriKQL's tools. Every final query was scored with Microsoft's parser. The method and the pass mark were fixed and approved before anything ran. This is the second run, v2, finished 2026-10-27; 1094 model calls; $20.03 in total.

Compiles and binds against the real schemahigher is better
Claude alone83.7%Claude + VeriKQL99.6%Claude alone83.7%Claude + VeriKQL99.6%
Invents a table, column or functionlower is better
Claude alone9.9%Claude + VeriKQL0.0%Claude alone9.9%Claude + VeriKQL0.0%
0.4%of runs failed with VeriKQL, against 16.3% alone
0.0%invented names with VeriKQL, in 252 runs
$0.050per detection with VeriKQL ($0.030 alone), about 23 seconds

The pre-registered verdict: passed. The bar was failing runs at most half of Claude alone's, and invented names at most half. VeriKQL cut failing runs from 16.3% to 0.4% and removed every invented name.

The first run, v1, did not pass. Its bar was +20 points of compile and bind, set before anyone knew Claude alone would reach 86.2%; VeriKQL added +11.4. Its results showed where VeriKQL fell short, those gaps were fixed, and on the same 70 cases VeriKQL's compile rate went from 97.6% to 99.5%. v1's verdict stands, and both reports are published.

  • 14 held-out cases on their own (kept private, so nothing could be tuned to them): compile-and-bind 85.7% alone, 100.0% with VeriKQL; invented names 14.3% and 0.0%.
  • 14 fresh cases on their own (kept private, so nothing could be tuned to them): compile-and-bind 92.9% alone, 100.0% with VeriKQL; invented names 2.4% and 0.0%.
  • 3 of 1094 calls were answered by another Claude model (claude-sonnet-5) after Anthropic's safety system declined them, all in the Claude-alone arm. They are counted as run.
  • The labels used by the secondary metrics were drafted by Claude from evidence and reviewed by the owner; the verdict and both headline metrics don't use them.

Read the full report, case by case The v1 report

Inside VeriKQL

DoorsClaude, ChatGPT or Cursor over MCP; the command line; a GitHub Action; this site
Public MCP server10 read-only tools, rate-limited, no sign-in, no secrets in the image
Verifiera guard, Microsoft's parser in its own process, an ASIM linter and the proof record
Pinned dataschemas, ATT&CK 20.0, 3,555 Content Hub rules and their patterns, 397 Windows events
Studiothe agentic pipeline, with cost limits, cross-vendor review and a human gate

Next: add VeriKQL to Claude, or see what Content Hub already covers.