CerbiShield.Contracts
1.3.1
dotnet add package CerbiShield.Contracts --version 1.3.1
NuGet\Install-Package CerbiShield.Contracts -Version 1.3.1
<PackageReference Include="CerbiShield.Contracts" Version="1.3.1" />
<PackageVersion Include="CerbiShield.Contracts" Version="1.3.1" />
<PackageReference Include="CerbiShield.Contracts" />
paket add CerbiShield.Contracts --version 1.3.1
#r "nuget: CerbiShield.Contracts, 1.3.1"
#:package CerbiShield.Contracts@1.3.1
#addin nuget:?package=CerbiShield.Contracts&version=1.3.1
#tool nuget:?package=CerbiShield.Contracts&version=1.3.1
CerbiShield.Contracts
Shared message contracts for the CerbiShield ecosystem — the single source of truth for DTOs exchanged between all CerbiShield microservices.
Installation
dotnet add package CerbiShield.Contracts
Version 1.2.0 (Current)
Scoring Event Evidence Metadata
ScoringEventDto schema version 1.2 is an additive evidence extension for auditor-ready source-side logging governance. All evidence fields are nullable so producers using v1.1 payloads remain valid and consumers can adopt the metadata incrementally.
| New Property | Type | Purpose |
|---|---|---|
GovernanceProfileId |
string? |
Stable profile identifier used by the runtime. |
GovernanceProfileVersion |
string? |
Profile version evaluated for the event. |
GovernanceProfileHash |
string? |
Hash of the ruleset used to verify source-side evidence. |
GovernanceDecision |
string? |
Final governance decision for the log event. |
EnforcementAction |
string? |
Action taken at the source, such as tag or redact. |
ExceptionId |
string? |
Approved exception identifier, when one applies. |
ExceptionReason |
string? |
Reason captured for the applied exception. |
ExceptionApprovedBy |
string? |
Principal or workflow that approved the exception. |
ExceptionExpiresAtUtc |
DateTime? |
UTC expiration for the applied exception. |
Rule → App → Violation Linkage
ViolationDto now carries full context so downstream consumers (dashboards, analytics, reports) can trace every violation back to the exact rule, profile, and app that produced it.
| New Property | Type | Purpose |
|---|---|---|
Description |
string? |
Human-readable rule description from the profile's FieldDescriptions. Tells the user why the rule exists and how to fix it. |
ProfileName |
string? |
The governance profile name that produced the violation (e.g., "Orders"). |
AppName |
string? |
The app scope that owns the profile (e.g., "OrderService"). |
Composite RuleId Format
The RuleId field now supports a stable composite format:
{profile}:{field}:{code}
Examples:
Orders:UserId:Missing— Required fieldUserIdis missing in theOrdersprofilePayments:creditCardPlain:Forbidden— Forbidden field detectedAnalytics:sessionId:InvalidType— Type mismatch onsessionId
This composite key enables the Violation Explorer dashboard to group, filter, and drill into violations by rule, field, profile, and app.
Backward-Compatible Schema Validation
ScoringEventValidator now accepts any schema version between 1.0 and 1.2 (inclusive), so existing producers sending 1.0 or 1.1 events are not rejected when consumers upgrade to this package.
Full Changelog
ViolationDto: addedDescription,ProfileName,AppNameContractVersions.ScoringEventSchemaVersion:1.1→1.2ScoringEventValidator: range-based schema version check (1.0–1.2)- Package version:
1.3.0→1.3.1-preview.1(repo package version already used the 1.3.x multi-targeting scheme)
Version 1.1.0
- Added
ServiceName,AppVersion,InstanceId,DeploymentIdtoScoringEventDto - Added
GovernanceConfigDtofor dashboard-generated configs TenantIdcan now come from governance configSchemaVersionbumped to1.1
Package Contents
Scoring Contracts
ScoringEventDto— Canonical scoring event payload (v1.2: additive nullable evidence metadata; v1.1: +ServiceName, AppVersion, InstanceId, DeploymentId)ScoringQueueEnvelopeDto— Queue envelope wrapperScoreBreakdownDto— Score breakdown by category (Overall, Governance, Safety)ViolationDto— Governance violation details (v1.2: +Description, ProfileName, AppName)GovernanceFlagsDto— Governance processing flags
Governance Contracts
GovernanceConfigDto— Dashboard-generated config with embedded TenantIdGovernanceProfileDto— Profile with rules and environment overridesGovernanceRuleDto— Individual governance ruleEnvironmentOverrideDto— Per-environment severity adjustments
Aggregation Contracts
AppMetricDto— Application-level metric data points
Validation
ScoringEventValidator— ValidatesScoringEventDtoinstances (schema version range, required fields, score bounds)ValidationResult— Validation result record
Schema Versions
| Version | Status | Notes |
|---|---|---|
1.2 |
Current | Additive nullable ScoringEventDto evidence metadata; ViolationDto linkage fields |
1.1 |
Supported | Identity fields (AppVersion, InstanceId, DeploymentId) |
1.0 |
Supported | Initial release |
Data Flow
┌──────────────────┐ ┌─────────────────────┐ ┌──────────────────────┐
│ Runtime Engine │────▶│ Scoring Shipper │────▶│ Scoring Aggregator │
│ (GovernanceRT) │ │ (Serilog/MEL/Stream)│ │ (ScoringApi) │
└──────────────────┘ └─────────────────────┘ └──────────────────────┘
│ │ │
│ ViolationDto │ ScoringEventDto │ ScoringEvent
│ .RuleId │ .Violations[] │ .ViolationCount
│ .Code │ .AppName │ .GovernanceProfile
│ .Field │ .GovernanceProfile │
│ .Description │ .DeploymentId │
│ .ProfileName │ ▼
│ .AppName │ ┌──────────────────────┐
│ │ │ Analytics API │
▼ ▼ │ (ViolationExplorer) │
GovernanceStore Dashboard └──────────────────────┘
(Playground)
License
| 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 is compatible. 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
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on CerbiShield.Contracts:
| Package | Downloads |
|---|---|
|
CerbiStream
CerbiStream.Logging - Secure, Scalable, and Standardized Logging for Modern Applications. |
|
|
Cerbi.Governance.Core
Shared governance models, validation contracts, and plugins used across CerbiStream and GovernanceAnalyzer. |
|
|
CerbiStream.GovernanceAnalyzer
Roslyn analyzer to enforce structured logging governance for CerbiStream apps. Ensures consistency, traceability, and compliance with score shipping support. |
|
|
Cerbi.Governance.Runtime
Real-time governance enforcement for CerbiStream and other structured loggers. Uses canonical Dashboard Profile model. |
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.3.1: Add ScoringEventDto v1.2 nullable evidence metadata for source-side governance auditability. Backward-compatible with v1.1 payloads.