Skip to content

Add Kokosh plugin (wallet-hygiene audit via x402)#148

Open
Kajko25 wants to merge 1 commit into
base:masterfrom
Kajko25:add-kokosh-plugin
Open

Add Kokosh plugin (wallet-hygiene audit via x402)#148
Kajko25 wants to merge 1 commit into
base:masterfrom
Kajko25:add-kokosh-plugin

Conversation

@Kajko25

@Kajko25 Kajko25 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • Adds a Base MCP plugin for Kokosh, a wallet-hygiene sentinel agent on Base mainnet: tracks token/Permit2 allowance exposure and flags scam-airdrop tokens by name/URL/homoglyph heuristics, with a paid /audit report ($0.01 USDC via x402).
  • integration: http-api, chains: [base], risk: [irreversible].
  • Adds one net-new tag (wallet-hygiene) to the shared vocabulary in plugin-spec.md, per Contribution Scope.

Notable finding

## Submission documents a real compatibility gap rather than a happy-path-only flow: Base MCP's default wallet is a smart contract account, whose sign() returns an ERC-1271/6492-shaped signature. Standard USDC transferWithAuthorization (used by x402's exact scheme) verifies with plain ecrecover only, so it will reject that signature. The plugin was hand-verified working end-to-end (real mainnet USDC settlement) with an EOA signer, and explicitly instructs the agent to stop rather than submit a payment authorization likely to fail settlement when the active wallet is a smart contract. Flagging for maintainers in case this is relevant to other x402-paying plugins.

Self-review

Ran the plugin-review skill against the current spec before opening this PR — verdict 🟡 approve with minor changes (both addressed: file relocated to the correct path, wallet-hygiene tag flagged/added). Full report: https://github.com/Kajko25/kokosh/blob/main/docs/base-mcp-plugin/kokosh-review.md

Test plan

  • Frontmatter validated against spec enums (integration, shell, auth, risk)
  • All required body sections present in canonical order with canonical headings
  • /audit, /exposure, /drops, /healthz endpoints live-tested against the deployed agent (https://kokosh-agent.vercel.app)
  • x402 payment flow verified end-to-end on Base mainnet with a real EOA signature (not simulated)
  • Not yet verified against Base MCP's own smart-contract wallet (see Notable finding above)

Kokosh is a wallet-hygiene sentinel agent for Base mainnet: tracks
token/Permit2 allowance exposure and flags scam-airdrop tokens by
name/URL/homoglyph heuristics, with a paid /audit report ($0.01 USDC
via x402).

- integration: http-api, chains: [base], risk: [irreversible]
- Documents a real smart-account-signature incompatibility with x402's
  exact scheme (Base MCP's default smart wallet returns an ERC-1271/6492
  signature, but standard USDC transferWithAuthorization only accepts
  raw ecrecover) rather than glossing over it — hand-verified working
  end to end with an EOA signer, not yet verified with a smart wallet.
- Adds `wallet-hygiene` to the shared tag vocabulary (net-new tag).

Self-reviewed against the plugin spec with the plugin-review skill;
report at https://github.com/Kajko25/kokosh/blob/main/docs/base-mcp-plugin/kokosh-review.md
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

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.

2 participants