Skip to main content

gbverify

Verify the integrity of a Greenbar AP Assurance evidence packet in one command.

gbverify is a small, dependency-free, MIT-licensed tool that recomputes the SHA-256 manifest hash printed on every Greenbar AP Assurance evidence-packet PDF and reports whether it matches the record. It runs entirely on your machine — no network call, no Greenbar account.

If the hash matches, you have cryptographic evidence that the AI-assisted review record on the accompanying PDF is bit-for-bit identical to the record sealed at approval time in Greenbar AP Assurance's database. If it doesn't match, the packet was modified after sealing.

Install

npm install -g @greenbarsystems/gbverify   # Node ≥ 18
pipx install gbverify                      # Python ≥ 3.8
brew install gbverify                      # macOS, Linux

Or run it once without installing:

npx @greenbarsystems/gbverify packet.json

Use

$ gbverify packet.json
✓  manifest hash valid
   computed: d7096a4ba450756b3f251b34c83ddada35e5e22f2fe7c3c1a0f676e2686b08f2
   recorded: d7096a4ba450756b3f251b34c83ddada35e5e22f2fe7c3c1a0f676e2686b08f2
   schema:   evidence.v2

Also verify the source PDF the AI extracted from:

$ gbverify --document invoice.pdf packet.json
✓  manifest hash valid
✓  source document hash matches

Machine-readable output:

$ gbverify --json packet.json
{"manifest":{"ok":true,"computedManifestHash":"d709…","recordedManifestHash":"d709…", …}}

What a passing verification proves

  • The record is untampered. The invoice, line items, AI briefing card, deterministic risk score inputs, validation findings, approver attestation, and any blocking-finding override were bit-for-bit identical to what Greenbar AP Assurance sealed at approval time.
  • The source PDF is the one the AI reviewed. With --document, the SHA-256 of the file on disk matches the source-document hash recorded in the packet at ingest time.

What it does not prove

  • Whether the approver's judgment was correct.
  • Whether the vendor is legitimate.
  • Whether the AI's extraction was accurate.

These are review questions. The packet is the evidence you use to ask them, not the answer.

How the hash is computed

The manifest hash is a SHA-256 over the manifest JSON, serialized with recursively sorted object keys and no incidental whitespace (canonical JSON). This is the same algorithm implemented at src/lib/evidence/assemble.ts in the Greenbar AP Assurance repository.

You do not need this tool to verify — a five-line Python script or a short shell pipeline will produce the same hash:

import json, hashlib
p = json.load(open("packet.json"))["gbEvidencePacket"]
s = json.dumps(p["manifest"], sort_keys=True, ensure_ascii=False,
               separators=(",", ":"))
assert hashlib.sha256(s.encode("utf-8")).hexdigest() == p["manifestHash"]

Exit codes

Code Meaning
0 Hash valid (and document hash matches if --document was given)
1 Manifest hash INVALID — packet modified after sealing
2 Usage error / unreadable input
3 --document mismatch (manifest was valid but the PDF is not the sealed one)

Schema versioning

gbverify refuses to verify a packet with an unknown schemaVersion. This prevents silent mis-hashing when Greenbar changes the canonical-JSON contract. If you receive a packet with a newer schema, upgrade gbverify; if you receive one with an older schema, use the matching older gbverify release.

Currently supported: evidence.v2.

License

MIT. Contributions welcome. Report canonicalization bugs at github.com/GreenbarSystems/gbverify/issues.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gbverify-0.3.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gbverify-0.3.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file gbverify-0.3.2.tar.gz.

File metadata

  • Download URL: gbverify-0.3.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gbverify-0.3.2.tar.gz
Algorithm Hash digest
SHA256 3af666fc2bb73997327980abe3d65d0c050d4309809bc5d2d76238c9e510f63c
MD5 4c067534f5fb7989abe6bea292918c53
BLAKE2b-256 8480191afdb3a1198cacfae51146e68768ace62a417fac0691934600ffed23b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbverify-0.3.2.tar.gz:

Publisher: release.yml on GreenbarSystems/gbverify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gbverify-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: gbverify-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gbverify-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee7301fb13e11a8d9375dc8a87f52138a8d7d9f2a7973cc23ac6f3449891c3a2
MD5 2ffccea1a2a6323ab03eac9099d39c23
BLAKE2b-256 e31fcb5b59197dcd0c14ae7544a7719aebbd7e75d73f5cccc32c461f2ee17b1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbverify-0.3.2-py3-none-any.whl:

Publisher: release.yml on GreenbarSystems/gbverify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page