veriker 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. veriker-0.1.0/LICENSE +202 -0
  2. veriker-0.1.0/PKG-INFO +335 -0
  3. veriker-0.1.0/README.md +315 -0
  4. veriker-0.1.0/audit_bundle/__init__.py +1 -0
  5. veriker-0.1.0/audit_bundle/_freeze.py +117 -0
  6. veriker-0.1.0/audit_bundle/admission.py +400 -0
  7. veriker-0.1.0/audit_bundle/append_only_floor.py +314 -0
  8. veriker-0.1.0/audit_bundle/bundle_manifest.py +1675 -0
  9. veriker-0.1.0/audit_bundle/causal_chain_coverage.py +256 -0
  10. veriker-0.1.0/audit_bundle/conservation.py +359 -0
  11. veriker-0.1.0/audit_bundle/contract_slots.json +17 -0
  12. veriker-0.1.0/audit_bundle/contract_slots.py +259 -0
  13. veriker-0.1.0/audit_bundle/coverage/__init__.py +1 -0
  14. veriker-0.1.0/audit_bundle/coverage/protocol.py +95 -0
  15. veriker-0.1.0/audit_bundle/coverage/sum_invariant_plugin.py +123 -0
  16. veriker-0.1.0/audit_bundle/cross_host_identity.py +44 -0
  17. veriker-0.1.0/audit_bundle/discharge/__init__.py +80 -0
  18. veriker-0.1.0/audit_bundle/discharge/context_substitution.py +301 -0
  19. veriker-0.1.0/audit_bundle/discharge/smtlib_parser.py +626 -0
  20. veriker-0.1.0/audit_bundle/discharge/verifier_signing.py +1289 -0
  21. veriker-0.1.0/audit_bundle/discharge/z3_runner.py +563 -0
  22. veriker-0.1.0/audit_bundle/dsse/__init__.py +46 -0
  23. veriker-0.1.0/audit_bundle/dsse/envelope.py +368 -0
  24. veriker-0.1.0/audit_bundle/dsse/header.py +341 -0
  25. veriker-0.1.0/audit_bundle/dsse/pae.py +244 -0
  26. veriker-0.1.0/audit_bundle/dsse/payload.py +100 -0
  27. veriker-0.1.0/audit_bundle/dsse/set_closure.py +352 -0
  28. veriker-0.1.0/audit_bundle/dsse/version_map.py +88 -0
  29. veriker-0.1.0/audit_bundle/effect_runtime/__init__.py +61 -0
  30. veriker-0.1.0/audit_bundle/effect_runtime/effect_binding.py +257 -0
  31. veriker-0.1.0/audit_bundle/effect_runtime/trace_attestation.py +473 -0
  32. veriker-0.1.0/audit_bundle/emitter/__init__.py +60 -0
  33. veriker-0.1.0/audit_bundle/emitter/hooks.py +158 -0
  34. veriker-0.1.0/audit_bundle/emitter/pipeline.py +490 -0
  35. veriker-0.1.0/audit_bundle/event_stream.py +138 -0
  36. veriker-0.1.0/audit_bundle/extensions/__init__.py +17 -0
  37. veriker-0.1.0/audit_bundle/extensions/_tuf_root/plugin_allowlist.json +97 -0
  38. veriker-0.1.0/audit_bundle/extensions/_tuf_root/revocation_root.json +58 -0
  39. veriker-0.1.0/audit_bundle/extensions/_tuf_root/root.json +93 -0
  40. veriker-0.1.0/audit_bundle/extensions/_tuf_root/sigstore_trust_root.json +43 -0
  41. veriker-0.1.0/audit_bundle/extensions/c14v3_rigor_profile.py +296 -0
  42. veriker-0.1.0/audit_bundle/extensions/c17_attested_serving.py +168 -0
  43. veriker-0.1.0/audit_bundle/extensions/c18_plugin_oci_loader.py +335 -0
  44. veriker-0.1.0/audit_bundle/extensions/c18_tuf_bootstrap.py +73 -0
  45. veriker-0.1.0/audit_bundle/extensions/c18_tuf_client.py +1093 -0
  46. veriker-0.1.0/audit_bundle/extensions/c18_verifier_identity.py +425 -0
  47. veriker-0.1.0/audit_bundle/extensions/c19/__init__.py +20 -0
  48. veriker-0.1.0/audit_bundle/extensions/c19/cross_host_peerreview.py +1621 -0
  49. veriker-0.1.0/audit_bundle/extensions/c19/layer_a_counter.py +2036 -0
  50. veriker-0.1.0/audit_bundle/extensions/c19/offline_root.py +374 -0
  51. veriker-0.1.0/audit_bundle/extensions/c19/pre_commit_log.py +253 -0
  52. veriker-0.1.0/audit_bundle/extensions/c19/profile_completeness_policy.py +470 -0
  53. veriker-0.1.0/audit_bundle/extensions/c19/tsa_roughtime_bls.py +1322 -0
  54. veriker-0.1.0/audit_bundle/extensions/c20_semantic_fidelity.py +48 -0
  55. veriker-0.1.0/audit_bundle/extensions/c9_1_append_only_files.py +626 -0
  56. veriker-0.1.0/audit_bundle/extensions/fulcio_identity.py +738 -0
  57. veriker-0.1.0/audit_bundle/extensions/rekor_anchor.py +645 -0
  58. veriker-0.1.0/audit_bundle/fragments/__init__.py +17 -0
  59. veriker-0.1.0/audit_bundle/fragments/attestable.py +110 -0
  60. veriker-0.1.0/audit_bundle/fragments/fragment_id.py +294 -0
  61. veriker-0.1.0/audit_bundle/fragments/sentence_segmenter.py +121 -0
  62. veriker-0.1.0/audit_bundle/gate/__init__.py +118 -0
  63. veriker-0.1.0/audit_bundle/gate/ed25519_verdict_signing.py +371 -0
  64. veriker-0.1.0/audit_bundle/gate/verdict_signing.py +527 -0
  65. veriker-0.1.0/audit_bundle/git_blob_resolver.py +71 -0
  66. veriker-0.1.0/audit_bundle/integrity_ownership.py +470 -0
  67. veriker-0.1.0/audit_bundle/manifest_three_set.py +164 -0
  68. veriker-0.1.0/audit_bundle/output_modes/__init__.py +105 -0
  69. veriker-0.1.0/audit_bundle/output_modes/dispatch.py +120 -0
  70. veriker-0.1.0/audit_bundle/output_modes/es_pipeline.py +144 -0
  71. veriker-0.1.0/audit_bundle/output_modes/mode.py +83 -0
  72. veriker-0.1.0/audit_bundle/output_modes/ve_pipeline.py +133 -0
  73. veriker-0.1.0/audit_bundle/plugin.py +212 -0
  74. veriker-0.1.0/audit_bundle/plugins/__init__.py +140 -0
  75. veriker-0.1.0/audit_bundle/plugins/dispatch_record_wellformed.py +713 -0
  76. veriker-0.1.0/audit_bundle/plugins/falsification_negative_test.py +368 -0
  77. veriker-0.1.0/audit_bundle/plugins/file_integrity_many_small.py +155 -0
  78. veriker-0.1.0/audit_bundle/plugins/fragment_attestation.py +361 -0
  79. veriker-0.1.0/audit_bundle/plugins/monotone_growth.py +152 -0
  80. veriker-0.1.0/audit_bundle/plugins/pass3_conservation_shim.py +109 -0
  81. veriker-0.1.0/audit_bundle/plugins/re_derivation_invocation.py +131 -0
  82. veriker-0.1.0/audit_bundle/plugins/reference/AIGovReDerivationCheck.py +82 -0
  83. veriker-0.1.0/audit_bundle/plugins/reference/ControlReDerivationCheck.py +88 -0
  84. veriker-0.1.0/audit_bundle/plugins/reference/SensorReDerivationCheck.py +89 -0
  85. veriker-0.1.0/audit_bundle/plugins/reference/SpanReDerivationCheck.py +93 -0
  86. veriker-0.1.0/audit_bundle/plugins/reference/__init__.py +13 -0
  87. veriker-0.1.0/audit_bundle/plugins/reference/aigov_rederivation.py +498 -0
  88. veriker-0.1.0/audit_bundle/plugins/reference/control_rederivation.py +485 -0
  89. veriker-0.1.0/audit_bundle/plugins/reference/energy_score_pack.py +387 -0
  90. veriker-0.1.0/audit_bundle/plugins/reference/span_re_derivation.py +265 -0
  91. veriker-0.1.0/audit_bundle/plugins/refinement_discharge.py +1068 -0
  92. veriker-0.1.0/audit_bundle/plugins/source_attributes_consistency.py +195 -0
  93. veriker-0.1.0/audit_bundle/plugins/spec_sha_pin.py +103 -0
  94. veriker-0.1.0/audit_bundle/plugins/stamp_lattice.py +833 -0
  95. veriker-0.1.0/audit_bundle/plugins/three_set_sum_invariant.py +176 -0
  96. veriker-0.1.0/audit_bundle/plugins/verifier_identity_tripwire.py +181 -0
  97. veriker-0.1.0/audit_bundle/rederivation/__init__.py +16 -0
  98. veriker-0.1.0/audit_bundle/rederivation/comparators.py +361 -0
  99. veriker-0.1.0/audit_bundle/rederivation/dispatch.py +453 -0
  100. veriker-0.1.0/audit_bundle/rederivation/primitives/__init__.py +63 -0
  101. veriker-0.1.0/audit_bundle/rederivation/primitives/_safepath.py +45 -0
  102. veriker-0.1.0/audit_bundle/rederivation/primitives/anticheat_adjudication.py +213 -0
  103. veriker-0.1.0/audit_bundle/rederivation/primitives/audio.py +179 -0
  104. veriker-0.1.0/audit_bundle/rederivation/primitives/auto_ubi.py +243 -0
  105. veriker-0.1.0/audit_bundle/rederivation/primitives/bom.py +211 -0
  106. veriker-0.1.0/audit_bundle/rederivation/primitives/build.py +198 -0
  107. veriker-0.1.0/audit_bundle/rederivation/primitives/build_real_compiler.py +193 -0
  108. veriker-0.1.0/audit_bundle/rederivation/primitives/climate_emission.py +58 -0
  109. veriker-0.1.0/audit_bundle/rederivation/primitives/dp.py +179 -0
  110. veriker-0.1.0/audit_bundle/rederivation/primitives/event_log_replay.py +216 -0
  111. veriker-0.1.0/audit_bundle/rederivation/primitives/fea_vonmises.py +181 -0
  112. veriker-0.1.0/audit_bundle/rederivation/primitives/fintech_audit.py +231 -0
  113. veriker-0.1.0/audit_bundle/rederivation/primitives/fp_ml.py +130 -0
  114. veriker-0.1.0/audit_bundle/rederivation/primitives/healthcare_diagnosis.py +179 -0
  115. veriker-0.1.0/audit_bundle/rederivation/primitives/kg.py +157 -0
  116. veriker-0.1.0/audit_bundle/rederivation/primitives/ml.py +200 -0
  117. veriker-0.1.0/audit_bundle/rederivation/primitives/prior_auth.py +229 -0
  118. veriker-0.1.0/audit_bundle/rederivation/primitives/raster.py +235 -0
  119. veriker-0.1.0/audit_bundle/rederivation/primitives/scrabble.py +195 -0
  120. veriker-0.1.0/audit_bundle/rederivation/primitives/spectra_span.py +64 -0
  121. veriker-0.1.0/audit_bundle/rederivation/primitives/streaming.py +204 -0
  122. veriker-0.1.0/audit_bundle/rederivation/primitives/tabular.py +183 -0
  123. veriker-0.1.0/audit_bundle/rederivation/registry.py +61 -0
  124. veriker-0.1.0/audit_bundle/rederivation/spec_binding.py +301 -0
  125. veriker-0.1.0/audit_bundle/retrieval/__init__.py +19 -0
  126. veriker-0.1.0/audit_bundle/retrieval/capture.py +232 -0
  127. veriker-0.1.0/audit_bundle/retrieval/three_set.py +126 -0
  128. veriker-0.1.0/audit_bundle/retrieval/trace.py +238 -0
  129. veriker-0.1.0/audit_bundle/revocation.py +510 -0
  130. veriker-0.1.0/audit_bundle/snapshot.py +329 -0
  131. veriker-0.1.0/audit_bundle/snapshots/__init__.py +16 -0
  132. veriker-0.1.0/audit_bundle/snapshots/cid.py +113 -0
  133. veriker-0.1.0/audit_bundle/snapshots/ingest_record.py +74 -0
  134. veriker-0.1.0/audit_bundle/snapshots/snapshot_policy.py +64 -0
  135. veriker-0.1.0/audit_bundle/snapshots/snapshot_store.py +112 -0
  136. veriker-0.1.0/audit_bundle/source_registry/__init__.py +73 -0
  137. veriker-0.1.0/audit_bundle/source_registry/allow_list_v0.json +18 -0
  138. veriker-0.1.0/audit_bundle/source_registry/decision_provenance.py +135 -0
  139. veriker-0.1.0/audit_bundle/source_registry/issuer_verifier.py +128 -0
  140. veriker-0.1.0/audit_bundle/source_registry/properties.py +129 -0
  141. veriker-0.1.0/audit_bundle/source_registry/signature_verifier.py +119 -0
  142. veriker-0.1.0/audit_bundle/stamp_claims.py +88 -0
  143. veriker-0.1.0/audit_bundle/verdict.py +377 -0
  144. veriker-0.1.0/audit_bundle/verifier.py +2435 -0
  145. veriker-0.1.0/audit_bundle/vkernel_key_loader.py +287 -0
  146. veriker-0.1.0/pyproject.toml +90 -0
  147. veriker-0.1.0/setup.cfg +4 -0
  148. veriker-0.1.0/tests/test_action_gate_verdict_signing.py +516 -0
  149. veriker-0.1.0/tests/test_admit_json_file.py +108 -0
  150. veriker-0.1.0/tests/test_agritech_sensor_spec_pinned.py +134 -0
  151. veriker-0.1.0/tests/test_aml_txn_monitoring_minimal.py +263 -0
  152. veriker-0.1.0/tests/test_aml_txn_monitoring_spec_pinned.py +161 -0
  153. veriker-0.1.0/tests/test_anticheat_adjudication_minimal.py +292 -0
  154. veriker-0.1.0/tests/test_anticheat_adjudication_spec_pinned.py +143 -0
  155. veriker-0.1.0/tests/test_append_only_floor.py +394 -0
  156. veriker-0.1.0/tests/test_applies_to_files_exact_path_lint.py +164 -0
  157. veriker-0.1.0/tests/test_assurance_profile_guard.py +385 -0
  158. veriker-0.1.0/tests/test_audio_minimal.py +139 -0
  159. veriker-0.1.0/tests/test_audio_spec_pinned.py +149 -0
  160. veriker-0.1.0/tests/test_auto_ubi_minimal.py +250 -0
  161. veriker-0.1.0/tests/test_auto_ubi_spec_pinned.py +154 -0
  162. veriker-0.1.0/tests/test_bom_minimal.py +96 -0
  163. veriker-0.1.0/tests/test_bom_spec_pinned.py +149 -0
  164. veriker-0.1.0/tests/test_broad_except_tuple_lint.py +161 -0
  165. veriker-0.1.0/tests/test_build_minimal.py +133 -0
  166. veriker-0.1.0/tests/test_build_real_compiler_minimal.py +179 -0
  167. veriker-0.1.0/tests/test_build_real_compiler_spec_pinned.py +201 -0
  168. veriker-0.1.0/tests/test_build_spec_pinned.py +143 -0
  169. veriker-0.1.0/tests/test_bundle_exec_gate_structural.py +232 -0
  170. veriker-0.1.0/tests/test_bundle_json_admission_ratchet.py +173 -0
  171. veriker-0.1.0/tests/test_bundle_manifest.py +259 -0
  172. veriker-0.1.0/tests/test_c19c_tsa_roughtime_bls.py +1457 -0
  173. veriker-0.1.0/tests/test_c9_1_append_only_files.py +868 -0
  174. veriker-0.1.0/tests/test_causal_chain_coverage.py +213 -0
  175. veriker-0.1.0/tests/test_chat_log_redaction_minimal.py +220 -0
  176. veriker-0.1.0/tests/test_chat_log_redaction_spec_pinned.py +155 -0
  177. veriker-0.1.0/tests/test_cli_library_verdict_divergence.py +341 -0
  178. veriker-0.1.0/tests/test_climate_emission_minimal.py +184 -0
  179. veriker-0.1.0/tests/test_climate_emission_spec_pinned.py +150 -0
  180. veriker-0.1.0/tests/test_climate_multi_output_spec_pinned.py +105 -0
  181. veriker-0.1.0/tests/test_combi_screen_minimal.py +220 -0
  182. veriker-0.1.0/tests/test_combi_screen_spec_pinned.py +158 -0
  183. veriker-0.1.0/tests/test_comparator_numeric_model.py +87 -0
  184. veriker-0.1.0/tests/test_conservation_gate.py +483 -0
  185. veriker-0.1.0/tests/test_content_provenance_minimal.py +308 -0
  186. veriker-0.1.0/tests/test_content_provenance_spec_pinned.py +134 -0
  187. veriker-0.1.0/tests/test_contract_slots.py +255 -0
  188. veriker-0.1.0/tests/test_coverage.py +902 -0
  189. veriker-0.1.0/tests/test_credit_scoring_minimal.py +228 -0
  190. veriker-0.1.0/tests/test_credit_scoring_spec_pinned.py +141 -0
  191. veriker-0.1.0/tests/test_cross_host_edge_coverage.py +128 -0
  192. veriker-0.1.0/tests/test_dc_emissions_mrv_minimal.py +273 -0
  193. veriker-0.1.0/tests/test_dc_emissions_mrv_spec_pinned.py +131 -0
  194. veriker-0.1.0/tests/test_decider_contract_hardening.py +93 -0
  195. veriker-0.1.0/tests/test_dispatch_claimed_value_admission.py +191 -0
  196. veriker-0.1.0/tests/test_dispatch_comparator_fail_closed.py +121 -0
  197. veriker-0.1.0/tests/test_dispatch_exhaustiveness_ratchet.py +268 -0
  198. veriker-0.1.0/tests/test_dispatch_nonfinite_value_fail_closed.py +161 -0
  199. veriker-0.1.0/tests/test_dispatch_output_id_safety.py +168 -0
  200. veriker-0.1.0/tests/test_dp_minimal.py +110 -0
  201. veriker-0.1.0/tests/test_dp_spec_pinned.py +137 -0
  202. veriker-0.1.0/tests/test_dsse_cutover_classifier.py +116 -0
  203. veriker-0.1.0/tests/test_dsse_d3_bypass_lint.py +234 -0
  204. veriker-0.1.0/tests/test_dsse_envelope.py +380 -0
  205. veriker-0.1.0/tests/test_dsse_offline_tool.py +296 -0
  206. veriker-0.1.0/tests/test_dsse_pae_golden.py +408 -0
  207. veriker-0.1.0/tests/test_dsse_payload_shape.py +281 -0
  208. veriker-0.1.0/tests/test_dsse_revocation.py +555 -0
  209. veriker-0.1.0/tests/test_dsse_seal_oss_boundary.py +127 -0
  210. veriker-0.1.0/tests/test_dsse_sealer.py +292 -0
  211. veriker-0.1.0/tests/test_dsse_set_closure.py +338 -0
  212. veriker-0.1.0/tests/test_dsse_single_snapshot.py +210 -0
  213. veriker-0.1.0/tests/test_ed25519_verdict_signing.py +294 -0
  214. veriker-0.1.0/tests/test_emitter_sdk.py +315 -0
  215. veriker-0.1.0/tests/test_event_stream.py +238 -0
  216. veriker-0.1.0/tests/test_extension_receipt_exit_code.py +94 -0
  217. veriker-0.1.0/tests/test_extension_receipt_registry.py +248 -0
  218. veriker-0.1.0/tests/test_fintech_audit_spec_pinned.py +148 -0
  219. veriker-0.1.0/tests/test_fp_ml_minimal.py +201 -0
  220. veriker-0.1.0/tests/test_fp_ml_spec_pinned.py +129 -0
  221. veriker-0.1.0/tests/test_fragment_anchor_coverage.py +166 -0
  222. veriker-0.1.0/tests/test_fragment_attestation.py +380 -0
  223. veriker-0.1.0/tests/test_fragments.py +331 -0
  224. veriker-0.1.0/tests/test_frozen_field_ratchet.py +275 -0
  225. veriker-0.1.0/tests/test_fulcio_native.py +572 -0
  226. veriker-0.1.0/tests/test_gate_verdict_signing.py +115 -0
  227. veriker-0.1.0/tests/test_git_blob_resolver.py +146 -0
  228. veriker-0.1.0/tests/test_healthcare_diagnosis_minimal.py +256 -0
  229. veriker-0.1.0/tests/test_healthcare_diagnosis_spec_pinned.py +154 -0
  230. veriker-0.1.0/tests/test_hkdf_rfc5869_vectors.py +233 -0
  231. veriker-0.1.0/tests/test_hyperframes_render_minimal.py +177 -0
  232. veriker-0.1.0/tests/test_integration_c14_c15_c16.py +448 -0
  233. veriker-0.1.0/tests/test_integrity_ownership.py +338 -0
  234. veriker-0.1.0/tests/test_kg_minimal.py +182 -0
  235. veriker-0.1.0/tests/test_kg_spec_pinned.py +143 -0
  236. veriker-0.1.0/tests/test_layer_a_event_obligation_coverage.py +354 -0
  237. veriker-0.1.0/tests/test_legacy_bundle_compat.py +159 -0
  238. veriker-0.1.0/tests/test_legal_contract_minimal.py +184 -0
  239. veriker-0.1.0/tests/test_legal_contract_spec_pinned.py +157 -0
  240. veriker-0.1.0/tests/test_lifesci_binding_spec_pinned.py +132 -0
  241. veriker-0.1.0/tests/test_load_manifest_v0_3_propagation.py +393 -0
  242. veriker-0.1.0/tests/test_m8_crash_not_reject.py +202 -0
  243. veriker-0.1.0/tests/test_m9_selfcheck_verifier_parity.py +158 -0
  244. veriker-0.1.0/tests/test_manifest_deep_immutability.py +256 -0
  245. veriker-0.1.0/tests/test_manifest_field_disposition_ratchet.py +188 -0
  246. veriker-0.1.0/tests/test_manifest_field_shape_ratchet.py +184 -0
  247. veriker-0.1.0/tests/test_ml_minimal.py +127 -0
  248. veriker-0.1.0/tests/test_ml_spec_pinned.py +172 -0
  249. veriker-0.1.0/tests/test_oss_dangling_module_refs.py +140 -0
  250. veriker-0.1.0/tests/test_output_modes.py +456 -0
  251. veriker-0.1.0/tests/test_pandemic_benefit_eligibility_minimal.py +230 -0
  252. veriker-0.1.0/tests/test_pandemic_benefit_eligibility_spec_pinned.py +145 -0
  253. veriker-0.1.0/tests/test_pass3_shim_no_fs_lint.py +193 -0
  254. veriker-0.1.0/tests/test_path_containment_sweep.py +117 -0
  255. veriker-0.1.0/tests/test_pe_engineering_signoff_minimal.py +331 -0
  256. veriker-0.1.0/tests/test_pe_engineering_signoff_spec_pinned.py +151 -0
  257. veriker-0.1.0/tests/test_pharmacophore_fit_minimal.py +215 -0
  258. veriker-0.1.0/tests/test_pii_redaction_minimal.py +238 -0
  259. veriker-0.1.0/tests/test_pii_redaction_spec_pinned.py +157 -0
  260. veriker-0.1.0/tests/test_plugin_contract.py +229 -0
  261. veriker-0.1.0/tests/test_plugin_disclosures.py +141 -0
  262. veriker-0.1.0/tests/test_plugin_fail_closed_sweep.py +412 -0
  263. veriker-0.1.0/tests/test_plugin_path_safety.py +280 -0
  264. veriker-0.1.0/tests/test_primitive_path_containment.py +170 -0
  265. veriker-0.1.0/tests/test_prior_auth_minimal.py +291 -0
  266. veriker-0.1.0/tests/test_prior_auth_spec_pinned.py +153 -0
  267. veriker-0.1.0/tests/test_provenance_upgrade_minimal.py +99 -0
  268. veriker-0.1.0/tests/test_raster_minimal.py +152 -0
  269. veriker-0.1.0/tests/test_raster_spec_pinned.py +154 -0
  270. veriker-0.1.0/tests/test_recipe_anticheat_adjudication_promoted.py +297 -0
  271. veriker-0.1.0/tests/test_recipe_audio_promoted.py +151 -0
  272. veriker-0.1.0/tests/test_recipe_auto_ubi_promoted.py +418 -0
  273. veriker-0.1.0/tests/test_recipe_bom_promoted.py +181 -0
  274. veriker-0.1.0/tests/test_recipe_build_promoted.py +219 -0
  275. veriker-0.1.0/tests/test_recipe_build_real_compiler_promoted.py +146 -0
  276. veriker-0.1.0/tests/test_recipe_dp_promoted.py +262 -0
  277. veriker-0.1.0/tests/test_recipe_fintech_audit_promoted.py +229 -0
  278. veriker-0.1.0/tests/test_recipe_fp_ml_promoted.py +153 -0
  279. veriker-0.1.0/tests/test_recipe_healthcare_diagnosis_promoted.py +334 -0
  280. veriker-0.1.0/tests/test_recipe_kg_promoted.py +184 -0
  281. veriker-0.1.0/tests/test_recipe_ml_promoted.py +210 -0
  282. veriker-0.1.0/tests/test_recipe_prior_auth_promoted.py +295 -0
  283. veriker-0.1.0/tests/test_recipe_producer_verifier_disjoint.py +141 -0
  284. veriker-0.1.0/tests/test_recipe_raster_promoted.py +191 -0
  285. veriker-0.1.0/tests/test_recipe_scrabble_promoted.py +235 -0
  286. veriker-0.1.0/tests/test_recipe_streaming_promoted.py +179 -0
  287. veriker-0.1.0/tests/test_recipe_tabular_promoted.py +160 -0
  288. veriker-0.1.0/tests/test_rederivation_pack_core_guard.py +300 -0
  289. veriker-0.1.0/tests/test_rederivation_pack_exogenous_key.py +172 -0
  290. veriker-0.1.0/tests/test_redteam_b1_commitment_preimage_advisory.py +51 -0
  291. veriker-0.1.0/tests/test_reference_plugins.py +829 -0
  292. veriker-0.1.0/tests/test_refinement_discharge.py +243 -0
  293. veriker-0.1.0/tests/test_rekor_anchor.py +575 -0
  294. veriker-0.1.0/tests/test_retrieval_trace.py +641 -0
  295. veriker-0.1.0/tests/test_schema_reserved_blocks_v03.py +365 -0
  296. veriker-0.1.0/tests/test_schema_version_allowlist.py +135 -0
  297. veriker-0.1.0/tests/test_scrabble_minimal.py +233 -0
  298. veriker-0.1.0/tests/test_scrabble_spec_pinned.py +153 -0
  299. veriker-0.1.0/tests/test_sealed_snapshot.py +307 -0
  300. veriker-0.1.0/tests/test_secops_alert_spec_pinned.py +133 -0
  301. veriker-0.1.0/tests/test_signing_strict_operands.py +268 -0
  302. veriker-0.1.0/tests/test_snapshots.py +242 -0
  303. veriker-0.1.0/tests/test_source_attributes_guard.py +315 -0
  304. veriker-0.1.0/tests/test_source_registry.py +493 -0
  305. veriker-0.1.0/tests/test_spec_git_fallback_disclosure.py +332 -0
  306. veriker-0.1.0/tests/test_spec_pinned_units.py +254 -0
  307. veriker-0.1.0/tests/test_stamp_claims_coverage_guard.py +273 -0
  308. veriker-0.1.0/tests/test_stamp_lattice.py +243 -0
  309. veriker-0.1.0/tests/test_stamp_lattice_multirow.py +1814 -0
  310. veriker-0.1.0/tests/test_stdlib_import_boundary.py +301 -0
  311. veriker-0.1.0/tests/test_streaming_minimal.py +167 -0
  312. veriker-0.1.0/tests/test_streaming_spec_pinned.py +151 -0
  313. veriker-0.1.0/tests/test_synthetic_c18_marker_gate.py +140 -0
  314. veriker-0.1.0/tests/test_tabular_minimal.py +142 -0
  315. veriker-0.1.0/tests/test_tabular_spec_pinned.py +145 -0
  316. veriker-0.1.0/tests/test_three_set_manifest.py +482 -0
  317. veriker-0.1.0/tests/test_totalsegmentator_minimal.py +201 -0
  318. veriker-0.1.0/tests/test_unsafe_pack_execution_gate.py +210 -0
  319. veriker-0.1.0/tests/test_validate_manifest_verify_parity.py +336 -0
  320. veriker-0.1.0/tests/test_verdict_contract.py +463 -0
  321. veriker-0.1.0/tests/test_verdict_out_artifact.py +182 -0
  322. veriker-0.1.0/tests/test_verifier.py +376 -0
  323. veriker-0.1.0/tests/test_verifier_recheck_key_source.py +120 -0
  324. veriker-0.1.0/tests/test_verifier_spec_offline_path_safety.py +134 -0
  325. veriker-0.1.0/tests/test_verify_readonly_ratchet.py +190 -0
  326. veriker-0.1.0/tests/test_wycheproof_ed25519.py +368 -0
  327. veriker-0.1.0/veriker/__init__.py +29 -0
  328. veriker-0.1.0/veriker/__main__.py +8 -0
  329. veriker-0.1.0/veriker/cli/__init__.py +1 -0
  330. veriker-0.1.0/veriker/cli/host_digest_verify.py +451 -0
  331. veriker-0.1.0/veriker/cli/verify.py +1252 -0
  332. veriker-0.1.0/veriker.egg-info/PKG-INFO +335 -0
  333. veriker-0.1.0/veriker.egg-info/SOURCES.txt +335 -0
  334. veriker-0.1.0/veriker.egg-info/dependency_links.txt +1 -0
  335. veriker-0.1.0/veriker.egg-info/entry_points.txt +2 -0
  336. veriker-0.1.0/veriker.egg-info/requires.txt +11 -0
  337. veriker-0.1.0/veriker.egg-info/top_level.txt +2 -0
veriker-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
veriker-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,335 @@
1
+ Metadata-Version: 2.4
2
+ Name: veriker
3
+ Version: 0.1.0
4
+ Summary: Veriker β€” re-derivable verification of attested artifacts: recompute the answer, don't trust the claim (open tier).
5
+ License: Apache-2.0
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: cryptography>=42
10
+ Requires-Dist: rfc8785>=0.1.4
11
+ Requires-Dist: tuf<8,>=6.0
12
+ Requires-Dist: py_ecc>=7
13
+ Requires-Dist: cbor2>=5.6
14
+ Provides-Extra: dev
15
+ Requires-Dist: pytest>=8; extra == "dev"
16
+ Requires-Dist: hypothesis>=6; extra == "dev"
17
+ Requires-Dist: pycose>=1.1; extra == "dev"
18
+ Requires-Dist: z3-solver>=4.12; extra == "dev"
19
+ Dynamic: license-file
20
+
21
+ <div align="center">
22
+
23
+ # Veriker
24
+
25
+ **Recompute the answer β€” don't trust the claim.**
26
+
27
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
28
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
29
+ [![Verify](https://img.shields.io/badge/verify-offline_Β·_stdlib--only-success.svg)](#-how-it-works)
30
+ [![Verdict](https://img.shields.io/badge/verdict-OK_Β·_REJECT_Β·_ERROR-informational.svg)](#-the-verdict-ok--reject--error)
31
+
32
+ **[Quick start](#-quick-start)** Β· **[How it works](#-how-it-works)** Β· **[The verdict](#-the-verdict-ok--reject--error)** Β· **[Producing bundles](#-producing-bundles--the-emitter-sdk)** Β· **[Scope and honesty](#-scope-and-honesty)**
33
+
34
+ A composable, domain-agnostic verifier for **re-derivable, attested artifacts**.
35
+ You hand it a self-contained *audit bundle* β€” a manifest, the input snapshots, and
36
+ a re-derivation rule β€” and it **independently recomputes the declared output and
37
+ checks it against what was committed**, returning a structured verdict made of many
38
+ small checks instead of one opaque pass/fail.
39
+
40
+ </div>
41
+
42
+ ---
43
+
44
+ ```console
45
+ $ python examples/citation_integrity_minimal/build_bundle.py --out-dir /tmp/citation_bundle
46
+ $ python -m veriker.cli.verify --bundle-dir /tmp/citation_bundle
47
+ PASS file_integrity
48
+ PASS spec_sha_pinning
49
+ PASS cross_refs
50
+ PASS plugin:spec_sha_pin
51
+ PASS plugin:file_integrity_many_small
52
+ PASS plugin:fragment_attestation
53
+ PASS plugin:coverage_sum_invariant
54
+ PASS plugin:source_attributes_consistency
55
+ PASS plugin:three_set_sum_invariant
56
+ PASS plugin:dispatch_record_wellformed
57
+ PASS plugin:stamp_lattice
58
+ PASS plugin:refinement_discharge
59
+
60
+ PASS (12 check(s) passed)
61
+ $ echo $?
62
+ 0
63
+
64
+ $ echo ' (tampered)' >> /tmp/citation_bundle/snapshots/src-welfare-001.txt # one byte moves
65
+
66
+ $ python -m veriker.cli.verify --bundle-dir /tmp/citation_bundle
67
+ FAIL file_integrity [bad_file_sha] 'snapshots/src-welfare-001.txt':
68
+ manifest_sha='89b92b23…' computed_sha='48fa2a73…'
69
+ …
70
+ FAIL (3 failures across 12 check(s))
71
+ $ echo $?
72
+ 1
73
+ ```
74
+
75
+ > Real output from the **citation-integrity** pilot (long digests elided for width).
76
+ > The source a citation claims to quote changed by one byte β€” two independent
77
+ > integrity checks catch it, the verdict is `REJECT`, exit `1`. A verdict is
78
+ > **recomputed, never asserted**: each line is a property the verifier re-derived
79
+ > itself, and a cited source can never silently drift from the answer that stands
80
+ > on it.
81
+
82
+ ---
83
+
84
+ ## πŸ’‘ Concept
85
+
86
+ > [!NOTE]
87
+ > **A hash proves bytes didn't change. It does not prove the answer.** An output is
88
+ > only trustworthy if it is the correct result of running a *declared* computation
89
+ > over *declared* inputs β€” and a checksum tells you nothing when something drifts.
90
+ > An audit bundle commits *the inputs, the rule, and the claimed output*; this
91
+ > verifier **re-derives the output and compares**, offline, with nothing but the
92
+ > bundle directory.
93
+
94
+ Tampering with an input, swapping the rule, or shipping a weaker specification all
95
+ **fail closed** β€” and the verifier distinguishes "the artifact is bad" from "I
96
+ couldn't conclude," so a green result can never be faked by crashing the checker.
97
+
98
+ This is the **open tier** (Apache-2.0): the verifier, the bundle format, the
99
+ substrate, the producer SDK, and a set of generic domain pilots. It stands
100
+ alone β€” it imports no closed-tier code, and the core verify path needs **no
101
+ network and no third-party packages** at audit time (stdlib only).
102
+
103
+ ---
104
+
105
+ ## ✨ Features
106
+
107
+ | | |
108
+ |---|---|
109
+ | πŸ” **Recompute, don't attest** | When a bundle declares outputs, the verifier re-derives the representative output with a **verifier-side primitive** and compares it to the committed value under a pinned comparator (`exact`, `scalar_epsilon`, `set`, `text_normalized`, `structured`). |
110
+ | 🧾 **Self-contained bundles** | A bundle is a directory β€” manifest + SHA-pinned specs + input snapshots + claimed outputs. The verifier reads **no outside state**. |
111
+ | 🚦 **Tri-state verdict** | `OK` (0) / `REJECT` (1) / `ERROR` (2). "The artifact is bad" is never conflated with "the verifier couldn't conclude" β€” and neither is ever silently an `OK`. |
112
+ | πŸ”¬ **Localized failures** | Every property is its own check with its own reason β€” a failure points at exactly what broke, not at one opaque boolean. |
113
+ | 🐍 **Offline, stdlib-only verify** | The core verify path makes no network calls and imports no third-party packages at audit time. |
114
+ | πŸ”’ **Untrusted-bundle posture** | The core path **never executes bundle-supplied code**. Running a bundle's own re-derivation pack is an explicit, flagged opt-in for trusted hosts only. |
115
+ | 🧰 **Producer SDK** | `audit_bundle.emitter` assembles verifier-conformant bundles (canonical, sorted, digest-matched manifests) with pluggable timestamp / causal-chain / attestation seams. |
116
+ | πŸ§ͺ **Pilot gallery** | Self-contained example domains β€” text extraction, sensor fusion, lockfile resolution, graph traversal, deterministic builds, tabular SQL aggregates, ML inference, streaming windows, and more β€” each with its own tests. |
117
+
118
+ ---
119
+
120
+ ## πŸš€ Quick start
121
+
122
+ ```bash
123
+ python -m venv .venv && . .venv/bin/activate
124
+ pip install -e ".[dev]" # Python β‰₯ 3.11
125
+ ```
126
+
127
+ Build a pilot β€” here, a **citation-integrity** bundle that proves an AI/RAG
128
+ answer actually quotes its cited sources (no LLM in the loop: the verifier
129
+ re-derives every cited span from the frozen source snapshots and checks each
130
+ quote against its source under a deterministic, versioned text normalization β€”
131
+ case-, whitespace-, and punctuation-insensitive, not byte-exact) β€” and verify
132
+ it:
133
+
134
+ ```bash
135
+ python examples/citation_integrity_minimal/build_bundle.py --out-dir /tmp/citation_bundle
136
+ python -m veriker.cli.verify --bundle-dir /tmp/citation_bundle # exit 0, 12 checks PASS
137
+ ```
138
+
139
+ Then tamper with any committed snapshot and re-run `verify` β€” it fails closed
140
+ with exit `1`, as in the demo above.
141
+
142
+ <details>
143
+ <summary><b>More pilots, more shapes</b> β€” every <code>examples/</code> entry is one computation shape</summary>
144
+
145
+ Each pilot under `examples/` is a self-contained bundle builder plus its own
146
+ `tests/`, demonstrating one computation shape end-to-end: text extraction,
147
+ sensor fusion, lockfile resolution, graph traversal, seed-pinned release,
148
+ deterministic build & compilation, raster aggregation, tabular SQL aggregates,
149
+ integer- and float-ML inference, audio segmentation, event-time streaming
150
+ windows, and more. Each pilot's README states the exact property it
151
+ demonstrates β€” and the explicit limits of that claim.
152
+
153
+ ```bash
154
+ ls examples/
155
+ python examples/<name>/build_bundle.py --help
156
+ ```
157
+
158
+ </details>
159
+
160
+ ---
161
+
162
+ ## πŸ” How it works
163
+
164
+ A **bundle** is a directory the verifier can read with no outside state:
165
+
166
+ ```
167
+ bundle/
168
+ β”œβ”€β”€ manifest.json # files + SHA-256 digests, spec pins, declared outputs, typed checks
169
+ β”œβ”€β”€ spec/ # the SHA-pinned specification(s) the manifest commits to
170
+ β”œβ”€β”€ <inputs>/ # the committed input snapshots (corpus, lockfile, traces, …)
171
+ └── outputs/ # the claimed output value(s) the verifier will re-derive and compare
172
+ ```
173
+
174
+ The verifier runs **built-in steps** (file integrity, spec-SHA pinning,
175
+ cross-references) plus a set of **typed-check plugins**, and β€” when the bundle
176
+ declares outputs β€” **re-derivation dispatch**: it recomputes the representative
177
+ output with a verifier-side primitive and compares it to the committed value under
178
+ a pinned comparator (`exact`, `scalar_epsilon`, `set`, `text_normalized`,
179
+ `structured`). Every check is reported on its own line so a failure points at
180
+ exactly which property broke.
181
+
182
+ **How is this different from a checksum?** A checksum answers "are these the same
183
+ bytes?" This answers "is this output the deterministic result of *this* rule over
184
+ *these* inputs, and does every committed invariant still hold?" β€” and it localizes
185
+ the answer to individual checks.
186
+
187
+ ---
188
+
189
+ ## 🚦 The verdict: OK / REJECT / ERROR
190
+
191
+ The verifier is **tri-state**, and the distinction is load-bearing:
192
+
193
+ | Verdict | Exit | Meaning |
194
+ |----------|:----:|---------|
195
+ | `OK` | `0` | every gating check passed. |
196
+ | `REJECT` | `1` | the *artifact* failed a check β€” tampering, drift, a forged field. |
197
+ | `ERROR` | `2` | the *verifier* could not conclude β€” e.g. a bundle **claims** a re-derivation but the pack was not executed, or an external dependency is absent. **Never silently an `OK`.** |
198
+
199
+ There is no `ERROR β†’ retry β†’ accept` path: both `REJECT` and `ERROR` are non-zero
200
+ (not certified). New automation can split "artifact is bad" (`1`) from "verifier
201
+ couldn't conclude / file a bug" (`2`); old scripts keying on `exit != 0` stay
202
+ correct. `REJECT` is about the input; `ERROR` is about the verifier β€” so a
203
+ crafted verifier-crashing input can't be laundered into a fake `REJECT`.
204
+
205
+ Automation that wants more than the exit code can pass
206
+ `--verdict-out verdict.json`: the verifier writes the full verdict face as JSON
207
+ on **every** exit path β€” state and exit code, machine-stable reason codes, which
208
+ validation layers ran, honest disclosures a green verdict still carries, and the
209
+ SHA-256 of the manifest it judged. It is an **unsigned operational artifact**
210
+ (the file says so in its `note` field): trust comes from deterministically
211
+ re-running the verifier on the bundle, never from the file itself.
212
+
213
+ > [!WARNING]
214
+ > **Untrusted bundles:** the core path never executes bundle-supplied code.
215
+ > Running a bundle's own `re_derive/*_pack.py` is arbitrary local code execution
216
+ > and is gated behind `--unsafe-run-bundle-pack` (trusted/disposable hosts only).
217
+ > The safe alternative β€” spec-pinned dispatch β€” runs re-derivation with
218
+ > verifier-side primitives and is described below.
219
+
220
+ ---
221
+
222
+ ## 🧰 Producing bundles β€” the emitter SDK
223
+
224
+ The producer side is the open SDK at **`audit_bundle.emitter`**. It assembles a
225
+ verifier-conformant bundle (canonical, sorted, newline-terminated manifest with
226
+ matching digests) and exposes pluggable hook seams:
227
+
228
+ ```python
229
+ from audit_bundle.emitter import (
230
+ BundleContent, write_bundle, assemble_manifest,
231
+ TimestampProvider, CausalChainEmitter, AttestationProvider,
232
+ StaticTimestampProvider, NullCausalChainEmitter, NullAttestationProvider,
233
+ )
234
+ ```
235
+
236
+ The open defaults (`Static*` / `Null*`) emit a clean baseline bundle with no
237
+ network calls. The `*Provider` interfaces are the extension points where richer
238
+ timestamp / causal-chain / attestation implementations plug in. Every pilot under
239
+ `examples/` builds its bundle this way β€” see any pilot's `build_bundle.py` (some
240
+ are named `_build_bundle.py`) for a worked example, and
241
+ `tests/test_emitter_sdk.py` for the conformance contract.
242
+
243
+ ### Spec-pinned dispatch (how pilots self-verify)
244
+
245
+ Each pilot proves its published output is the deterministic recompute of its
246
+ committed input under an *auditor-pinned* comparator. The auditor binding is the
247
+ pilot's committed `spec_pinned/<domain>.spec.json` β€” which primitive recomputes
248
+ the representative output, and the comparator kind. The auditor's anchor is
249
+ derived from the committed spec **bytes**, not from the bundle's own copy, so a
250
+ bundle that ships a weaker spec yields a digest the anchor does not list and
251
+ verification fails closed.
252
+
253
+ <details>
254
+ <summary><b>Two equivalent wiring styles</b> in <code>examples/</code></summary>
255
+
256
+ You will see two styles, distinguished by whether a `spec_pinned_check.py` is
257
+ present:
258
+
259
+ - **Current** β€” the spec is consumed directly in the pilot's own `verify.py` and
260
+ exercised by its `tests/`; there is no standalone driver. E.g.
261
+ `caselaw_citation_gate_minimal`, `iso42001_vnv_minimal`.
262
+ - **Legacy** — a standalone `spec_pinned_check.py` build→verify driver alongside
263
+ the pilot's test. E.g. `tabular_minimal`, `raster_minimal`. Functionally
264
+ identical; the older pilots use it.
265
+
266
+ New pilots should follow the **Current** style.
267
+
268
+ </details>
269
+
270
+ ---
271
+
272
+ ## πŸ“ Repository layout
273
+
274
+ | Path | What |
275
+ |------|------|
276
+ | `cli/` | Command-line tools: `verify` (the **bundle** verifier β€” answers "is this bundle internally valid?") and `host_digest_verify` (the **verifier-identity** check, wrapping `cosign` / `crane` to bind a running container's image digest to the TUF-fetched release digest). For ordinary local bundle verification `host_digest_verify` is optional; for a **public-release ceremony it is the required verifier-identity trust mechanism** and its result must be run and retained β€” `verify()` cannot answer the identity question itself. **Pre-ceremony:** the C18 TUF roots are still synthetic and no hardware-signed release has been cut, so the full TUF-gated identity flow is **not yet live** (it becomes runnable at the C18 key ceremony + first signed release). See [SECURITY.md](SECURITY.md) β†’ "Verifier-identity trust boundary (C18)". |
277
+ | `audit_bundle/` | The substrate β€” bundle format and manifest, the verifier, the producer `emitter` SDK, typed-check plugins, extensions, discharge, fragments, and coverage. |
278
+ | `coverage/` | Closed-world coverage plugin (sum-invariant grading). |
279
+ | `examples/` | Generic domain pilots β€” each a self-contained bundle plus its own `tests/`. |
280
+ | `tests/` | The open verifier + substrate test suite. |
281
+ | [`MANIFEST_SCHEMA.md`](MANIFEST_SCHEMA.md) | The bundle manifest schema. |
282
+ | [`VERIFIER_CONTRACT.md`](VERIFIER_CONTRACT.md) | The normative offline-verifier contract β€” every clause indexed to the test that enforces it. |
283
+
284
+ ## πŸ§ͺ Run the tests
285
+
286
+ ```bash
287
+ pip install -e ".[dev]"
288
+ pytest # the open verifier + substrate suite
289
+ pytest examples/<name>/tests/ # a single pilot's suite (run per-example)
290
+ ```
291
+
292
+ Each pilot under `examples/` ships its own `tests/` package and is invoked
293
+ separately β€” the suites are isolated by design.
294
+
295
+ ---
296
+
297
+ ## 🧭 Scope and honesty
298
+
299
+ Every pilot's data is **synthetic**. A pilot demonstrates that the substrate can
300
+ *re-derive* a declared output and detect tampering or drift against committed
301
+ inputs β€” it is **evidence for a verification property, never a claim that a real
302
+ deployment is "compliant"** with any named standard. The check proves the value is
303
+ the deterministic output of the *committed* computation over the *committed* input
304
+ under the auditor's comparator; it is **not** a claim that the computation or the
305
+ input are themselves correct, and a pilot's self-check re-runs the producer's own
306
+ re-derivation pack (a round-trip), not an independent re-implementation. Read each
307
+ pilot's README for the exact property it demonstrates and the explicit limits of
308
+ that claim.
309
+
310
+ The verifier's own guarantees are held to the same standard:
311
+ [`VERIFIER_CONTRACT.md`](VERIFIER_CONTRACT.md) states them as a normative
312
+ contract β€” offline, stdlib-only import boundary, structural-only scope,
313
+ tri-state verdict, no silent upgrade of unevaluated evidence β€” and indexes
314
+ every clause to the test that enforces it. The stdlib-only claim itself is
315
+ ratcheted: the test suite imports the verifier and re-verifies bundles under
316
+ an import hook that blocks every third-party package.
317
+
318
+ ---
319
+
320
+ ## πŸ”’ Security Β· Contributing Β· License
321
+
322
+ - **Security** β€” see [SECURITY.md](SECURITY.md) to report a vulnerability.
323
+ - **Contributing** β€” issues and pull requests are welcome. New pilots should
324
+ follow the *Current* spec-pinned wiring above; run `pytest` before submitting.
325
+ - **License** β€” Apache License 2.0, see [LICENSE](LICENSE).
326
+
327
+ ---
328
+
329
+ <div align="center">
330
+
331
+ **Recompute the answer β€” don't trust the claim.**
332
+
333
+ Apache-2.0 Β· offline verify Β· stdlib-only at audit time
334
+
335
+ </div>