Documentation
¶
Index ¶
- type AISystemDefinition
- type AISystemRiskAssessment
- func (r *AISystemRiskAssessment) AssessMitigationMeasures(aiSystem *AISystemDefinition) *MitigationMeasuresResult
- func (r *AISystemRiskAssessment) AssessRiskAnalysis(aiSystem *AISystemDefinition) *RiskAnalysisResult
- func (r *AISystemRiskAssessment) AssessRiskManagementSystem(aiSystem *AISystemDefinition) (*RiskManagementSystemResult, error)
- type AISystemRiskLevel
- type AdversarialTester
- type ArticleComplianceResult
- type AssessmentCriterion
- type AssessmentEngine
- type AssessmentResult
- type BiasDetector
- type BiasMetric
- type BiasResult
- type CategoryCoverage
- type CategoryInfo
- type Clause
- type CompletenessChecker
- type ComplianceGap
- type ComplianceMapping
- type ComplianceRecommendation
- type ComplianceReport
- type ComplianceRequirement
- type ComplianceStatus
- type ComplianceSummary
- type ConsentManager
- type ConstraintType
- type Control
- type CoverageLevel
- type DataBiasDetection
- type DataGovernanceValidator
- type DataLineageTracker
- type DataQualityAssessor
- type DecisionTracker
- type DecisionTransparencyResult
- type DemographicAnalyzer
- type DocumentationValidator
- type EUAIActArticle
- type EUAIActComplianceEngine
- type EUAIActComplianceReport
- type Evidence
- type EvidenceStore
- type ExplainabilityMethod
- type ExplainabilityResult
- type ExplainabilityTestSuite
- type ExplainabilityTester
- type Explanation
- type ExplanationType
- type FairnessResult
- type FairnessTest
- type Finding
- type Gap
- type HumanCompetencyValidator
- type HumanOversightValidator
- type ISO42001Compliance
- type ISO42001Standard
- type ISO42001Summary
- type ImpactAssessment
- type ImplementationStatus
- type IncidentTracker
- type InterventionPoint
- type MitigationMeasuresResult
- type MitigationPlanner
- type NonComplianceItem
- type OWASPComplianceReport
- type OWASPLLMCategory
- type OWASPLLMMapping
- type OWASPLLMSubcategory
- type OWASPLLMValidator
- func (v *OWASPLLMValidator) GenerateComplianceReport(templates []interface{}, reportID string, timestamp string) (*OWASPComplianceReport, error)
- func (v *OWASPLLMValidator) GetAllCategories() []CategoryInfo
- func (v *OWASPLLMValidator) GetCategoryInfo(category OWASPLLMCategory) (CategoryInfo, bool)
- func (v *OWASPLLMValidator) ValidateMapping(mapping *ComplianceMapping) (bool, []string, error)
- type OutcomeFairnessValidator
- type OversightMechanism
- type OversightType
- type OversightValidation
- type PrivacyValidator
- type ProbabilityEngine
- type QualityIssue
- type QualityManagementValidator
- type QualityMetric
- type QualityResult
- type Recommendation
- type RepresentativenessAnalyzer
- type Requirement
- type RequirementResult
- type RequirementStatus
- type ResponsibilityTracker
- type RiskAnalysisResult
- type RiskCategory
- type RiskFactor
- type RiskManagementSystemResult
- type RobustnessResult
- type RobustnessTest
- type RobustnessTestType
- type SafetyConstraint
- type SafetyValidator
- type Severity
- type SubcategoryInfo
- type TemplateComplianceValidator
- func (v *TemplateComplianceValidator) GenerateComplianceReport(templates []interface{}, reportID string, timestamp string) (*ComplianceReport, error)
- func (v *TemplateComplianceValidator) GetComplianceCoverage(templates []interface{}) (map[OWASPLLMCategory]float64, error)
- func (v *TemplateComplianceValidator) SuggestComplianceMapping(template map[string]interface{}, templatePath string) (*ComplianceMapping, error)
- func (v *TemplateComplianceValidator) ValidateTemplateCompliance(template map[string]interface{}) (bool, []string, error)
- type TemplateSummary
- type TestCriterion
- type TestResult
- type TestStatus
- type TransparencyEngine
- func (t *TransparencyEngine) AssessDecisionTransparency(aiSystem *AISystemDefinition) *DecisionTransparencyResult
- func (t *TransparencyEngine) AssessExplainability(aiSystem *AISystemDefinition) (*ExplainabilityResult, error)
- func (t *TransparencyEngine) AssessUserInformation(aiSystem *AISystemDefinition) *UserInformationResult
- type UserInformationResult
- type UserInformationValidator
- type ValidationResult
- type Vulnerability
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AISystemDefinition ¶ added in v0.4.0
type AISystemRiskAssessment ¶ added in v0.4.0
type AISystemRiskAssessment struct {
// contains filtered or unexported fields
}
func NewAISystemRiskAssessment ¶ added in v0.4.0
func NewAISystemRiskAssessment() *AISystemRiskAssessment
func (*AISystemRiskAssessment) AssessMitigationMeasures ¶ added in v0.4.0
func (r *AISystemRiskAssessment) AssessMitigationMeasures(aiSystem *AISystemDefinition) *MitigationMeasuresResult
func (*AISystemRiskAssessment) AssessRiskAnalysis ¶ added in v0.4.0
func (r *AISystemRiskAssessment) AssessRiskAnalysis(aiSystem *AISystemDefinition) *RiskAnalysisResult
func (*AISystemRiskAssessment) AssessRiskManagementSystem ¶ added in v0.4.0
func (r *AISystemRiskAssessment) AssessRiskManagementSystem(aiSystem *AISystemDefinition) (*RiskManagementSystemResult, error)
Placeholder assessment methods
type AISystemRiskLevel ¶ added in v0.4.0
type AISystemRiskLevel int
const ( MinimalRisk AISystemRiskLevel = iota LimitedRisk HighRisk UnacceptableRisk GeneralPurposeAI )
type AdversarialTester ¶ added in v0.4.0
type AdversarialTester struct{}
type ArticleComplianceResult ¶ added in v0.4.0
type ArticleComplianceResult struct {
Article EUAIActArticle
Status ComplianceStatus
Requirements map[string]*RequirementResult
TestResults []*TestResult
NonCompliantItems []NonComplianceItem
Evidence []Evidence
}
type AssessmentCriterion ¶ added in v0.4.0
type AssessmentEngine ¶
type AssessmentEngine interface {
Assess(control *Control, evidence []Evidence) (*AssessmentResult, error)
CalculateCompliance(results []*AssessmentResult) float64
}
AssessmentEngine interface for assessing controls
type AssessmentResult ¶
type AssessmentResult struct {
ControlID string `json:"controlId"`
Status string `json:"status"`
ComplianceScore float64 `json:"complianceScore"`
Findings []Finding `json:"findings"`
Recommendations []string `json:"recommendations"`
AssessmentDate time.Time `json:"assessmentDate"`
NextReviewDate time.Time `json:"nextReviewDate"`
Details map[string]interface{} `json:"details"`
}
AssessmentResult represents the result of a control assessment
type BiasDetector ¶ added in v0.4.0
type BiasDetector struct {
// contains filtered or unexported fields
}
func NewBiasDetector ¶ added in v0.4.0
func NewBiasDetector() *BiasDetector
type BiasMetric ¶ added in v0.4.0
type BiasMetric interface {
CalculateBias(predictions, groundTruth []interface{}, demographics map[string]interface{}) (*BiasResult, error)
GetBiasThreshold() float64
GetMetricName() string
}
type BiasResult ¶ added in v0.4.0
type CategoryCoverage ¶
type CategoryCoverage struct {
Category OWASPLLMCategory
Name string
Status string // "full", "partial", "not_covered"
TemplatesCount int
SubcategoriesCovered int
SubcategoriesTotal int
Templates []TemplateSummary
MissingSubcategories []OWASPLLMSubcategory
}
CategoryCoverage represents the coverage for a category
type CategoryInfo ¶
type CategoryInfo struct {
ID OWASPLLMCategory
Name string
Description string
Subcategories []SubcategoryInfo
}
CategoryInfo contains information about an OWASP LLM category
type Clause ¶
type Clause struct {
ID string `json:"id"`
Number string `json:"number"`
Title string `json:"title"`
Description string `json:"description"`
Controls []Control `json:"controls"`
Requirements []Requirement `json:"requirements"`
}
Clause represents a clause in ISO 42001
type CompletenessChecker ¶ added in v0.4.0
type CompletenessChecker struct{}
type ComplianceGap ¶
type ComplianceGap struct {
Category OWASPLLMCategory `json:"category"`
Name string `json:"name"`
Status string `json:"status"`
MissingSubcategories []OWASPLLMSubcategory `json:"missing_subcategories"`
Recommendation string `json:"recommendation"`
}
ComplianceGap represents a gap in compliance coverage
type ComplianceMapping ¶
type ComplianceMapping struct {
OWASPLLM []OWASPLLMMapping `json:"owasp-llm,omitempty"`
Other map[string]interface{} `json:"-"`
}
ComplianceMapping represents the compliance mappings for a template
type ComplianceRecommendation ¶ added in v0.4.0
type ComplianceReport ¶
type ComplianceReport struct {
Standard string `json:"standard"`
AssessmentDate time.Time `json:"assessmentDate"`
Results map[string]*AssessmentResult `json:"results"`
OverallCompliance float64 `json:"overallCompliance"`
Recommendations []Recommendation `json:"recommendations"`
ExecutiveSummary string `json:"executiveSummary"`
}
ComplianceReport represents a compliance assessment report
type ComplianceRequirement ¶ added in v0.4.0
type ComplianceRequirement struct {
Article EUAIActArticle
Title string
Description string
Requirements []string
TestCriteria []TestCriterion
Mandatory bool
RiskLevels []AISystemRiskLevel
}
type ComplianceStatus ¶ added in v0.4.0
type ComplianceStatus int
const ( ComplianceStatusUnknown ComplianceStatus = iota ComplianceStatusCompliant ComplianceStatusPartiallyCompliant ComplianceStatusNonCompliant ComplianceStatusUnderReview )
type ComplianceSummary ¶
type ComplianceSummary struct {
TotalCategories int `json:"total_categories"`
CategoriesCovered int `json:"categories_covered"`
TotalTemplates int `json:"total_templates"`
ComplianceScore float64 `json:"compliance_score"`
GapsIdentified int `json:"gaps_identified"`
}
ComplianceSummary provides a summary of compliance status
type ConsentManager ¶ added in v0.4.0
type ConsentManager struct{}
type ConstraintType ¶ added in v0.4.0
type ConstraintType int
const ( OutputConstraint ConstraintType = iota BehaviorConstraint PerformanceConstraint SecurityConstraint EthicalConstraint )
type Control ¶
type Control struct {
ID string `json:"id"`
ClauseNumber string `json:"clauseNumber"`
Title string `json:"title"`
Description string `json:"description"`
Type string `json:"type"` // technical, organizational, documentation
Implementation ImplementationStatus `json:"implementation"`
Evidence []Evidence `json:"evidence"`
Gaps []Gap `json:"gaps"`
Recommendations []string `json:"recommendations"`
Metadata map[string]interface{} `json:"metadata"`
}
Control represents a control within a clause
type CoverageLevel ¶
type CoverageLevel string
CoverageLevel represents the level of coverage for a category or subcategory
const ( BasicCoverage CoverageLevel = "basic" ComprehensiveCoverage CoverageLevel = "comprehensive" AdvancedCoverage CoverageLevel = "advanced" )
Coverage levels
type DataBiasDetection ¶ added in v0.4.0
type DataBiasDetection struct{}
type DataGovernanceValidator ¶ added in v0.4.0
type DataGovernanceValidator struct {
// contains filtered or unexported fields
}
func NewDataGovernanceValidator ¶ added in v0.4.0
func NewDataGovernanceValidator() *DataGovernanceValidator
type DataLineageTracker ¶ added in v0.4.0
type DataLineageTracker struct{}
type DataQualityAssessor ¶ added in v0.4.0
type DataQualityAssessor struct {
// contains filtered or unexported fields
}
type DecisionTracker ¶ added in v0.4.0
type DecisionTracker struct{}
type DecisionTransparencyResult ¶ added in v0.4.0
type DecisionTransparencyResult struct {
IsTransparent RequirementStatus
TransparencyScore float64
DecisionLogs []string
}
type DemographicAnalyzer ¶ added in v0.4.0
type DemographicAnalyzer struct{}
type DocumentationValidator ¶ added in v0.4.0
type DocumentationValidator struct{}
type EUAIActArticle ¶ added in v0.4.0
type EUAIActArticle int
const ( Article5 EUAIActArticle = iota // Prohibited AI practices Article6 // Classification rules for high-risk AI systems Article8 // Conformity assessment Article9 // Risk management system Article10 // Data and data governance Article11 // Technical documentation Article12 // Record-keeping Article13 // Transparency and provision of information Article14 // Human oversight Article15 // Accuracy, robustness and cybersecurity Article16 // Post-market monitoring Article50 // Foundation models Article51 // Foundation models with systemic risk Article52 // Transparency obligations Article53 // General Purpose AI models )
type EUAIActComplianceEngine ¶ added in v0.4.0
type EUAIActComplianceEngine struct {
// contains filtered or unexported fields
}
EUAIActComplianceEngine implements EU AI Act compliance testing and validation Based on the EU AI Act (Regulation 2024/1689) requirements for high-risk AI systems
func NewEUAIActComplianceEngine ¶ added in v0.4.0
func NewEUAIActComplianceEngine(logger common.AuditLogger) *EUAIActComplianceEngine
NewEUAIActComplianceEngine creates a new EU AI Act compliance engine
func (*EUAIActComplianceEngine) PerformComplianceAssessment ¶ added in v0.4.0
func (e *EUAIActComplianceEngine) PerformComplianceAssessment(ctx context.Context, aiSystem *AISystemDefinition) (*EUAIActComplianceReport, error)
PerformComplianceAssessment performs a comprehensive EU AI Act compliance assessment
type EUAIActComplianceReport ¶ added in v0.4.0
type EUAIActComplianceReport struct {
ReportID string
AISystemID string
AssessmentDate time.Time
Assessor string
RiskLevel AISystemRiskLevel
OverallStatus ComplianceStatus
ComplianceResults map[EUAIActArticle]*ArticleComplianceResult
Recommendations []ComplianceRecommendation
Evidence map[string][]Evidence
NextAssessment time.Time
}
type Evidence ¶
type Evidence struct {
ID string `json:"id"`
Type string `json:"type"` // document, log, scan_result, test_result
Title string `json:"title"`
Description string `json:"description"`
Location string `json:"location"`
Date time.Time `json:"date"`
Status string `json:"status"`
Metadata map[string]interface{} `json:"metadata"`
}
Evidence represents evidence for control implementation
type EvidenceStore ¶
type EvidenceStore interface {
Store(evidence Evidence) error
Retrieve(controlID string) ([]Evidence, error)
Search(criteria map[string]interface{}) ([]Evidence, error)
}
EvidenceStore interface for storing and retrieving evidence
type ExplainabilityMethod ¶ added in v0.4.0
type ExplainabilityMethod interface {
GenerateExplanation(input interface{}, model interface{}) (*Explanation, error)
ValidateExplanation(explanation *Explanation) (*ValidationResult, error)
GetFidelity() float64
GetComprehensibility() float64
}
type ExplainabilityResult ¶ added in v0.4.0
type ExplainabilityResult struct {
MeetsRequirements RequirementStatus
AverageScore float64
ExplanationExamples []string
}
type ExplainabilityTestSuite ¶ added in v0.4.0
type ExplainabilityTestSuite struct{}
type ExplainabilityTester ¶ added in v0.4.0
type ExplainabilityTester struct {
// contains filtered or unexported fields
}
type Explanation ¶ added in v0.4.0
type ExplanationType ¶ added in v0.4.0
type ExplanationType int
const ( FeatureImportance ExplanationType = iota CounterfactualExplanation ExampleBasedExplanation RuleBasedExplanation NaturalLanguageExplanation VisualExplanation )
type FairnessResult ¶ added in v0.4.0
type FairnessTest ¶ added in v0.4.0
type Finding ¶
type Finding struct {
ID string `json:"id"`
Severity string `json:"severity"`
Description string `json:"description"`
Impact string `json:"impact"`
ControlID string `json:"controlId"`
Timestamp time.Time `json:"timestamp"`
}
Finding represents a compliance finding
type Gap ¶
type Gap struct {
ID string `json:"id"`
ControlID string `json:"controlId"`
Description string `json:"description"`
Severity string `json:"severity"` // critical, high, medium, low
DueDate time.Time `json:"dueDate"`
Status string `json:"status"` // open, in_progress, closed
}
Gap represents a compliance gap
type HumanCompetencyValidator ¶ added in v0.4.0
type HumanCompetencyValidator struct{}
type HumanOversightValidator ¶ added in v0.4.0
type HumanOversightValidator struct {
// contains filtered or unexported fields
}
func NewHumanOversightValidator ¶ added in v0.4.0
func NewHumanOversightValidator() *HumanOversightValidator
type ISO42001Compliance ¶
type ISO42001Compliance struct {
// contains filtered or unexported fields
}
ISO42001Compliance provides ISO 42001 compliance checking
func NewISO42001Compliance ¶
func NewISO42001Compliance() *ISO42001Compliance
NewISO42001Compliance creates a new ISO 42001 compliance checker
func (*ISO42001Compliance) CheckCompliance ¶
func (iso *ISO42001Compliance) CheckCompliance() (*ComplianceReport, error)
CheckCompliance performs a comprehensive compliance check
func (*ISO42001Compliance) ExportReport ¶
func (iso *ISO42001Compliance) ExportReport(report *ComplianceReport, format string) ([]byte, error)
ExportReport exports the compliance report in various formats
type ISO42001Standard ¶
ISO42001Standard represents the ISO/IEC 42001:2023 standard
type ISO42001Summary ¶
type ISO42001Summary struct {
TotalControls int `json:"totalControls"`
CompliantControls int `json:"compliantControls"`
PartialControls int `json:"partialControls"`
NonCompliantControls int `json:"nonCompliantControls"`
CriticalGaps int `json:"criticalGaps"`
HighGaps int `json:"highGaps"`
MediumGaps int `json:"mediumGaps"`
LowGaps int `json:"lowGaps"`
}
ISO42001Summary represents a compliance summary for ISO 42001
type ImpactAssessment ¶ added in v0.4.0
type ImpactAssessment struct{}
Placeholder implementations for compilation
type ImplementationStatus ¶
type ImplementationStatus struct {
Status string `json:"status"` // not_implemented, partial, implemented, verified
Percentage float64 `json:"percentage"`
LastAssessed time.Time `json:"lastAssessed"`
AssessedBy string `json:"assessedBy"`
EffectiveDate time.Time `json:"effectiveDate"`
ExpirationDate time.Time `json:"expirationDate,omitempty"`
}
ImplementationStatus represents the status of control implementation
type IncidentTracker ¶ added in v0.4.0
type IncidentTracker struct{}
type InterventionPoint ¶ added in v0.4.0
type MitigationMeasuresResult ¶ added in v0.4.0
type MitigationMeasuresResult struct {
IsEffective RequirementStatus
EffectivenessScore float64
ImplementedMeasures []string
}
type MitigationPlanner ¶ added in v0.4.0
type MitigationPlanner struct{}
type NonComplianceItem ¶ added in v0.4.0
type NonComplianceItem struct{}
type OWASPComplianceReport ¶
type OWASPComplianceReport struct {
ReportID string `json:"report_id"`
GeneratedAt string `json:"generated_at"`
Framework string `json:"framework"`
Summary ComplianceSummary `json:"summary"`
Categories []CategoryCoverage `json:"categories"`
Gaps []ComplianceGap `json:"gaps"`
}
OWASPComplianceReport represents an OWASP LLM compliance report
type OWASPLLMCategory ¶
type OWASPLLMCategory string
OWASPLLMCategory represents an OWASP LLM Top 10 category
const ( PromptInjection OWASPLLMCategory = "LLM01" InsecureOutputHandling OWASPLLMCategory = "LLM02" TrainingDataPoisoning OWASPLLMCategory = "LLM03" ModelDenialOfService OWASPLLMCategory = "LLM04" SupplyChainVulnerabilities OWASPLLMCategory = "LLM05" SensitiveInfoDisclosure OWASPLLMCategory = "LLM06" InsecurePluginDesign OWASPLLMCategory = "LLM07" ExcessiveAgency OWASPLLMCategory = "LLM08" Overreliance OWASPLLMCategory = "LLM09" ModelTheft OWASPLLMCategory = "LLM10" )
OWASP LLM Top 10 categories
type OWASPLLMMapping ¶
type OWASPLLMMapping struct {
Category OWASPLLMCategory `json:"category"`
Subcategory OWASPLLMSubcategory `json:"subcategory,omitempty"`
Coverage CoverageLevel `json:"coverage,omitempty"`
}
OWASPLLMMapping represents a mapping to an OWASP LLM Top 10 category and subcategory
type OWASPLLMSubcategory ¶
type OWASPLLMSubcategory string
OWASPLLMSubcategory represents a subcategory within an OWASP LLM Top 10 category
const ( // LLM01 subcategories DirectInjection OWASPLLMSubcategory = "direct-injection" IndirectInjection OWASPLLMSubcategory = "indirect-injection" Jailbreaking OWASPLLMSubcategory = "jailbreaking" // LLM02 subcategories XSS OWASPLLMSubcategory = "xss" SSRF OWASPLLMSubcategory = "ssrf" CommandInjection OWASPLLMSubcategory = "command-injection" SQLInjection OWASPLLMSubcategory = "sql-injection" // LLM03 subcategories DataPoisoning OWASPLLMSubcategory = "data-poisoning" BackdoorAttacks OWASPLLMSubcategory = "backdoor-attacks" BiasInjection OWASPLLMSubcategory = "bias-injection" // LLM04 subcategories ResourceExhaustion OWASPLLMSubcategory = "resource-exhaustion" TokenFlooding OWASPLLMSubcategory = "token-flooding" ContextWindowSaturation OWASPLLMSubcategory = "context-window-saturation" // LLM05 subcategories PretrainedModelVulnerabilities OWASPLLMSubcategory = "pretrained-model-vulnerabilities" DependencyRisks OWASPLLMSubcategory = "dependency-risks" IntegrationVulnerabilities OWASPLLMSubcategory = "integration-vulnerabilities" // LLM06 subcategories TrainingDataExtraction OWASPLLMSubcategory = "training-data-extraction" CredentialLeakage OWASPLLMSubcategory = "credential-leakage" PIIDisclosure OWASPLLMSubcategory = "pii-disclosure" // LLM07 subcategories PluginEscalation OWASPLLMSubcategory = "plugin-escalation" DataLeakage OWASPLLMSubcategory = "data-leakage" // LLM08 subcategories ScopeExpansion OWASPLLMSubcategory = "scope-expansion" PrivilegeEscalation OWASPLLMSubcategory = "privilege-escalation" // LLM09 subcategories HallucinationAcceptance OWASPLLMSubcategory = "hallucination-acceptance" UnverifiedRecommendations OWASPLLMSubcategory = "unverified-recommendations" CriticalDecisionDelegation OWASPLLMSubcategory = "critical-decision-delegation" // LLM10 subcategories ModelExtraction OWASPLLMSubcategory = "model-extraction" WeightStealing OWASPLLMSubcategory = "weight-stealing" ArchitectureInference OWASPLLMSubcategory = "architecture-inference" )
OWASP LLM Top 10 subcategories
type OWASPLLMValidator ¶
type OWASPLLMValidator struct {
// contains filtered or unexported fields
}
OWASPLLMValidator validates OWASP LLM compliance mappings
func NewDefaultOWASPLLMValidator ¶
func NewDefaultOWASPLLMValidator() (*OWASPLLMValidator, error)
NewDefaultOWASPLLMValidator creates a new OWASP LLM compliance validator with the default schema path
func NewOWASPLLMValidator ¶
func NewOWASPLLMValidator(schemaPath string) (*OWASPLLMValidator, error)
NewOWASPLLMValidator creates a new OWASP LLM compliance validator
func (*OWASPLLMValidator) GenerateComplianceReport ¶
func (v *OWASPLLMValidator) GenerateComplianceReport(templates []interface{}, reportID string, timestamp string) (*OWASPComplianceReport, error)
GenerateComplianceReport generates a compliance report for a set of templates
func (*OWASPLLMValidator) GetAllCategories ¶
func (v *OWASPLLMValidator) GetAllCategories() []CategoryInfo
GetAllCategories returns information about all OWASP LLM categories
func (*OWASPLLMValidator) GetCategoryInfo ¶
func (v *OWASPLLMValidator) GetCategoryInfo(category OWASPLLMCategory) (CategoryInfo, bool)
GetCategoryInfo returns information about an OWASP LLM category
func (*OWASPLLMValidator) ValidateMapping ¶
func (v *OWASPLLMValidator) ValidateMapping(mapping *ComplianceMapping) (bool, []string, error)
ValidateMapping validates an OWASP LLM compliance mapping
type OutcomeFairnessValidator ¶ added in v0.4.0
type OutcomeFairnessValidator struct{}
type OversightMechanism ¶ added in v0.4.0
type OversightMechanism struct {
MechanismID string
Name string
Type OversightType
Effectiveness float64
Implementation string
Requirements []string
Validation *OversightValidation
}
type OversightType ¶ added in v0.4.0
type OversightType int
const ( HumanInTheLoop OversightType = iota HumanOnTheLoop HumanInCommand HybridOversight )
type OversightValidation ¶ added in v0.4.0
type OversightValidation struct{}
type PrivacyValidator ¶ added in v0.4.0
type PrivacyValidator struct{}
type ProbabilityEngine ¶ added in v0.4.0
type ProbabilityEngine struct{}
type QualityIssue ¶ added in v0.4.0
type QualityManagementValidator ¶ added in v0.4.0
type QualityManagementValidator struct{}
func NewQualityManagementValidator ¶ added in v0.4.0
func NewQualityManagementValidator() *QualityManagementValidator
type QualityMetric ¶ added in v0.4.0
type QualityMetric interface {
AssessQuality(dataset interface{}) (*QualityResult, error)
GetMetricName() string
GetImportance() float64
}
type QualityResult ¶ added in v0.4.0
type QualityResult struct {
MetricName string
Score float64
Issues []QualityIssue
Recommendations []string
IsCompliant bool
}
type Recommendation ¶
type Recommendation struct {
ID string `json:"id"`
Priority string `json:"priority"`
Description string `json:"description"`
Actions []string `json:"actions"`
Timeline string `json:"timeline"`
}
Recommendation represents a compliance recommendation
type RepresentativenessAnalyzer ¶ added in v0.4.0
type RepresentativenessAnalyzer struct{}
type Requirement ¶
type Requirement struct {
ID string `json:"id"`
Description string `json:"description"`
Mandatory bool `json:"mandatory"`
Verifiable bool `json:"verifiable"`
}
Requirement represents a specific requirement
type RequirementResult ¶ added in v0.4.0
type RequirementStatus ¶ added in v0.4.0
type RequirementStatus int
const ( RequirementStatusUnknown RequirementStatus = iota RequirementStatusCompliant RequirementStatusNonCompliant RequirementStatusPartiallyCompliant RequirementStatusNotApplicable )
type ResponsibilityTracker ¶ added in v0.4.0
type ResponsibilityTracker struct{}
type RiskAnalysisResult ¶ added in v0.4.0
type RiskAnalysisResult struct {
IsAdequate RequirementStatus
CompletenessScore float64
Documentation []string
}
type RiskCategory ¶ added in v0.4.0
type RiskCategory struct {
CategoryID string
Name string
Description string
RiskFactors []RiskFactor
AssessmentCriteria []AssessmentCriterion
Probability float64
Impact float64
RiskScore float64
}
type RiskFactor ¶ added in v0.4.0
type RiskManagementSystemResult ¶ added in v0.4.0
type RiskManagementSystemResult struct {
HasRMS RequirementStatus
EffectivenessScore float64
Evidence []string
}
Placeholder assessment result types
type RobustnessResult ¶ added in v0.4.0
type RobustnessResult struct {
Score float64
PassedTests []string
FailedTests []string
Vulnerabilities []Vulnerability
Recommendations []string
}
type RobustnessTest ¶ added in v0.4.0
type RobustnessTest struct {
TestID string
Name string
TestType RobustnessTestType
Configuration map[string]interface{}
PassThreshold float64
Results *RobustnessResult
}
type RobustnessTestType ¶ added in v0.4.0
type RobustnessTestType int
const ( AdversarialRobustness RobustnessTestType = iota DistributionShift InputCorruption ModelDrift EdgeCaseHandling StressTest )
type SafetyConstraint ¶ added in v0.4.0
type SafetyValidator ¶ added in v0.4.0
type SafetyValidator struct {
// contains filtered or unexported fields
}
func NewSafetyValidator ¶ added in v0.4.0
func NewSafetyValidator() *SafetyValidator
type SubcategoryInfo ¶
type SubcategoryInfo struct {
ID OWASPLLMSubcategory
Name string
Description string
}
SubcategoryInfo contains information about an OWASP LLM subcategory
type TemplateComplianceValidator ¶
type TemplateComplianceValidator struct {
// contains filtered or unexported fields
}
TemplateComplianceValidator validates template compliance mappings
func NewTemplateComplianceValidator ¶
func NewTemplateComplianceValidator() (*TemplateComplianceValidator, error)
NewTemplateComplianceValidator creates a new template compliance validator
func (*TemplateComplianceValidator) GenerateComplianceReport ¶
func (v *TemplateComplianceValidator) GenerateComplianceReport(templates []interface{}, reportID string, timestamp string) (*ComplianceReport, error)
GenerateComplianceReport generates a compliance report for a set of templates
func (*TemplateComplianceValidator) GetComplianceCoverage ¶
func (v *TemplateComplianceValidator) GetComplianceCoverage(templates []interface{}) (map[OWASPLLMCategory]float64, error)
GetComplianceCoverage calculates compliance coverage for a set of templates
func (*TemplateComplianceValidator) SuggestComplianceMapping ¶
func (v *TemplateComplianceValidator) SuggestComplianceMapping(template map[string]interface{}, templatePath string) (*ComplianceMapping, error)
SuggestComplianceMapping suggests compliance mappings for a template based on its content
func (*TemplateComplianceValidator) ValidateTemplateCompliance ¶
func (v *TemplateComplianceValidator) ValidateTemplateCompliance(template map[string]interface{}) (bool, []string, error)
ValidateTemplateCompliance validates a template's compliance mappings
type TemplateSummary ¶
type TemplateSummary struct {
ID string
Name string
Subcategory OWASPLLMSubcategory
Coverage CoverageLevel
}
TemplateSummary provides a summary of a template
type TestCriterion ¶ added in v0.4.0
type TestResult ¶ added in v0.4.0
type TestStatus ¶ added in v0.4.0
type TestStatus int
const ( TestStatusPassed TestStatus = iota TestStatusFailed TestStatusSkipped TestStatusError )
type TransparencyEngine ¶ added in v0.4.0
type TransparencyEngine struct {
// contains filtered or unexported fields
}
func NewTransparencyEngine ¶ added in v0.4.0
func NewTransparencyEngine() *TransparencyEngine
func (*TransparencyEngine) AssessDecisionTransparency ¶ added in v0.4.0
func (t *TransparencyEngine) AssessDecisionTransparency(aiSystem *AISystemDefinition) *DecisionTransparencyResult
func (*TransparencyEngine) AssessExplainability ¶ added in v0.4.0
func (t *TransparencyEngine) AssessExplainability(aiSystem *AISystemDefinition) (*ExplainabilityResult, error)
func (*TransparencyEngine) AssessUserInformation ¶ added in v0.4.0
func (t *TransparencyEngine) AssessUserInformation(aiSystem *AISystemDefinition) *UserInformationResult
type UserInformationResult ¶ added in v0.4.0
type UserInformationResult struct {
IsAdequate RequirementStatus
CompletenessScore float64
ProvidedInformation []string
}
type UserInformationValidator ¶ added in v0.4.0
type UserInformationValidator struct{}
type ValidationResult ¶ added in v0.4.0
type ValidationResult struct{}
type Vulnerability ¶ added in v0.4.0
type Vulnerability struct{}