CSE Roadmap

Core tier · about 4 hours · 12 parts

Part 9 of 12 · 2 min read

Mistakes that leave an approval meaningless

Common mistakes, and what the example does not do.

Mistakes that leave an approval meaningless

  • An approved=True flag in the agent's state.
  • Approving a model-written summary.
  • Reusable or never-expiring approvals.
  • Not binding the arguments, so "approve a $5 refund" authorises any refund.
  • Requester can approve own request.
  • Executor shares the signing key with the agent process.
  • No state check between approval and execution.
  • Approval prompts with unescaped model text.
  • Treating approval as a substitute for least privilege (module 2).

What the example does not do

About this example What the example does not do
  • No real approval UI, identity provider or authentication of the approver; "alice" is a string.
  • Symmetric HMAC: anyone with the key can mint approvals; asymmetric signing is not implemented.
  • In-memory nonce store, so a restart forgets used tokens and a cluster would need a shared store.
  • No atomicity between the state-version check and the action.
  • No tests of timing side channels beyond using a constant-time comparison.
  • Attacks written for the example against the example's own code.
  • Optional real experiment: show the rendered prompt to colleagues with and without the warnings, with one malicious request among ten, and compare how many they catch.

Check yourself

A human approves a refund of 50, and the agent executes a refund of 5,000. What stops it?

Show answer

The approval is bound to the exact action: a signed token covers the action name and a hash of the arguments, so a changed amount fails verification.

For the curious A token proves what was approved, not that approving was wise

All ten attacks on the token scheme failed, including a replay, self-approval, a high-risk action with one approver and an order that changed after approval. A false denial is the price: 50 and 50.0 hash differently. A stolen signing key, a compromised approval screen, a human who approves everything, and a misleading screen are not solved by tokens. These are the example's own attacks on the example's own code.

What you will use daily at work

Practice What it looks like
Sign the exact arguments Name, argument hash, session, expiry, one-time nonce.
Build the approval screen from the arguments Never from text the model wrote.
Separate requester and approver High-risk actions need two distinct approvers.
Bind to a state version If the order changed, deny and ask again.