CerbiShield.Contracts
1.2.1
dotnet add package CerbiShield.Contracts --version 1.2.1
NuGet\Install-Package CerbiShield.Contracts -Version 1.2.1
<PackageReference Include="CerbiShield.Contracts" Version="1.2.1" />
<PackageVersion Include="CerbiShield.Contracts" Version="1.2.1" />
<PackageReference Include="CerbiShield.Contracts" />
paket add CerbiShield.Contracts --version 1.2.1
#r "nuget: CerbiShield.Contracts, 1.2.1"
#:package CerbiShield.Contracts@1.2.1
#addin nuget:?package=CerbiShield.Contracts&version=1.2.1
#tool nuget:?package=CerbiShield.Contracts&version=1.2.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)
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.1.0→1.2.0
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.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 | 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 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. |
-
net8.0
- No dependencies.
NuGet packages (2)
Showing the top 2 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. |
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.2.1: Fix ContractVersions and SchemaVersion to use string types for proper version comparison.