feat(go): report integrity anchor context

This commit is contained in:
Luna 2026-07-22 04:04:58 -07:00
parent 88d7a6e3b8
commit a25c73ab1a
No known key found for this signature in database
6 changed files with 68 additions and 8 deletions

View file

@ -171,6 +171,11 @@ func TestSlowEnrichmentAddsBoundedHashAndFileMetadata(t *testing.T) {
if file["exists"] != true || file["mode"] != float64(0o600) {
t.Fatalf("file enrichment=%#v", file)
}
integrity := report.Enrichment["integrity"].(map[string]any)
if integrity["go_assurance"].(map[string]any)["status"] != "present" ||
integrity["rootcheck"].(map[string]any)["enabled"] != false {
t.Fatalf("integrity enrichment=%#v", integrity)
}
logRaw, err := os.ReadFile(filepath.Join(store.Dir, "alert-20260722-101112.log"))
if err != nil || !strings.Contains(string(logRaw), "ENODIA SENTINEL ALERT") {
t.Fatalf("slow log err=%v text=%q", err, logRaw)