๐Ÿฆž
PQSafe · GitHub Action

Verify SpendEnvelopes in your CI.

Drop a six-line job into any GitHub Action workflow. The build fails if an envelope is malformed, expired, replay-marked, or its signatures don't match. Use it as a pre-deploy gate, a PR check on envelope fixtures, or as an agent-flow regression guard.

Add to .github/workflows/pqsafe.yml
name: PQSafe SpendEnvelope verify
on: [push, pull_request]

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: PQSafe/verify-envelope-action@v1
        with:
          envelope-glob: 'fixtures/**/*.envelope.json'
          issuer: 'did:web:pqsafe.xyz:issuer:v1'
          fail-on-tampered: true

That's the whole installation. Push, watch CI go green, fail it deliberately by editing a fixture to confirm.

What it checks

Inputs

Input Required Description
envelope-globyesGlob pattern matching envelope JSON files
issuernoExpected issuer DID or pubkey fingerprint
fail-on-tamperednoDefault true. Fail build if any envelope is invalid.
expected-amountnoAssert mandate.amount equals this value
expected-currencynoAssert mandate.currency equals this value
expected-recipientnoAssert mandate.recipient equals this DID
replay-checknoDefault false. Hit canonical replay endpoint.
verifier-api-urlnoOverride for self-hosted verifier API

Outputs

Output Type Description
verified-countnumberNumber of envelopes that verified successfully
failed-countnumberNumber of envelopes that failed verification
report-jsonstringPath to per-envelope detail report

Use cases

Pre-deploy gate

Verify the production envelope fixtures haven't drifted from the signed issuer keys before merging to main.

Agent test fixture regression

Catch the case where someone updates an agent test fixture without re-signing it — the action fails the PR.

Vendor onboarding

If your team accepts payment mandates from a vendor's agent, run this action on every PR that updates the integration fixtures.

Conformance proof

Run against the official AP2-PQ test vector set in CI as a continuous claim that your implementation matches the canonical envelope shape.

Failure-mode example

Suppose someone edits amount on a signed fixture from 50.00 to 5000.00. The action output:

โœ— fixtures/payment-001.envelope.json
   ECDSA signature invalid for this envelope
   ML-DSA-65 signature invalid for this envelope
   # JCS canonical bytes changed โ†’ fingerprint changed โ†’ both sigs reject

Error: 1 envelope(s) failed verification. Failing build.

Re-signing requires the issuer's private key. There is no way to flip a field and keep the original signature.

View on GitHub Marketplace โ†’

Install with one click into any repo.

Action source on GitHub โ†’

Apache-2.0. Pin @v1 for stable, @main for latest.