verify: add path traversal guard and 27 extended integrity tests
- _branch_refs: reject absolute paths and '..' components in branch param to prevent path traversal outside the heads directory - Add tests/test_verify_extended.py with 27 tests covering signature verification, merge commit BFS, ref security, TOCTOU, JSON schema completeness, and counter accuracy
sha256:33921957dbf17470e60760b6b0a43226f1fc92e02dfa950811ecf8dd6fd6ec63
sha
+73
~1
symbols
sha256:371186750fd84d86c792c645fb88f273cad6ab85d97238215777a09d8f2942f9
snapshot
+73
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes
74 symbols
+
test_c1_same_object_across_two_snapshots_counted_once
method
method test_c1_same_object_across_two_snapshots_counted_once L823–872
+
test_c2_signatures_checked_exact_count
method
method test_c2_signatures_checked_exact_count L874–889
+
test_c3_hash_mismatch_error_shows_both_ids
method
method test_c3_hash_mismatch_error_shows_both_ids L891–931
+
test_c4_commit_count_accurate_on_diamond_dag
method
method test_c4_commit_count_accurate_on_diamond_dag L933–968
+
test_t1_object_deleted_between_state_check_and_read
method
method test_t1_object_deleted_between_state_check_and_read L705–745
+
test_j2b_strict_true_when_flag_passed
method
method test_j2b_strict_true_when_flag_passed L772–777
+
test_j3_check_objects_present_in_all_branches
method
method test_j3_check_objects_present_in_all_branches L779–788
+
test_j4_all_documented_fields_present
method
method test_j4_all_documented_fields_present L790–804
+
test_j5_failures_list_empty_when_all_ok
method
method test_j5_failures_list_empty_when_all_ok L806–812
+
test_m1_merge_commit_both_parents_walked
method
method test_m1_merge_commit_both_parents_walked L517–555
+
test_m2_corrupt_object_in_second_parent_chain_detected
method
method test_m2_corrupt_object_in_second_parent_chain_detected L557–596
+
test_m3_missing_second_parent_commit_reported
method
method test_m3_missing_second_parent_commit_reported L598–629
+
test_p1_path_traversal_via_branch_param_does_not_escape
method
method test_p1_path_traversal_via_branch_param_does_not_escape L640–660
+
test_p2_absolute_path_branch_does_not_read_outside_repo
method
method test_p2_absolute_path_branch_does_not_read_outside_repo L662–680
+
test_p3_binary_ref_file_handled_gracefully
method
method test_p3_binary_ref_file_handled_gracefully L682–694
+
test_s10_signature_failure_error_names_agent
method
method test_s10_signature_failure_error_names_agent L444–475
+
test_s3_bit_flip_in_signature_bytes_detected
method
method test_s3_bit_flip_in_signature_bytes_detected L245–279
+
test_s4_unknown_signature_algorithm_reported
method
method test_s4_unknown_signature_algorithm_reported L281–312
+
test_s5_unknown_pubkey_algorithm_reported_as_key_missing
method
method test_s5_unknown_pubkey_algorithm_reported_as_key_missing L314–348
+
test_s6_malformed_pubkey_base64_causes_signature_failure
method
method test_s6_malformed_pubkey_base64_causes_signature_failure L350–384
+
test_s7_empty_signer_public_key_reported_as_key_missing
method
method test_s7_empty_signer_public_key_reported_as_key_missing L386–416
+
test_s9_mixed_chain_counts_only_signed
method
method test_s9_mixed_chain_counts_only_signed L429–442
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:33921957dbf17470e60760b6b0a43226f1fc92e02dfa950811ecf8dd6fd6ec63 --body "your comment"
No comments yet. Be the first to start the discussion.