feat(ucca): persist 3 CRA->NIST mappings (primary_implementation) + evidence
CRA Annex I Part I (2)(e)/(2)(l)/(2)(i) had no clean OWASP target (rejected: "Mapping ueber NIST/BSI erforderlich"). Their NIST home, curated + accepted: (2)(e) Integritaet -> SI-7 (Software/Firmware/Information Integrity) (2)(l) Sichere Updates -> SI-2 (Flaw Remediation) (2)(i) Angriffsflaeche -> CM-7 (Least Functionality) New mapping_type=primary_implementation = the single canonical control per obligation (stronger than implements/supports); related controls (SC-3(3), RA-5, AC-6, SI-16, ...) follow later as supports. Evidence is framework-AGNOSTIC: SI-7/SI-2/CM-7 reuse the shared evidence_type catalog (config_export/test_report/repo_scan) - same types carry CRA, NIST, ISO 27001, IEC 62443, BSI. (framework,control) is only the link, not the type. obligation_id left empty: the Obligation Registry assigns it (exported via controls_for_obligation_mapping.json), then we adopt. go test ./internal/ucca green. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ type ControlMapping struct {
|
||||
SourceRole string `json:"source_role"` // source_role of the norm (operational_requirement, ...)
|
||||
TargetFramework string `json:"target_framework"` // e.g. "OWASP ASVS"
|
||||
TargetControl string `json:"target_control"` // e.g. "V6.3.1"
|
||||
MappingType string `json:"mapping_type"` // supports | partially_supports | implements | related | contradicts
|
||||
MappingType string `json:"mapping_type"` // primary_implementation | implements | supports | partially_supports | related | contradicts
|
||||
MappingStatus string `json:"mapping_status"` // candidate | accepted | rejected | superseded
|
||||
Provenance string `json:"provenance"` // retriever_candidate | human_curated | rule_based
|
||||
ObligationID string `json:"obligation_id,omitempty"` // stable cross-session join key (Obligation Registry); empty until adopted, citation_unit is the interim bridge
|
||||
@@ -36,7 +36,7 @@ type ControlMapping struct {
|
||||
|
||||
// Allowed enum values — the deterministic "rule" layer that keeps the curated store clean.
|
||||
var (
|
||||
mappingTypeValues = map[string]bool{"supports": true, "partially_supports": true, "implements": true, "related": true, "contradicts": true}
|
||||
mappingTypeValues = map[string]bool{"primary_implementation": true, "implements": true, "supports": true, "partially_supports": true, "related": true, "contradicts": true}
|
||||
mappingStatusValues = map[string]bool{"candidate": true, "accepted": true, "rejected": true, "superseded": true}
|
||||
provenanceValues = map[string]bool{"retriever_candidate": true, "human_curated": true, "rule_based": true}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user