A pre-launch gate for dApps: Kane CLI catches leaked RPC keys, testnet endpoints, wrong contracts and transactions that don't match the screen. Claude Code fixes them.
Some of Web3's costliest hacks never touched a smart contract. They hit the website: a malicious script, a wrong address, a key left in the frontend, a transaction that doesn't match the screen. DappSentinel is a pre-launch safety gate for dApp frontends, for teams and solo builders shipping AI-written code. The agent is Claude Code. Locally, a Stop hook won't let Claude finish while any check fails; on GitHub, a fix job hands Claude Kane's report, commits the fix and Kane checks again. After 3 rounds, or when a fix needs a person's decision, it hands over. Claude can only change the site, never the checks. Kane CLI is the gate, the recorder, the explorer, the inspector (its own DevTools verdicts) and the re-checker of every fix. While Kane does the swap, a test wallet records what the site asks the user to sign: it must match what Kane read on the screen. Proof, all public: PR #5 and PR #11 fixed with no human. Two real bugs in code we didn't write: Polaris #118 and Spark. A mutation test with mistakes it was never tuned for: 11 of 11, including 3 wallet mistakes, on Kane 0.10.8 and 0.10.9. 11 live mainnet dApps checked. Two bugs found in Kane CLI itself: #239 confirmed by the Kane team, #245 labelled a bug. Ships on npm (npm install -g dappsentinel) and as a GitHub Action (@v1.3.0).
Credentials and fallback Nothing to hand over. Kane runs on your own TestMu AI account, the fix loop on your own Claude Code, and the demo dApp is public with no login. Fallback for every third-party service: each run is recorded and kept in the repo (evidence/ci-runs/, and the session viewer at https://dappsentinel.netlify.app/dashboard/), and npm test checks the logic on Kane's real output with no account or credits. How the agent and Kane CLI talk to each other Locally, a Claude Code Stop hook runs the gate whenever the agent changes the site. If any check fails, the hook blocks Claude from finishing and hands it Kane's findings and the report (the exact message is in the README). Claude fixes the site and tries to finish again, which re-runs Kane. On GitHub, a fix job hands Claude Kane's report, commits the fix to the pull request and comments what changed, and Kane checks again. No human relays results: PR #5 (6 of 7 failing to 7 of 7) and PR #11 (a wallet transaction to an unknown address: 1 of 7, Claude changed one line, 7 of 7). What you see is what you sign In the Bybit attack, the screen showed one transaction and the wallet signed another. While Kane uses the swap, DappSentinel puts a harmless test wallet into the page. It signs nothing and records what the site asks it to sign. A pass only stands if every transaction goes to a contract you trust, sends exactly the amount Kane read on the screen, and lets no stranger spend the user's tokens. On three copies where the screen looked right (wrong recipient, 10x the amount, an unlimited approval), Kane passed the screen and the wallet check failed each transaction. When the loop gives up After 3 rounds that Kane still fails, or when a fix needs a person's decision, it stops and hands over to a person, with the checks still failing and Kane's report. PR #10 is a real one: a developer added a price ticker loading scripts from TradingView; Claude kept it, didn't touch the rules, and asked a person to decide. The agent can't cheat A PreToolUse hook blocks edits to the checks, the config and the gate. If they're changed any other way, the gate compares them with the last commit and refuses to run (PR #6). The fix job also refuses to commit anything outside the site. What Kane caught In the demo: a leaked Alchemy API key, a Sepolia RPC in a mainnet build, a USDC address one character off, chain ID 11155111 instead of 1, a script from unpkg.com, and a private key saved in localStorage. In the mutation test: 10 mistakes it was never tuned for, 11 of 11 on Kane 0.10.8 and 0.10.9. In real code: Polaris issue #118 (a production build silently using localhost and testnet) and Spark's hardcoded, domain-locked RPC key. On live sites: a keyed RPC URL and 11 ad/analytics script hosts on CoW Swap, and outside script hosts on Aave, Uniswap, ENS and Revoke.cash. And in Kane itself: on 0.10.8, a pass on a wrong amount Kane had read correctly (kane-cli #239, confirmed by the Kane team, fix coming), and a triage that blamed the test when the app was wrong (kane-cli #245, labelled a bug, still on 0.10.9). How to run it No account or credits: npx -y dappsentinel demo replays the real runs. Any live dApp: npm install -g dappsentinel, then dappsentinel check --url <url>. In your repo: uses: Guzman0/DappSentinel@v1.3.0, with TestMu secrets. In Claude Code: /sentinel. See the README. Live URL note The live URL is the project site. The demo dApp it guards, with the six mistakes left in on purpose so anyone can run the gate against it, is https://sentinelswap-demo.netlify.app What's next Let teams run the test wallet as their own wallet address, so code that only wakes up for one target (like Bybit's) shows itself. Check live sites on a schedule, and flag any script whose code changes after a known-good day. Cover signature requests (permit) and more flows than swaps: lending, etc. Use more of Kane: verdict policies; Full list: ROADMAP.md in the repo.
Built in two weeks for the KaneCLI Online Hackathon.
See the hackathon →