feat: simplify assurance reports with progressive disclosure

This commit is contained in:
thanhnv
2026-07-29 11:55:49 +07:00
parent a7b1c604d5
commit 1d6384d23c
14 changed files with 431 additions and 123 deletions
@@ -139,6 +139,15 @@ class LocalReportTests(unittest.TestCase):
self.assertIn("<script>alert(1)</script>", html)
self.assertIn("Machine-auditable contract", html)
def test_h6_html_visualizes_outcomes_and_hides_raw_contract(self):
self.write_run()
report = REPORT.h6_report(self.root, run="trace-1")
html = REPORT.report_html(report, "h6")
self.assertIn("Run distribution", html)
self.assertIn('class="distribution"', html)
self.assertIn("<details><summary>Open JSON evidence</summary>", html)
self.assertNotIn("None</strong>", html)
def test_unsafe_trace_id_never_reads_outside_project(self):
report = REPORT.run_report(self.root, "../../etc/passwd")
self.assertEqual(report["verdict"], "not_found")