Utilities for creating, validating, and packaging WEBCAT enrollments and manifests.
- Node.js 20 or newer.
sigsum-submitmust be available on your$PATHformanifest signoperations.- A Sigsum trust policy and keypair for signing manifests.
npm installRun the CLI directly with tsx during development:
npx tsx src/cli.ts --helpTo build the JavaScript output, run npm run build.
The enrollment namespace manages Sigsum enrollment payloads:
| Command | Purpose |
|---|---|
enrollment create |
Compile a Sigsum policy file and create a normalized enrollment JSON document. |
enrollment canonicalize |
Canonicalize an enrollment JSON document using canonical JSON rules. |
enrollment hash |
Canonicalize and SHA-256 hash an enrollment, outputting a base64url digest. |
Example – hash the sample enrollment definition:
npx tsx src/cli.ts enrollment hash -i examples/enrollment.json
# => TSNydkDZBv6QNZ3m7ZuBP9fFj0TD6hHDmzcwu9ulK3AThe canonicalized document (useful for audits) can be produced with:
npx tsx src/cli.ts enrollment canonicalize -i examples/enrollment.jsonThe manifest namespace operates on WEBCAT manifests:
| Command | Purpose |
|---|---|
manifest generate |
Scan a directory of static assets, apply a manifest config, and embed a Sigsum timestamp. |
manifest sign |
Canonicalize a manifest body, call sigsum-submit, and attach the returned proof under a signer key. |
manifest canonicalize |
Canonicalize an existing manifest JSON document. |
manifest hash |
Canonicalize and SHA-256 hash a manifest, outputting a base64url digest. |
manifest verify |
Verify signatures in a manifest (or bundle) against an enrollment and print the policy hash. |
Example – hash the provided manifest:
npx tsx src/cli.ts manifest hash -i examples/manifest.json
# => 8OYr4SFw2U2NR2efE69FAKZicf_2QbUGxXT7kxN1C80Example – verify a bundle:
npx tsx src/cli.ts manifest verify examples/bundle.jsonUse bundle create to combine an enrollment and a manifest (with signatures) into a WEBCAT bundle that can be distributed to verifiers:
npx tsx src/cli.ts bundle create -e examples/enrollment.json -m examples/manifest.json > bundle.jsonThe resulting bundle.json matches the fixture located in examples/bundle.json.
Run the growing end-to-end test suite, which exercises the CLI against the generated examples, with:
npm test