feat: simplify assurance reports with progressive disclosure
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user