microsoft/KQL Guard

Lint KQL detection rules for syntax errors and performance anti-patterns. Outputs SARIF v2.1.0 for GitHub Code Scanning.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
modeHow to obtain the binary: download (default, fetch release asset), docker (run ghcr image), or prebuilt (use a locally-built binary).nodownload
versionRelease tag / image tag to use for download and docker modes. Defaults to the latest release.nolatest
pathFile or directory to scan. Directories are searched recursively for *.kql files.no.
formatOutput format: sarif (default), text, or json.nosarif
max-costFail the scan when a query's estimated cost exceeds this value. Empty = no cost gate.no""
schemaPath to a schema.json for schema-aware validation. Empty = skip.no""
argsRaw arguments appended verbatim to the kql-guard invocation (escape hatch).no""
working-directoryDirectory to run from. Defaults to the workspace root.no""
fail-on-violationsWhen true, the action fails the job when kql-guard exits 1 (errors, --max-cost breach, or --strict findings). When false (default), it only sets the exit-code output. Cost warnings are advisory — pass --max-cost or --strict via args to gate on them.nofalse
prebuilt-pathprebuilt mode only: path to the locally-built binary. Defaults to bin/Release/net10.0/<rid>/publish/kql-guard.no""
namedescription
sarif-filePath to the written SARIF file (empty unless format=sarif).
exit-codekql-guard exit code: 0 clean/advisory, 1 errors or --max-cost/--strict gate, 2 usage error.