Validate result views on real evidence and expose file-hash matches

This commit is contained in:
StasonJatham committed 2026-10-05 07:01:34 +02:00
1 parent 7ee77c3fc2
commit ff8dc9ee7a
4 files changed
+39

No files matched your search

+13
View File
@@ -47,3 +47,16 @@ class PresentationTests(unittest.TestCase):
(output / "findings.jsonl").write_text("")
present_results(output, {"status": "complete"})
self.assertIn("No matches does not prove", (output / "SUMMARY.txt").read_text())
def test_file_hash_hit_is_visible_without_an_event_match(self) -> None:
with tempfile.TemporaryDirectory() as temporary:
output = Path(temporary)
(output / "findings.jsonl").write_text("")
hits = [{"source": "sample.bin", "basis": "original file SHA-256"}]
(output / "file_hash_hits.json").write_text(json.dumps(hits))
present_results(output, {"status": "complete", "counts": {"file_hash_hits": 1}})
text = (output / "SUMMARY.txt").read_text()
self.assertIn("Events matching a rule or indicator: 0", text)
self.assertIn("Original-file SHA-256 indicator matches: 1", text)
self.assertIn("details/file_hash_hits.json", text)
self.assertEqual(json.loads((output / "details/file_hash_hits.json").read_text()), hits)