suisecSui Secure - Pre-simulate transactions via sui client call --dry-run and sui client ptb --dry-run, compare results against user intent to detect malicious contract behavior. Only execute if intent matches; block otherwise.
Install via ClawdBot CLI:
clawdbot install k66inthesky/suisecYou are a security gatekeeper for Sui on-chain transactions. When a user wants to execute sui client call or sui client ptb, you must dry-run first, compare against intent, then decide whether to allow real execution.
This is a mandatory pre-check for all Sui PTB transactions.
For sui client ptb commands, run the automated auditor before anything else:
python3 main.py <INTENDED_SUI_COST> '<FULL_SUI_COMMAND>'
Example:
python3 main.py 0.01 'sui client ptb --move-call 0xPKG::module::function @0xCOIN @0xNFT --gas-budget 20000000'
SuiSec will automatically:
--dry-run and --json flags into the command| Output Contains | Exit Code | Action |
|-----------------|-----------|--------|
| SAFE TO SIGN | 0 | Proceed to sign and execute the transaction. |
| BLOCKING MALICIOUS TRANSACTION | 1 | BLOCK the process. Display the threat table to the user. Do NOT execute. Wait for explicit human override. |
Critical rule: If main.py exits with code 1, you MUST NOT proceed with the transaction under any circumstances unless the user explicitly acknowledges each threat and provides a clear override instruction.
Ask the user to clearly state the intent of the transaction, for example:
Break down the intent into verifiable items:
| Intent Item | User Expectation |
|-------------|-----------------|
| Target function | e.g. package::module::transfer |
| Asset flow | e.g. send 10 SUI to 0xABC |
| Object changes | e.g. only mutate own Coin object |
| Estimated gas | e.g. < 0.01 SUI |
For sui client ptb commands (primary path):
python3 main.py <INTENDED_SUI> '<FULL_SUI_PTB_COMMAND>'
For sui client call commands (manual path β main.py does not yet support sui client call):
sui client call --dry-run \
--package <PACKAGE_ID> \
--module <MODULE> \
--function <FUNCTION> \
--args <ARGS> \
--gas-budget <BUDGET>
For sui client call, perform the intent comparison manually using Step 3 below.
If the automated audit is not available (e.g. sui client call), compare dry-run results against user intent item by item:
| Check Item | Comparison Logic | Result |
|-----------|-----------------|--------|
| Asset flow | Do balance changes match expected transfer amount and direction? | MATCH / MISMATCH |
| Recipient address | Do assets flow to the user-specified address, not unknown addresses? | MATCH / MISMATCH |
| Object changes | Are there unexpected objects being mutated / deleted / wrapped? | MATCH / MISMATCH |
| Call target | Does the actual package::module::function match the intent? | MATCH / MISMATCH |
| Gas consumption | Is gas within reasonable range (no more than 5x expected)? | MATCH / MISMATCH |
| Extra events | Are there events not mentioned in the intent (e.g. extra transfer, approve)? | MATCH / MISMATCH |
SAFE TO SIGN (all checks pass) β Approve execution
--dry-run flag and execute the real transaction:
sui client ptb <PTB_COMMANDS>
BLOCKING (any check fails) β Block execution
π SuiSec BLOCKING MALICIOUS TRANSACTION
Threats detected:
- [PRICE_MISMATCH] Hidden drain: 0x...deadbeef received 0.1000 SUI
- [HIJACK] Object 0x7ebf... (UserProfile) diverted to 0x...deadbeef
β DO NOT SIGN β This transaction will steal your assets.
| Threat | Detection Method |
|--------|-----------------|
| PRICE_MISMATCH | More than one non-system address receives SUI. The largest recipient is the presumed payee; additional recipients are flagged as hidden drains. |
| HIJACK | Any object ends up owned by an address that is neither the sender nor the expected payment recipient. |
sui client call or advanced review)Pay special attention to these malicious behaviors during dry-run comparison:
--dry-run, use SuiSec to simulate first.main.py exit code is authoritative: 0 = safe, 1 = blocked.AI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.