gbverify
Verify the integrity of a Greenbar 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 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's database. If it doesn't match, the packet was modified after sealing.
gbverify isn't tied to one Greenbar product. It verifies any packet whose schemaVersion it recognizes (currently evidence.v2 — see "Schema versioning" below), regardless of which Greenbar tool sealed it.
Install
npm install -g @greenbarsystemsllc/gbverify # Node ≥ 18
pipx install gbverify # Python ≥ 3.8
Or run it once without installing:
npx @greenbarsystemsllc/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…", …}}
Try it
sample/packet.json is a real (synthetic) evidence packet. sample/tampered.json is the same packet with extractedInvoice.total changed after sealing — everything else, including the recorded manifestHash, is untouched:
$ gbverify sample/packet.json
✓ manifest hash valid
computed: d7096a4ba450756b3f251b34c83ddada35e5e22f2fe7c3c1a0f676e2686b08f2
recorded: d7096a4ba450756b3f251b34c83ddada35e5e22f2fe7c3c1a0f676e2686b08f2
schema: evidence.v2
$ gbverify sample/tampered.json
✗ manifest hash INVALID
computed: 0468a89c02135b62561ba36bdf6cc31016783a278ceddc4b4aa0acc972cd1bdb
recorded: d7096a4ba450756b3f251b34c83ddada35e5e22f2fe7c3c1a0f676e2686b08f2
schema: evidence.v2
Problems:
- manifestHash mismatch
Exit code is 0 for the first, 1 for the second — the recorded hash never changes, only what it's checked against.
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 was 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). The current source-of-truth implementation of this algorithm lives at src/lib/evidence/assemble.ts in the Greenbar-Pay repository. test.sh checks that gbverify's own Node and Python implementations agree with each other on every change; it does not check them against a live copy of assemble.ts. Today, the two repos stay in sync by convention, not by an automated cross-repo test.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gbverify-0.3.3.tar.gz.
File metadata
- Download URL: gbverify-0.3.3.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc1a980f112cde7a1224f4a30f21df693fcc531faf157fc451066180563a23f4
|
|
| MD5 |
a637128e7e7d4afaf0dd60228e16b11c
|
|
| BLAKE2b-256 |
a3a6b9ba60e3d69f83237fa5b0ff0b48596f4123084a696073134d2046e71bdc
|
Provenance
The following attestation bundles were made for gbverify-0.3.3.tar.gz:
Publisher:
release.yml on GreenbarSystems/gbverify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gbverify-0.3.3.tar.gz -
Subject digest:
dc1a980f112cde7a1224f4a30f21df693fcc531faf157fc451066180563a23f4 - Sigstore transparency entry: 2353920927
- Sigstore integration time:
-
Permalink:
GreenbarSystems/gbverify@526b3821c386b7c11623ba9641c52da059487e8f -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/GreenbarSystems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@526b3821c386b7c11623ba9641c52da059487e8f -
Trigger Event:
push
-
Statement type:
File details
Details for the file gbverify-0.3.3-py3-none-any.whl.
File metadata
- Download URL: gbverify-0.3.3-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1380b437678266cd5edd8ad0907ab742d7a688d8efb7c855c67654a1bb2c9eb0
|
|
| MD5 |
b40c56c1e92514304585dee96cbc44b8
|
|
| BLAKE2b-256 |
7bb9e1caf82a687dde6511af231140d2e7e5f0f69610bb1421eee2be64fb9faf
|
Provenance
The following attestation bundles were made for gbverify-0.3.3-py3-none-any.whl:
Publisher:
release.yml on GreenbarSystems/gbverify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gbverify-0.3.3-py3-none-any.whl -
Subject digest:
1380b437678266cd5edd8ad0907ab742d7a688d8efb7c855c67654a1bb2c9eb0 - Sigstore transparency entry: 2353920993
- Sigstore integration time:
-
Permalink:
GreenbarSystems/gbverify@526b3821c386b7c11623ba9641c52da059487e8f -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/GreenbarSystems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@526b3821c386b7c11623ba9641c52da059487e8f -
Trigger Event:
push
-
Statement type: