diff --git a/README.md b/README.md index c1123a4..865f924 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Model output never becomes raw calldata or instruction bytes. Reject paths are p - [Process](docs/process.md) - happy path, rejects, state machines, audit events - [Demo](docs/demo.md) - local setup, interviewer script, screenshots - [Threat model](docs/threat-model.md) - assets, controls, residual risk +- [Production gaps](docs/production-gaps.md) - local chains, demo vault, hosted mock planner, fixture evals - [Changelog](docs/CHANGELOG.md) ## Stack @@ -87,13 +88,7 @@ GitHub Actions does not run the live suite. ## Limits -This is a portfolio / interview demo, not production infrastructure. - -- Local Anvil and solana-test-validator only by default -- Demo key vault holds keys; not real threshold MPC / HSM, no mainnet defaults -- MockPlanner is the zero-key default. Live planner is env-gated (`PLANNER=openai`) and still policy-checked; hosted demo stays mock -- Express + Mongo here on purpose for full-stack JD coverage; Go owns policy; vault owns signing -- If the API is compromised, policy could be skipped and the vault can still be asked to sign (see threat model) +Portfolio / interview demo. The honest list lives in [docs/production-gaps.md](docs/production-gaps.md): local Anvil and solana-test-validator only, demo vault is not MPC, Express can still ask the vault to sign, hosted demo stays on MockPlanner, fixture evals are not live quality. ## CI diff --git a/docs/production-gaps.md b/docs/production-gaps.md new file mode 100644 index 0000000..2b9bb3d --- /dev/null +++ b/docs/production-gaps.md @@ -0,0 +1,23 @@ +# What is not production + +Guardrail Agent is a portfolio / interview demo. The happy-path docs show what the stack does locally. This page is the matching list of things it does not do. + +## Local chains + +Compose, Foundry deploy, and the executors talk to Anvil (`31337`) and `solana-test-validator`. Those are the only supported RPCs. Demo keys are the well-known Anvil account #0 and a local Solana keypair. Nothing here is configured for mainnet, and pointing it there would reuse those keys. + +## Demo vault is not MPC + +`services/vault` is one Node process with the private keys in memory / env. It signs after HITL over a local Bearer token. That is a process boundary so the API does not dump keys on a crash or a log line. It is not threshold MPC, not an HSM, not Fireblocks. One process, one token. + +## Express can still call the vault + +Approve and pre-sign re-run Go `/v1/validate` on the stored step payload. Mutating recipient or amount in Mongo should fail there. If Express itself is compromised, it can skip policy and still `POST` the vault with the same token. Keys left the API process; they did not leave the reach of a hostile orchestrator. [Threat model](threat-model.md) residual risk covers the same point. + +## Hosted demo uses MockPlanner + +The Vercel + Railway demo runs `PLANNER=mock`. That keyword router needs no API key and is deterministic. `PLANNER=openai` exists for local use, fails closed without `OPENAI_API_KEY`, and still goes through schema + policy. The public URL is not evidence that a live model is in the loop. + +## Fixture evals are not live quality + +CI posts canned `plan` JSON at the Go policy service. That is a regression contract for schema and policy (including frozen `infinite_approve`, `recipient_not_allowed`, and schema injection). It does not score planner quality, live prompt-injection resistance, or on-chain execution. `npm run test:live` is opt-in and not in GitHub Actions. How to add a fixture: [packages/evals/README.md](../packages/evals/README.md). diff --git a/docs/threat-model.md b/docs/threat-model.md index b0feede..b1944a5 100644 --- a/docs/threat-model.md +++ b/docs/threat-model.md @@ -2,6 +2,8 @@ Guardrail Agent treats model output as untrusted input. Plans are structural JSON only. Executors map allowlisted actions to calldata / instructions. Humans approve each step before submit. Demo chain keys live in a separate vault process. +What this repo is not (local chains, demo vault, Express still able to call the vault, hosted MockPlanner, fixture evals) is listed in [production-gaps.md](production-gaps.md). + ## Assets - Demo private keys (vault process only; local Anvil / solana-test-validator) @@ -44,4 +46,4 @@ Mainnet trading, real threshold MPC / multi-party key shares, autonomous loops, Approve and vault-sign re-run Go `/v1/validate` on the current `PlanStep.payload` rows (not `rawModelJson`) using `loadPolicy(userId)` — the latest user-scoped or global rules, not a frozen copy from plan create. A later policy bump can reject a plan that passed at intent time. Mutating recipient or amount in Mongo should fail the approve claim and fail again immediately before `vaultSignEvmTx` / `vaultSignSolanaTx`, so skipping orchestration is harder than it was when only the intent-time gate existed. -If Express is compromised it can still omit those calls and ask the vault to sign with the same local Bearer token. The vault split keeps keys out of the API process and makes an MPC/HSM swap obvious; it is not threshold custody. Keep demo keys off any public network. +If Express is compromised it can still omit those calls and ask the vault to sign with the same local Bearer token. The vault split keeps keys out of the API process and makes an MPC/HSM swap obvious; it is not threshold custody. Keep demo keys off any public network. See [production-gaps.md](production-gaps.md).