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
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3af666fc2bb73997327980abe3d65d0c050d4309809bc5d2d76238c9e510f63c
|
|
| MD5 |
4c067534f5fb7989abe6bea292918c53
|
|
| BLAKE2b-256 |
8480191afdb3a1198cacfae51146e68768ace62a417fac0691934600ffed23b2
|
Provenance
The following attestation bundles were made for gbverify-0.3.2.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.2.tar.gz -
Subject digest:
3af666fc2bb73997327980abe3d65d0c050d4309809bc5d2d76238c9e510f63c - Sigstore transparency entry: 2353141191
- Sigstore integration time:
-
Permalink:
GreenbarSystems/gbverify@83e7282b2260e590d2c9222d7eedf8095ce1f4b5 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/GreenbarSystems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@83e7282b2260e590d2c9222d7eedf8095ce1f4b5 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee7301fb13e11a8d9375dc8a87f52138a8d7d9f2a7973cc23ac6f3449891c3a2
|
|
| MD5 |
2ffccea1a2a6323ab03eac9099d39c23
|
|
| BLAKE2b-256 |
e31fcb5b59197dcd0c14ae7544a7719aebbd7e75d73f5cccc32c461f2ee17b1f
|
Provenance
The following attestation bundles were made for gbverify-0.3.2-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.2-py3-none-any.whl -
Subject digest:
ee7301fb13e11a8d9375dc8a87f52138a8d7d9f2a7973cc23ac6f3449891c3a2 - Sigstore transparency entry: 2353141280
- Sigstore integration time:
-
Permalink:
GreenbarSystems/gbverify@83e7282b2260e590d2c9222d7eedf8095ce1f4b5 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/GreenbarSystems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@83e7282b2260e590d2c9222d7eedf8095ce1f4b5 -
Trigger Event:
push
-
Statement type: