feat(iace): Hazard-Library v2, Controls-Library, SEPA Avoidance, CE RAG-Ingest
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 35s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 19s
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 35s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 19s
- Hazard-Library: +79 neue Eintraege in 12 Kategorien (software_fault, hmi_error, mechanical_hazard, electrical_hazard, thermal_hazard, emc_hazard, configuration_error, safety_function_failure, logging_audit_failure, integration_error, environmental_hazard, maintenance_hazard) — Gesamtanzahl: ~116 Eintraege in 24 Kategorien - Controls-Library: neue Datei controls_library.go mit 200 Eintraegen in 6 Domaenen (REQ/ARCH/SWDEV/VER/CYBER/DOC) - Handler: GET /sdk/v1/iace/controls-library (?domain=, ?category=) - SEPA: CalculateInherentRisk() + 4. Param Avoidance (0=disabled, 1-5: 3=neutral); RiskComputeInput.Avoidance, RiskAssessment.Avoidance, AssessRiskRequest.Avoidance — backward-kompatibel (A=0 → S×E×P) - Tests: engine_test.go + hazard_library_test.go aktualisiert - Scripts: ingest-ce-corpus.sh — 15 CE/Safety-Dokumente (EUR-Lex, NIST, ENISA, NASA, OWASP, MITRE CWE) in bp_compliance_ce und bp_compliance_datenschutz - Docs: docs-src/services/sdk-modules/iace.md + mkdocs.yml Nav-Eintrag Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,7 @@ func TestCalculateInherentRisk_BasicCases(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
result := e.CalculateInherentRisk(tt.s, tt.ex, tt.p)
|
||||
result := e.CalculateInherentRisk(tt.s, tt.ex, tt.p, 0)
|
||||
if !almostEqual(result, tt.expected) {
|
||||
t.Errorf("CalculateInherentRisk(%d, %d, %d) = %v, want %v", tt.s, tt.ex, tt.p, result, tt.expected)
|
||||
}
|
||||
@@ -72,7 +72,7 @@ func TestCalculateInherentRisk_Clamping(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
result := e.CalculateInherentRisk(tt.s, tt.ex, tt.p)
|
||||
result := e.CalculateInherentRisk(tt.s, tt.ex, tt.p, 0)
|
||||
if !almostEqual(result, tt.expected) {
|
||||
t.Errorf("CalculateInherentRisk(%d, %d, %d) = %v, want %v", tt.s, tt.ex, tt.p, result, tt.expected)
|
||||
}
|
||||
@@ -88,7 +88,7 @@ func TestCalculateInherentRisk_FullCoverage(t *testing.T) {
|
||||
for ex := 1; ex <= 5; ex++ {
|
||||
for p := 1; p <= 5; p++ {
|
||||
expected := float64(s * ex * p)
|
||||
result := e.CalculateInherentRisk(s, ex, p)
|
||||
result := e.CalculateInherentRisk(s, ex, p, 0)
|
||||
if !almostEqual(result, expected) {
|
||||
t.Errorf("CalculateInherentRisk(%d, %d, %d) = %v, want %v", s, ex, p, result, expected)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user