<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chiagozie Oguzie</title>
    <description>The latest articles on DEV Community by Chiagozie Oguzie (@the_first_guz).</description>
    <link>https://dev.to/the_first_guz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4198892%2F4e0be59a-9a6e-4a18-8fcb-315af8709541.jpg</url>
      <title>DEV Community: Chiagozie Oguzie</title>
      <link>https://dev.to/the_first_guz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/the_first_guz"/>
    <language>en</language>
    <item>
      <title>What you see is what you sign: a pre-launch safety check for dApps, built on Kane CLI</title>
      <dc:creator>Chiagozie Oguzie</dc:creator>
      <pubDate>Wed, 25 Nov 2026 16:18:10 +0000</pubDate>
      <link>https://dev.to/the_first_guz/what-you-see-is-what-you-sign-a-pre-launch-safety-check-for-dapps-built-on-kane-cli-138d</link>
      <guid>https://dev.to/the_first_guz/what-you-see-is-what-you-sign-a-pre-launch-safety-check-for-dapps-built-on-kane-cli-138d</guid>
      <description>&lt;p&gt;Some of crypto's costliest hacks never touched a smart contract. They hit the website.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;BadgerDAO (2021):&lt;/strong&gt; a malicious script injected into the site.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ledger Connect Kit (2023):&lt;/strong&gt; a poisoned update that slipped a wallet drainer into dApps across crypto.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bybit (2025):&lt;/strong&gt; tampered code in the Safe{Wallet} interface. The screen showed a normal transaction while the wallet was asked to sign a different one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Audits cover the contracts. Nobody audits the frontend before every release, and a growing share of frontend code is now written by AI agents. So for the Kane CLI hackathon I built &lt;strong&gt;DappSentinel&lt;/strong&gt;, a pre-launch safety gate for dApp frontends.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it checks
&lt;/h2&gt;

&lt;p&gt;DappSentinel opens your site in a real browser with &lt;a href="https://github.com/LambdaTest/kane-cli" rel="noopener noreferrer"&gt;Kane CLI&lt;/a&gt;, TestMu AI's agentic browser, and uses it like a person. Then it checks what happens behind the page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RPC provider API keys (Alchemy, Infura, QuickNode...) in network requests&lt;/li&gt;
&lt;li&gt;testnet, staging or localhost endpoints in a mainnet build&lt;/li&gt;
&lt;li&gt;scripts from hosts you haven't approved&lt;/li&gt;
&lt;li&gt;private keys or seed phrases in localStorage or sessionStorage&lt;/li&gt;
&lt;li&gt;the contract address and chain ID shown on the page&lt;/li&gt;
&lt;li&gt;that the main flow, a swap, still works&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Kane gives its own verdict on every check, including DevTools assertions for the hidden ones. DappSentinel's code then checks the same evidence exactly, because Kane's DevTools can't read sessionStorage and can miss a request. A check fails if either one finds the problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsxkgca3e3uhv2gwxjm8h.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsxkgca3e3uhv2gwxjm8h.gif" alt="Kane catching the planted mistakes" width="560" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What you see is what you sign
&lt;/h2&gt;

&lt;p&gt;This is the part I'm proudest of. While Kane does the swap, DappSentinel puts a harmless &lt;strong&gt;test wallet&lt;/strong&gt; into the page. It signs nothing. It records what the site asks it to sign.&lt;/p&gt;

&lt;p&gt;The swap only passes if every transaction:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;goes to a contract you trust,&lt;/li&gt;
&lt;li&gt;sends exactly the amount Kane read on the confirmation screen, and&lt;/li&gt;
&lt;li&gt;doesn't let an untrusted address spend the user's tokens (the classic drainer approval).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I planted three mistakes where the screen looks completely normal. Kane passed the screen each time, because the screen was fine. The wallet check failed each transaction:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Planted mistake&lt;/th&gt;
&lt;th&gt;What DappSentinel reported&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The swap goes to an unknown address&lt;/td&gt;
&lt;td&gt;"The site asks the wallet to send 0.5 ETH to 0x9f2c…2f4a, which is not one of your trusted contracts."&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The screen says 0.5 ETH, the transaction sends 5&lt;/td&gt;
&lt;td&gt;"Kane saw "0.5 ETH" on the confirmation, but the transaction sent to the wallet is for 5 ETH."&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;An unlimited USDC approval to an unknown address&lt;/td&gt;
&lt;td&gt;"The site asks the wallet to let 0x9f2c…2f4a spend all of the token at USDC…"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The demo only ever talks to the test wallet, which it finds by name, so a visitor's real wallet is never asked to sign anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  The loop: Kane catches it, Claude Code fixes it
&lt;/h2&gt;

&lt;p&gt;Catching a mistake is half the job. DappSentinel closes the loop with Claude Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Locally&lt;/strong&gt;, a Stop hook runs the checks whenever the agent changes the site. If anything fails, Claude can't finish its turn; it gets Kane's findings instead, fixes the site, and Kane checks again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On GitHub&lt;/strong&gt;, a failing pull request hands Kane's report to Claude Code, which commits a fix and explains it on the pull request. Kane checks again, up to 3 rounds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The agent can't cheat.&lt;/strong&gt; It can only change the site, never the checks or the config. If they're changed any other way, the gate refuses to run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It knows when to stop.&lt;/strong&gt; After 3 rounds, or when passing would mean a decision only a person should make (like trusting a new script host), it hands over to a person with what still fails and why.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;a href="https://github.com/Guzman0/DappSentinel/pull/11" rel="noopener noreferrer"&gt;one test pull request&lt;/a&gt;, the swap was sent to an unknown address while the screen looked fine. The wallet check failed it. Claude changed one line back to the trusted router, explained why, and Kane passed it 7 of 7. No human was involved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is it actually right?
&lt;/h2&gt;

&lt;p&gt;A gate is only useful if it's right, so I tested it on mistakes it was never tuned for. I made 10 copies of the fixed site, each with one new mistake: an Infura key instead of Alchemy, Holesky instead of Sepolia, two digits swapped in the middle of an address, a seed phrase in sessionStorage, the three wallet mistakes above, and more. The clean site must pass everything, and each copy must fail exactly its own check.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11 of 11, on both Kane CLI 0.10.8 and 0.10.9.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Along the way it found two bugs in Kane CLI itself. In one, Kane read "You pay 0.05 ETH", stored it, and still passed a check for 0.5 ETH. The Kane team &lt;a href="https://github.com/LambdaTest/kane-cli/issues/239" rel="noopener noreferrer"&gt;confirmed it&lt;/a&gt; (the comparison dropped the decimals) and is working on a fix. DappSentinel now checks the value Kane stores exactly, so a pass only stands if it matches. In the other, Kane's triage blamed the test when the app was wrong; the Kane team &lt;a href="https://github.com/LambdaTest/kane-cli/issues/245" rel="noopener noreferrer"&gt;labelled it a bug&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It also ran on 11 live mainnet dApps, and reproduced a &lt;a href="https://github.com/PolarisQ-xyz/polaris-frontend/issues/118" rel="noopener noreferrer"&gt;bug from an open-source prediction market's issue tracker&lt;/a&gt;: a production build that silently called localhost and testnet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It checks what a browser sees during the check, not your contracts.&lt;/li&gt;
&lt;li&gt;Malicious code that only wakes up for specific wallets or transactions can stay quiet during a check.&lt;/li&gt;
&lt;li&gt;Some live sites block automated browsers. Those runs are reported as inconclusive, never as clean.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;One step in a GitHub workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Guzman0/DappSentinel@v1.3.0&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://staging.yourdapp.xyz&lt;/span&gt;
    &lt;span class="na"&gt;lt-username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.LT_USERNAME }}&lt;/span&gt;
    &lt;span class="na"&gt;lt-access-key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.LT_ACCESS_KEY }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or check any live dApp from any folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm install -g dappsentinel
dappsentinel check --url https://stake.lido.fi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/Guzman0/DappSentinel" rel="noopener noreferrer"&gt;https://github.com/Guzman0/DappSentinel&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;npm: &lt;a href="https://www.npmjs.com/package/dappsentinel" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/dappsentinel&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Every Kane run, browsable: &lt;a href="https://dappsentinel.netlify.app/dashboard/" rel="noopener noreferrer"&gt;https://dappsentinel.netlify.app/dashboard/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Demo video: &lt;a href="https://youtu.be/FiErWhY495U" rel="noopener noreferrer"&gt;https://youtu.be/FiErWhY495U&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you ship dApp frontends, I'd love to hear what else you'd want it to check.&lt;/p&gt;

&lt;h1&gt;
  
  
  KaneCLIHackathon
&lt;/h1&gt;

&lt;h1&gt;
  
  
  KaneCLI
&lt;/h1&gt;

</description>
      <category>web3</category>
      <category>security</category>
      <category>testing</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
