Cerbi.Governance.Core 1.0.2

dotnet add package Cerbi.Governance.Core --version 1.0.2
                    
NuGet\Install-Package Cerbi.Governance.Core -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cerbi.Governance.Core" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cerbi.Governance.Core" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Cerbi.Governance.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cerbi.Governance.Core --version 1.0.2
                    
#r "nuget: Cerbi.Governance.Core, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Cerbi.Governance.Core&version=1.0.2
                    
Install Cerbi.Governance.Core as a Cake Addin
#tool nuget:?package=Cerbi.Governance.Core&version=1.0.2
                    
Install Cerbi.Governance.Core as a Cake Tool

Cerbi.Governance.Core


📄 What is Cerbi.Governance.Core?

Cerbi.Governance.Core is the shared runtime contract used across the Cerbi ecosystem for both build-time analyzers and runtime log governance enforcement. It includes:

  • JSON schema models (LogProfile, CerbiGovernance, etc.)
  • Plugin interfaces (ICustomGovernancePlugin)
  • Governance result structures (GovernanceViolation, GovernanceValidationResult)
  • Attribute to wire up governance configs ([assembly: CerbiGovernanceConfig(...)])

This library is designed to be lightweight, portable, and reusable across CerbiStream, governance analyzers, plugin systems, and runtime tools.


✨ Primary Use Cases

Scenario How Cerbi.Governance.Core Helps
✏️ Authoring governance JSON Models like LogProfile, EncryptionSettings
🔗 Connecting analyzers Used by Roslyn analyzers to interpret profile data
⌛ Runtime log evaluation Used by CerbiStream to validate logs during execution
🔍 Plugin extensibility Exposes ICustomGovernancePlugin for custom rules

🚀 Quick Start

# Add to your CerbiStream app or analyzer
$ dotnet add package Cerbi.Governance.Core

Then, in your code:

using Cerbi.Governance;

[assembly: CerbiGovernanceConfig("cerbi_governance.json")]

💡 Common Types

✏️ Governance Profile Structure

public class LogProfile
{
    public Dictionary<string, string> FieldSeverities { get; set; }
    public Dictionary<string, List<string>> FieldEnums { get; set; }
    public Dictionary<string, string> FieldDescriptions { get; set; }
    public bool RequireTopic { get; set; }
    public List<string> AllowedTopics { get; set; }
    public string DefaultTopic { get; set; }
    public EncryptionSettings EncryptionSettings { get; set; }
    public bool? AllowRelax { get; set; }
}

⚡ Plugin Interface

public interface ICustomGovernancePlugin
{
    string Id { get; }
    string Description { get; }
    PluginCategory Category { get; }
    string[] AppliesToProfiles { get; }

    bool Validate(string profileName, Dictionary<string, object> logData, out List<string> failures, out int impactScore);
}

⚠️ Violation Result

public class GovernanceViolation
{
    public string RuleId { get; set; }
    public string Message { get; set; }
    public string Field { get; set; }
    public string Severity { get; set; } = "Error";
}

Component Reference This Package?
CerbiStream (runtime) ✅ Yes
Cerbi Governance Analyzer ✅ Yes
Governance plugins ✅ Yes
CI testing tools ✅ Yes

⚖️ License

  • License: MIT
  • Copyright: © Cerbi LLC 2025

Structured • Secure • Compliant

Cerbi.Governance.Core powers build-time and runtime governance for structured logging apps.

Product 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Cerbi.Governance.Core:

Package Downloads
CerbiStream

CerbiStream.Logging - Secure, Scalable, and Standardized Logging for Modern Applications.

CerbiStream.GovernanceAnalyzer

Roslyn analyzer to enforce structured logging governance for CerbiStream apps. Ensures consistency, traceability, and compliance.

Cerbi.MEL.Governance

Real-time governance enforcement for Microsoft.Extensions.Logging (MEL) using the Cerbi validation engine.

Cerbi.Governance.Runtime

Real-time governance enforcement for CerbiStream and other structured loggers.

Cerbi.Serilog.GovernanceAnalyzer

Roslyn analyzer that enforces structured logging governance for Serilog-based CerbiStream apps. Prevents forbidden fields, ensures required fields, and enables enterprise-grade compliance enforcement.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 447 5/19/2025
1.0.1 181 5/17/2025
1.0.0 105 5/17/2025