Inspiration
Organisations spend heavily on the front door: SSO, MFA, hardware keys, zero-trust networks. Yet breaches keep arriving through valid sessions, such as a stolen token, a compromised developer laptop or an over-privileged CI account. The damage comes from what happens next. Privileges quietly expand, safeguards get weakened, and a chain of ordinary-looking permissions ends at a crown-jewel asset.
Binance's initial incident report (3 Nov 2026) made this concrete for us. According to the report, a developer device led to a deployment credential, and that credential led to wallet signing. The front door wasn't the failure. Nothing reviewed what each step of that path made possible.
Traditional IAM asks "is this person allowed to request this role?" If the attacker controls an authorised account, the answer is yes. We wanted a system that asks a different question: what would this change make reachable, who must independently approve that, and did the target actually end up in that state?
The incident motivates the design. RATCHET runs on a simulated exchange, and we do not claim it would have prevented that incident.
What it does
RATCHET is an independent security control plane. Every access change follows the same path: assess → approve → execute → verify → record.
- Impact and blast-radius review. Before anyone decides, RATCHET simulates the change on the access graph. It shows newly reachable resources, new paths to tier-0 assets and the blast radius in each criticality tier.
- Permission change review. A signed Rego policy decides to allow the change, require independent approval, hold it or reject it. A requester can never approve their own escalation, or the reach of anyone they control. Each approval is a passkey signature bound to the canonical digest of the exact change, so reviewers approve exactly what they saw.
- Independent Security Authority. The rules live in a policy bundle signed by an M-of-N quorum, separate from the production systems they protect. A compromised production account can't rewrite them.
- Emergency containment. For a compromised identity, RATCHET computes a minimum-disruption cut: the smallest set of revocations that removes every route to tier 0 while unrelated work keeps running. A responder confirms that exact plan with a passkey.
- Tamper-evident audit. Every decision and observation is appended to a SHA-256 hash chain. Anyone can recheck it in the browser, or offline with
ratchetctl.
There are two ways to try it. The hosted demo runs the real console on Northwind, a fictional crypto exchange, with an in-browser backend and a clearly labelled simulated passkey. The local prototype runs the full stack with real WebAuthn passkeys and checks every executed change against the target itself.
How we built it
We split the system in two and joined the halves only through typed contracts (protobuf definitions plus Go interfaces), so we could work in parallel without stepping on each other.
- Control-plane core (Ishaan): a pure, deterministic change state machine in Go 1.27, an append-only PostgreSQL 17 event store with an outbox, graph analysis (reach, paths to tier 0, control sets and min-cut), embedded Open Policy Agent for Rego decisions, River jobs for expiry and re-checks, and a ConnectRPC API.
- Trust and edges (Sakar): RFC 8785 canonical JSON in both Go and TypeScript, WebAuthn passkey verification, the Independent Authority service, a connector that executes changes and reads the result back from the target, a stateful exchange simulator, and a Kubernetes adapter with an admission webhook.
- Messaging: commands and signed receipts travel over NATS JetStream. An execution counts only after an independent read-back of the target.
- Console: React 19, TypeScript, Vite and Tailwind, with eight workspaces: Overview, Changes, Infrastructure, Impact, Security policy, Incidents, Audit and Passkeys.
- Packaging: multi-stage Docker builds with digest-pinned bases, read-only root filesystems, dropped capabilities and non-root users.
Everything is free and open source. The project uses no paid services.
Challenges we ran into
- Byte-identical signatures across two languages. The browser recomputes the digest of a change before the passkey prompt appears, and the Go server must reach the same bytes. We wrote shared golden test vectors so the Go and TypeScript canonicalisers produce identical output.
- Defining a "safe" change. A change counts as a reduction only if graph analysis proves that no identity gains reach and no safeguard weakens. We wouldn't take the requester's word for it, which made the graph engine central to every decision.
- Containment without collateral damage. Revoking everything is easy and breaks the business. We had to find the smallest cut that severs every tier-0 path while leaving unrelated activity running.
- Failing in the right direction. When the system is degraded, privilege increases must be refused while revocations stay executable. Every component has to respect that asymmetry.
- Showing the product without a server. Judges should be able to try RATCHET in one click, but the real backend binds passkeys to
localhost. We built a hosted demo that runs the unchanged console against an in-browser stand-in, and we labelled everything simulated so it never overstates what is real.
Accomplishments that we're proud of
- An end-to-end journey with real passkeys: a compromised account requests a wallet role, RATCHET surfaces two new paths to the tier-0 signer, refuses self-approval, and grants the role only after two independent security leads sign that exact change.
- Nine security invariants enforced in code, from "no self-escalation" to "nothing is erased" and "minimum-disruption containment".
- Explainable decisions: every outcome names its Rego rule and its graph evidence, with no opaque risk scores.
- An audit ledger that anyone can verify, in the browser or offline.
- Attack scenarios covered by automated tests, including self-approval, controlled approvers, safeguard edits and containment. Hosted CI runs them on every push.
- A public demo anyone can open without signing up or installing anything.
What we learned
- Consequence beats identity. The most useful question about an access change is not who asked, but what it makes reachable.
- Access should be asymmetric. Granting can be slow and governed, as long as revoking stays fast.
- Approvals mean nothing unless they are bound to exact content. Canonicalisation and digests are what turn "approve" into a verifiable promise.
- Honesty about limits builds trust. Stating the simulation, the single-host setup and the deferred features up front made the project stronger, not weaker.
- Contracts first makes a two-person build possible. Agreeing on interfaces before writing code let two people build one system in parallel.
What's next for Ratchet
- A public live backend: a configurable origin and passkey relying-party ID, hosted behind Cloudflare Access, so reviewers can use real passkeys rather than only the demo.
- Completing the story: end-to-end containment and restoration acceptance, a live Authority ceremony in the browser, and loading your own organisation from a file.
- Towards production: connectors for AWS IAM, Entra ID, Okta and GitHub, Kubernetes enforcement, a break-glass quorum for total control-plane outages, a physically separated Authority with hardware-key signers, and witnessed checkpoints in an external transparency log.
Built With
- cybersecurity
- docker
- github
- go
- javascript
- postgresql
- react
- river
- typescript
- vita