prompt-attest
v0.1.4
Published
Prompt signing & provenance attestations (local-first, CI-friendly)
Maintainers
Readme
🔏 prompt-attest
Local-first prompt signing + provenance attestations. CI gate friendly.
Why is this useful?
Prompts are production artifacts, but they’re easy to change without anyone noticing.
prompt-attest helps you:
- Prevent prompt drift: any prompt change breaks verification until re-signed.
- Get audit-grade provenance: signer identity + exact file hashes + optional CI/eval evidence.
- Add a CI gate: block deploys if prompts aren’t signed by trusted identities.
Example: ship prompts with a deploy gate
Use case: you have production prompts checked into git, and you want deploy to fail closed unless the exact prompt bundle was signed by a trusted release identity.
- Put prompts under a manifest (example
prompts/manifest.yaml):
bundle_name: support-assistant
environment: prod
include:
- prompts/**/*.md- Configure trust + environment requirements (example
prompt-attest.yaml):
trust:
bundles:
support-assistant:
prod:
allow:
- "key:ED25519:<release-fingerprint>"
require_attestation_for:
- prod- In your release job, sign after tests/evals and ship the attestation with your artifacts:
npx prompt-attest sign --key /path/to/release.key --evidence type=ci,ref="$GITHUB_RUN_ID"- In deploy/build, verify before loading prompts:
npx prompt-attest verify --attestations-dir /path/to/downloaded/attestationsAny prompt change => new digest => verification fails until re-signed.
Quickstart
npm i -D prompt-attest
npx prompt-attest init
# generate a dev key (ed25519)
npx prompt-attest keygen --out ./.prompt-attest-dev.key --pubout ./.prompt-attest-dev.pub
# trust that key for this bundle/env
npx prompt-attest policy add-signer --pubkey ./.prompt-attest-dev.pub --bundle example-bundle --env dev
# sign bundle
npx prompt-attest hash --write-digest bundle.digest
npx prompt-attest sign --key ./.prompt-attest-dev.key
# verify (policy must allow signer id)
npx prompt-attest verifyDevelopment
npm install
npm test