← Verifying a Document

BASH Bash verifier

Requires jq and the jsonschema Python CLI.

1
Install
pip install jsonschema[format-nongpl]
2
Structural check — validate against the published schema
jsonschema \
  --instance my.dbom.json \
  https://usemakoto.dev/schema/v0.1.json
3
Provenance check — walk the hash chain with jq
jq -r '
  .lineage as $s |
  range(1; ($s|length)) | . as $i |
  if $s[$i].input_hash != $s[$i-1].output_hash
  then "BROKEN at step \($s[$i].step)"
  else empty end,
  if $s[-1].output_hash != .source.hash.value
  then "FINAL hash mismatch" else empty end
' my.dbom.json

No output = chain is intact. For a complete script that combines both checks and exits 0/1, see the GitHub repo →