Cerbi.Governance.Runtime
2.0.43
dotnet add package Cerbi.Governance.Runtime --version 2.0.43
NuGet\Install-Package Cerbi.Governance.Runtime -Version 2.0.43
<PackageReference Include="Cerbi.Governance.Runtime" Version="2.0.43" />
<PackageVersion Include="Cerbi.Governance.Runtime" Version="2.0.43" />
<PackageReference Include="Cerbi.Governance.Runtime" />
paket add Cerbi.Governance.Runtime --version 2.0.43
#r "nuget: Cerbi.Governance.Runtime, 2.0.43"
#:package Cerbi.Governance.Runtime@2.0.43
#addin nuget:?package=Cerbi.Governance.Runtime&version=2.0.43
#tool nuget:?package=Cerbi.Governance.Runtime&version=2.0.43
Cerbi.Governance.Runtime
Real-time governance enforcement and scoring for structured logging in .NET.
Cerbi.Governance.Runtime loads canonical governance profiles, validates structured event fields, annotates records with governance metadata, computes optional score impact, and can ship compact score events asynchronously.
Supported profile documents
FileGovernanceSource supports two document shapes.
Root-level canonical profile
{
"$schema": "https://schemas.cerbi.io/governance/profile.schema.json",
"name": "Orders",
"requiredFields": ["requestId"],
"fieldTypes": {
"requestId": "Guid"
},
"allowRelax": true
}
Load a root-level profile with the one-argument constructor:
var source = new FileGovernanceSource("cerbi_governance.json");
Legacy wrapper containing canonical profiles
{
"EnforcementMode": "Strict",
"LoggingProfiles": {
"Orders": {
"name": "Orders",
"requiredFields": ["requestId"],
"fieldTypes": {
"requestId": "Guid"
},
"allowRelax": true
}
}
}
Load a wrapped profile with an explicit profile name:
var source = new FileGovernanceSource("cerbi_governance.json", "Orders");
Wrapper-level noncanonical metadata is tolerated. A document that combines LoggingProfiles with canonical root-profile markers is rejected as ambiguous. Wrapped entries must themselves conform to the canonical Profile schema.
Profile selection prefers an exact ordinal name match. When there is no exact match, one case-insensitive match is accepted. Missing or ambiguous matches throw InvalidDataException.
Runtime validation
var validator = new RuntimeGovernanceValidator(
isEnabled: () => true,
profileName: "Orders",
source: new FileGovernanceSource("cerbi_governance.json", "Orders"));
var record = new Dictionary<string, object>
{
["requestId"] = Guid.NewGuid(),
["Status"] = "Pending"
};
validator.ValidateInPlace(record);
The validator mutates the supplied dictionary in place and can add:
GovernanceProfileUsedGovernanceEnforcedGovernanceRelaxedGovernanceViolationsGovernanceViolationsStructuredGovernanceScoreImpactGovernanceScoringVersion
Supported canonical rule areas include required and disallowed fields, field severity, field type, enum constraints, allowed topics, sensitive-field overrides, relaxation, and scoring.
Scoring and shipping
When Scoring.Enabled is true, the runtime calculates governance score impact using profile severity weights and optional plugin multipliers. Relaxed events have zero impact while retaining governance metadata.
ScoreShipper provides nonblocking channel-based batching, retry, and optional transport of canonical scoring envelopes from CerbiShield.Contracts.
ILogger integration
LoggerGovernanceExtensions applies validation before forwarding the structured event to the configured logging pipeline. It can also enrich events with application, instance, region, and cloud-provider metadata.
Extensibility
Implement IRuntimeGovernanceSource to load profiles from another backing store:
public interface IRuntimeGovernanceSource
{
Profile? Load();
DateTime GetLastUpdatedUtc();
}
Implement IRuntimeGovernancePlugin to contribute custom runtime checks and score impact.
Performance
The runtime is designed for high-throughput event processing:
- compiled and cached profile rules
- in-place record mutation
- allocation-conscious required-field tracking
- timestamp-based file reload checks
- nonblocking score shipping
License
MIT
| 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
- Cerbi.Governance.Core (>= 2.2.37)
- CerbiShield.Contracts (>= 1.3.1)
- Microsoft.Extensions.Logging (>= 9.0.5)
- Newtonsoft.Json (>= 13.0.3)
-
net8.0
- Cerbi.Governance.Core (>= 2.2.37)
- CerbiShield.Contracts (>= 1.3.1)
- Microsoft.Extensions.Logging (>= 9.0.5)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Cerbi.Governance.Runtime:
| Package | Downloads |
|---|---|
|
CerbiStream
CerbiStream.Logging - Secure, Scalable, and Standardized Logging for Modern Applications. |
|
|
Cerbi.MEL.Governance
Real-time governance enforcement for Microsoft.Extensions.Logging (MEL) using the Cerbi validation engine. |
|
|
Cerbi.Serilog.GovernanceAnalyzer
Serilog governance analyzer plugin: runtime validation, filtering, enrichment, live reload, correlation, relaxed diagnostics, and high-throughput score shipping with ArrayPool optimizations. Supports .NET 8.0+ and .NET 10.0. |
|
|
Cerbi.Serilog.Governance
Serilog plugin that enforces Cerbi governance at runtime. Provides filtering to block non-compliant logs and enrichment to tag governance metadata. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.43 | 156 | 7/13/2026 |
| 2.0.42 | 97 | 7/13/2026 |
| 2.0.41 | 90 | 7/13/2026 |
| 2.0.40 | 89 | 7/12/2026 |
| 2.0.39 | 96 | 7/12/2026 |
| 2.0.38 | 93 | 7/12/2026 |
| 2.0.37 | 95 | 7/12/2026 |
| 2.0.36 | 94 | 7/12/2026 |
| 2.0.35 | 89 | 7/12/2026 |
| 2.0.34 | 134 | 4/2/2026 |
| 2.0.33 | 111 | 4/2/2026 |
| 2.0.32 | 111 | 4/2/2026 |
| 2.0.31 | 109 | 4/2/2026 |
| 2.0.30 | 116 | 4/2/2026 |
| 2.0.29 | 118 | 4/2/2026 |
| 2.0.28 | 118 | 4/2/2026 |
| 2.0.23 | 460 | 3/17/2026 |
| 1.1.10 | 232 | 12/22/2025 |
| 1.1.9 | 153 | 12/21/2025 |
| 1.1.8 | 243 | 12/19/2025 |