Skip to content

docs: clarify policy and agent security boundaries - #276

Open
ihsraham wants to merge 3 commits into
developfrom
docs/policy-agent-security-boundaries
Open

ihsraham wants to merge 3 commits into
developfrom
docs/policy-agent-security-boundaries

Conversation

@ihsraham

@ihsraham ihsraham commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

The policy guide now makes the experimental status and production-readiness warning prominent and explains why local argument checks do not isolate signing authority from an agent.

  • Use explicit send permissions, normalize numeric inputs, reject serialized transactions, and bound type-2 gas fields in the policy and API examples.
  • Separate value limits, explicit gas ceilings, and provider-estimated fee checks; explain the lifetime of previously obtained raw account references.
  • Document seed-source precedence and command trust, and load seeds through a secret-manager command in the custom MCP server and client examples.
  • Align core, agent skill, OpenClaw, and MCP guidance on policies, confirmation, and key access, and regenerate the LLM feed.

The changes are limited to WDK Docs and can be reviewed independently of vault design decisions.

Validation: Node 22.22.2 npm run quality with external links and the production build; generated-document parity and rendered examples; 262 extracted-policy assertions, 16 released-runtime assertions with mocked providers, and 41 MCP seed and client checks. No live wallet transactions, real secret-manager integration, or full LangChain model calls were exercised.

Fixes #277.

@kinsta

kinsta Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Preview deployments for wdk-docs prod ⚡️

Status Branch preview Commit preview
❌ Failed to deploy N/A N/A

Commit: cd57cfd5edab98d7b18b3eb33037f99943ee4f20

Deployment ID: b9b7eab2-5807-4619-a5ed-779359d660fe

Static site name: wdk-docs-prod-pbpbt

@kinsta

kinsta Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Preview deployments for wdk-docs staging ⚡️

Status Branch preview Commit preview
❌ Failed to deploy N/A N/A

Commit: cd57cfd5edab98d7b18b3eb33037f99943ee4f20

Deployment ID: aa5b9ed6-3b31-4092-9c86-d794d222bb40

Static site name: wdk-docs-ve3eh

@AlonzoRicardo AlonzoRicardo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. The readiness warning and the new security boundary section are the right framing, and the corrections on the skill, toolkit and OpenClaw pages are the ones that mattered most. The elicitation wording in particular now matches what the code actually does.

Three things I would add before it lands.

1. The first example in the policy guide still permits the send it denies

The params to args[0] correction fixed the rename, but the example's shape still teaches a limit that holds for only one spelling: a catch-all allow-normal-operations sits above a deny whose condition matches only when args[0].value is a bigint.

Verified on 2026-09-28 with @tetherto/wdk@1.0.0-beta.18 and @tetherto/wdk-wallet-evm@1.0.0-beta.19, evaluating the guide's policy verbatim through account.simulate:

DENY   2 ETH as a bigint                    (deny-large-eth-send)
ALLOW  the same 2 ETH as a decimal string   (allow-normal-operations)
ALLOW  the same 2 ETH as a hex string       (allow-normal-operations)
ALLOW  0.001 ETH with a 10 ETH fee ceiling  (allow-normal-operations)
ALLOW  signing the same 2 ETH               (allow-normal-operations)
ALLOW  broadcasting those signed bytes      (allow-normal-operations)

The last two are one route: WalletAccountEvm.sendTransaction broadcasts a signed serialized transaction passed as a string, as-is.

Suggested changes to the example itself: drop the catch-all allow or narrow it to named operations, coerce the value before comparing it (ethers getBigInt), reject a string argument, and bound the gas fields. Happy to send a snippet if useful.

2. WDK_SEED_COMMAND and WDK_SEED_FILE are not documented

The pinned revision resolves the seed from three sources in order, and the configuration and get-started tables list only WDK_SEED. Two consequences worth a line each. The command form runs its value through execSync at startup, so anyone who can edit the MCP client configuration can run code in the process that holds the seed. It is also the only option that keeps the seed out of that configuration entirely when it is backed by a real secret manager, which is worth recommending rather than leaving undiscoverable while a literal seed phrase appears in six example configs.

3. The policy guide never mentions fees

The word does not appear on the page. A value cap does not bound what a transaction can cost, and the EVM package's own transactionMaxFee configuration is the existing guard and is not mentioned either.

Minor: the boundary section says to register policies before retrieving accounts. Worth adding that an account retrieved before a later registerPolicy call stays ungoverned for the lifetime of that reference.

@ihsraham

Copy link
Copy Markdown
Contributor Author

@AlonzoRicardo addressed your review in cd57cfd5. The examples now normalize amounts, reject serialized transactions, and bound gas fields. I also added the seed-loading options, clarified fee enforcement and account-reference lifetime, and updated the related examples. Your reported cases now pass the regression checks.

This branch had an error being deployed

1 failed deployment
preview — cd57cfd5 Deployed Sep 30, 2026 by kinsta[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants