QueryGuard.Reporting
0.1.0-preview.4
Prefix Reserved
See the version list below for details.
dotnet add package QueryGuard.Reporting --version 0.1.0-preview.4
NuGet\Install-Package QueryGuard.Reporting -Version 0.1.0-preview.4
<PackageReference Include="QueryGuard.Reporting" Version="0.1.0-preview.4" />
<PackageVersion Include="QueryGuard.Reporting" Version="0.1.0-preview.4" />
<PackageReference Include="QueryGuard.Reporting" />
paket add QueryGuard.Reporting --version 0.1.0-preview.4
#r "nuget: QueryGuard.Reporting, 0.1.0-preview.4"
#:package QueryGuard.Reporting@0.1.0-preview.4
#addin nuget:?package=QueryGuard.Reporting&version=0.1.0-preview.4&prerelease
#tool nuget:?package=QueryGuard.Reporting&version=0.1.0-preview.4&prerelease
QueryGuard.Reporting
Render a QueryGuard.NET result as console text, versioned JSON, JUnit XML, or SARIF.
var result = await scope.CompleteAsync();
// Human-readable, for a terminal.
Console.Write(new QueryGuardConsoleReporter().Render(result));
// Machine-readable, with an explicit schema version.
await new QueryGuardJsonReporter().WriteAsync(result, "artifacts/queryguard.json");
// Rendered natively by almost every CI system.
await new QueryGuardJUnitReporter().WriteAsync(result, "artifacts/queryguard.junit.xml");
// For GitHub code scanning: an annotation on the line that ran the query.
await new QueryGuardSarifReporter(repositoryRoot).WriteAsync(result, "artifacts/queryguard.sarif");
SARIF puts a finding on the diff
Upload the file and a repeated query appears as an annotation on the line that caused it, in the viewer CodeQL already uses — no dashboard, nothing to install:
- uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: artifacts/queryguard.sarif
category: queryguard
The job needs security-events: write. Pass the repository root to the reporter: the paths a stack trace
records are absolute, and only a repository-relative path can be matched against a diff. Without it the
finding still appears, just without the annotation.
A candidate is reported as a warning, never an error, whatever the policy severity says about failing the build. Failing a build on evidence is how a check gets switched off rather than tuned. An allowlisted finding becomes a SARIF suppression carrying its reason, rather than being dropped — the repetition is still there, and the report should not imply otherwise.
Output is deterministic and versioned
Two runs over the same result produce byte-identical output, so a snapshot test on it is meaningful.
JSON carries an explicit schemaVersion: additive fields bump the minor version, and removing or
repurposing a field is a breaking change even in a preview. See
ADR-0011.
Redaction cannot be bypassed
A reporter receives a result that was already redacted, so no reporter — including one you write — can emit a parameter value or a connection string. That is enforced by construction rather than by convention.
Preview
Public APIs and the report schema may change before 1.0.0. See the
changelog.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- QueryGuard.Core (>= 0.1.0-preview.4)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- QueryGuard.Core (>= 0.1.0-preview.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 54 | 8/21/2026 |
| 0.1.0-preview.6 | 51 | 8/21/2026 |
| 0.1.0-preview.5 | 49 | 8/21/2026 |
| 0.1.0-preview.4 | 51 | 8/20/2026 |
| 0.1.0-preview.3 | 48 | 8/20/2026 |
| 0.1.0-preview.2 | 46 | 8/20/2026 |
| 0.1.0-preview.1 | 49 | 8/20/2026 |