Freedom251 › SQL Linters and Formatters
Valk Guard

What Valk Guard is
Valk Guard is a free SQL linter for checking raw SQL and application code before changes merge. It parses Go, Python, and C# source and derives SQL from supported ORM and query-builder patterns. Nineteen rules cover query safety, schema drift, and query or schema validation. Supported integrations include Go database/sql and Goqu, Python SQLAlchemy, and C# EF Core. Valk Guard uses a PostgreSQL parser; MySQL, SQLite, and other dialects are not supported. It needs no database connection, so projects can be scanned in CI and pull-request workflows. Findings can be emitted as terminal output, JSON, reviewdog rdjsonl, or SARIF, and a documented reviewdog workflow can post GitHub pull-request comments. Linux, macOS, and Windows binaries are available, with a Go install option. Building from source requires Go 1.25.8 or later; Python scans require Python 3.6 or later, and C# scans require .NET SDK 8.0 or later. It is Apache 2.0 licensed.
Who it suits
Valk Guard suits developers and teams reviewing database-related changes in CI or pull requests. It is aimed at Go, Python, and C# projects using supported PostgreSQL-oriented query patterns.
What it does well
- Free and Apache 2.0 licensed
- Scans without database infrastructure
- Includes 19 query and schema rules
- Supports SARIF and reviewdog output
- Provides Linux, macOS, and Windows binaries
What to know first
- PostgreSQL only
- No automatic fixes
- No custom rules
- C# synthesis skips uncertain dynamic expressions
Verdict
Valk Guard focuses on pre-merge SQL checks that fit CI and pull-request review. Its no-database workflow and multiple output formats are useful for automation, while PostgreSQL-only parsing limits database coverage.
Facts from Valk Guard's own pages
- Analysis
- It parses Go, Python, and C# source and synthesizes SQL from supported ORM and query-builder patterns. · github.com, 7 Oct 2026
- Audience
- The README describes Valk Guard as built for CI and pull request review workflows. · github.com, 7 Oct 2026
- CI output
- It can output terminal, JSON, reviewdog rdjsonl, and SARIF formats for GitHub code scanning. · github.com, 7 Oct 2026
- Database connection
- Valk Guard requires no database connection to scan a project. · github.com, 7 Oct 2026
- Database support
- It uses a PostgreSQL parser; MySQL, SQLite, and other dialects are not supported. · github.com, 7 Oct 2026
- Installation
- The project provides prebuilt Linux, macOS, and Windows binaries and a Go install option. · github.com, 7 Oct 2026
- Integrations
- It supports Go database/sql and Goqu, Python SQLAlchemy, and C# EF Core scanning. · github.com, 7 Oct 2026
- License
- The repository identifies Valk Guard as Apache 2.0 licensed. · github.com, 7 Oct 2026
- License and support
- The repository identifies its license as Apache 2.0 and links to contributing and security policy documents. · github.com, 7 Oct 2026
- No database connection
- The project says scanning requires no database connection and runs in CI without database infrastructure. · github.com, 7 Oct 2026
- Notable limitation
- C# query-builder synthesis covers deterministic query shapes and skips uncertain dynamic expressions. · github.com, 7 Oct 2026
- Output formats
- Findings can be reported in terminal, JSON, rdjsonl, or SARIF formats. · github.com, 7 Oct 2026
- Platforms
- Prebuilt binaries are offered for Linux, macOS, and Windows, with amd64 and arm64 builds. · github.com, 7 Oct 2026
- PostgreSQL only
- It uses a PostgreSQL parser; MySQL, SQLite, and other dialects are not supported. · github.com, 7 Oct 2026
- Pull request review
- The project documents a reviewdog workflow that posts findings as GitHub pull request comments. · github.com, 7 Oct 2026
- Purpose
- Valk Guard is a SQL linter that scans raw SQL and application code to catch risky queries before they merge. · github.com, 7 Oct 2026
- Requirements
- Building from source requires Go 1.25.8 or later; scanning Python files requires Python 3.6 or later, and scanning C# files requires .NET SDK 8.0 or later. · github.com, 7 Oct 2026
- Rules
- It ships with 19 rules covering query safety, schema drift, and query/schema validation. · github.com, 7 Oct 2026
- Security reporting
- The repository links to a security policy and vulnerability reporting route. · github.com, 7 Oct 2026
Where Valk Guard stands on Freedom251
- SQL Linters and Formatters#25 of 26