What bundle verification checks
A policy bundle is the compiled, signed artifact that the runtime evaluates. Bundle verification confirms:- The bundle’s
bundle_hashmatches the content of the bundle directory - The bundle manifest signature (
bundle.sig) verifies against the trust root public key - The bundle was not modified after it was signed
Bundle structure
A compiled policy bundle lives atpolicies/{policyId}/{policyVersion}/:
Using verifyBundle from @parmanasystems/core
Matching bundle hash to attestation
Every attestation contains thebundleHash of the bundle that produced it. To verify that an attestation was produced from a specific bundle:
What the manifest contains
bundle.manifest.json example:
bundle.sig contains the Ed25519 signature over the canonical JSON serialization of the manifest.
Expected result
A successfulverifyBundle call returns:
Via the CLI
Troubleshooting
valid: false — “signature verification failed” The bundle.sig does not verify against trust/root.pub. Either the bundle was modified after signing, or the wrong public key is being used. Recompile and re-sign the bundle.
valid: false — “content hash mismatch” The policy.json or other bundle files were modified after the manifest was created. Recompile the bundle.
Bundle loads but produces unexpected decisions Bundle verification only confirms the bundle was not tampered with. If the policy rules produce unexpected outcomes, inspect policy.json and test using POST /simulate.