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

@ -291,6 +291,7 @@ func (s *Store) applySlowEnrichment(job slowJob) {
processes := enrichmentProcesses(report.Processes)
paths := enrichmentPaths(report.Enrichment)
updates := enrich.CollectSlow(processes, paths, provenance.PackageOwner)
updates.Integrity = enrich.IntegrityAnchors(s.Dir)
// All slow I/O has completed. Take the lock only to merge into the newest
// same-second report, so a concurrent alert capture never loses evidence.
@ -361,6 +362,9 @@ func mergeSlow(report *Report, updates enrich.SlowResult) {
}
}
}
if updates.Integrity != nil {
report.Enrichment["integrity"] = updates.Integrity
}
}
func nullToNil(value any) any {