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.1.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.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gbverify-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 88e116907095ea732c79c0c94752d6ea8d27b9bdd644620b93f7f58997121c0f
MD5 ffca4930001553f1bf22a2b0ac2a618d
BLAKE2b-256 dd4449f189d91a341710836801c224af08fac043ec8878f80ae6688d1d74fba9

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbverify-0.3.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: gbverify-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 882640386e9d55fe1676a49c2c288d29cdc7b56c44f94d5e6f3b159cbb066181
MD5 b4e5a3cfc5d163f1e1f11ed11e6bcb3b
BLAKE2b-256 9633db1f9daed60e1b9f423f0fb7cd1ec2c4b2792839bd83a1f1f9448a39bde6

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbverify-0.3.1-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