65 lines
2.2 KiB
C#
65 lines
2.2 KiB
C#
|
|
using StellaOps.Scanner.AiMlSecurity.Models;
|
|
using System.Collections.Immutable;
|
|
|
|
namespace StellaOps.Scanner.AiMlSecurity.Policy;
|
|
|
|
public sealed record AiGovernancePolicy
|
|
{
|
|
public string? Version { get; init; }
|
|
public string? ComplianceFramework { get; init; }
|
|
public ImmutableArray<string> ComplianceFrameworks { get; init; } = [];
|
|
public AiModelCardRequirements ModelCardRequirements { get; init; } = new();
|
|
public AiTrainingDataRequirements TrainingDataRequirements { get; init; } = new();
|
|
public AiRiskCategories RiskCategories { get; init; } = new();
|
|
public AiSafetyRequirements SafetyRequirements { get; init; } = new();
|
|
public AiProvenanceRequirements ProvenanceRequirements { get; init; } = new();
|
|
public bool RequireRiskAssessment { get; init; }
|
|
public ImmutableArray<AiGovernanceExemption> Exemptions { get; init; } = [];
|
|
}
|
|
|
|
public sealed record AiModelCardRequirements
|
|
{
|
|
public AiModelCardCompleteness MinimumCompleteness { get; init; } = AiModelCardCompleteness.Basic;
|
|
public ImmutableArray<string> RequiredSections { get; init; } = [];
|
|
}
|
|
|
|
public sealed record AiTrainingDataRequirements
|
|
{
|
|
public bool RequireProvenance { get; init; } = true;
|
|
public bool SensitiveDataAllowed { get; init; }
|
|
public bool RequireBiasAssessment { get; init; } = true;
|
|
}
|
|
|
|
public sealed record AiRiskCategories
|
|
{
|
|
public ImmutableArray<string> HighRisk { get; init; } = [];
|
|
}
|
|
|
|
public sealed record AiSafetyRequirements
|
|
{
|
|
public bool RequireSafetyAssessment { get; init; } = true;
|
|
public AiHumanOversightRequirements HumanOversightRequired { get; init; } = new();
|
|
}
|
|
|
|
public sealed record AiHumanOversightRequirements
|
|
{
|
|
public bool ForHighRisk { get; init; } = true;
|
|
}
|
|
|
|
public sealed record AiProvenanceRequirements
|
|
{
|
|
public bool RequireHash { get; init; }
|
|
public bool RequireSignature { get; init; }
|
|
public ImmutableArray<string> TrustedSources { get; init; } = [];
|
|
public ImmutableArray<string> KnownModelHubs { get; init; } = [];
|
|
}
|
|
|
|
public sealed record AiGovernanceExemption
|
|
{
|
|
public string? ModelPattern { get; init; }
|
|
public string? Reason { get; init; }
|
|
public bool RiskAccepted { get; init; }
|
|
public DateOnly? ExpirationDate { get; init; }
|
|
}
|