0x-shashi/web3-audit-skills/sui-scanner

Claude Code and agent skill by 0x-shashi/web3-audit-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when the user wants to audit Sui Move smart contracts, scan Sui-specific patterns including object ownership, shared objects, or dynamic fields, review Sui DeFi protocols for object model security issues, or analyze Sui-specific transaction and consensus patterns.

Install

npx vskill@latest install 0x-shashi/web3-audit-skills/sui-scanner

SKILL.md

Sui Scanner Skill

Purpose

Specialized scanner for Sui Move smart contracts. Sui uses a unique object-centric model where state is organized as typed objects with ownership semantics, not as a global address-keyed storage. This fundamentally changes the security surface compared to both EVM and other Move chains (Aptos).

Sui vs Aptos: Key Differences

AspectSui MoveAptos Move
State ModelObject-centric (owned/shared/immutable)Global storage (move_to, borrow_global)
ParallelismOwned objects processed in parallel, no consensusAll transactions sequenced
Transaction InputObjects passed explicitly as paramsResources accessed via address
UpgradeUpgradeCap object requiredModule publisher authority
Init PatternOne-Time Witness (init(otw: OTW, ctx: &mut TxContext))init_module(account: &signer)
Transfertransfer::transfer / transfer::public_transfermove_to(signer, resource)
Custom TypesAbilities: key, store, copy, dropSame abilities, different usage

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│ Sui Network │
│ │
│ ┌───────────────────┐ ┌───────────────────┐ │
│ │ Owned Objects │ │ Shared Objects │ │
│ │ (No consensus) │ │ (Consensus needed) │ │
│ │ │ │ │ │
│ │ ┌────────┐ │ │ ┌────────┐ │ │
│ │ │ Coin │ ←owner│ │ │ DEX │ ←shared│ │
│ │ └────────┘ │ │ │ Pool │ │ │
│ │ ┌────────┐ │ │ └────────┘ │ │
│ │ │ NFT │ ←owner│ │ ┌────────┐ │ │
│ │ └────────┘ │ │ │ Config │ ←shared│ │
│ └───────────────────┘ │ └────────┘ │ │
│ └───────────────────┘ │
│ ┌───────────────────┐ ┌───────────────────┐ │
│ │ Immutable Objects │ │ Wrapped Objects │ │
│ │ (Frozen forever) │ │ (Inside another) │ │
│ │ ┌────────┐ │ │ ┌────────────┐ │ │
│ │ │Package │ │ │ │ Parent Obj │ │ │
│ │ └────────┘ │ │ │ ┌───────┐ │ │ │
│ └───────────────────┘ │ │ │ Child │ │ │ │
│ │ │ └───────┘ │ │ │
│ │ └────────────┘ │ │
│ └───────────────────┘ │
└─────────────────────────────────────────────────────────────┘

Detection Capabilities

Critical Vulnerabilities
  • Object ownership bypass: Shared objects accessed/modified without authorization checks
  • UpgradeCap leak: Upgrade capability transferred to wrong address or left publicly accessible
  • Dynamic field manipulation: Unbounded or attacker-controlled dynamic field growth
  • Missing One-Time Witness: Module initialization can be replayed
High Vulnerabilities
  • Missing `TxContext::sender` check: Privileged operations without caller validation
  • Shared object contention DoS: Spamming shared objects to create sequencing bottleneck
  • Transfer policy bypass: Using transfer::transfer instead of transfer::public_transfer for types with store
  • Object ID prediction: Assuming object IDs are random when they're deterministic
Medium Vulnerabilities
  • Object wrapping/unwrapping bugs: Wrapped objects not properly lifecycle-managed
  • Clock dependency manipulation: Time-sensitive logic relying on Clock shared object
  • Dynamic field key collision: Different logical fields mapped to same dynamic field key
  • Frozen object mutability attempt: Logic that attempts to modify frozen objects

Real-World Sui Incidents

IncidentVulnerabilityImpact
Various DEX implementationsShared object contentionPerformance degradation, elevated fees
NFT marketplace bugsTransfer policy bypassRoyalty enforcement circumvented
Early DeFi protocolsMissing sender checks on admin functionsUnauthorized parameter changes
Bridge implementationsObject ownership not validatedCross-chain message spoofing

Resources

Workflows

  • Sui Audit — Step-by-step Sui audit methodology

Related Scanners

Error Code Reference

Sui-specific error codes and framework abort codes. Sui Move uses custom abort codes per module.

Sui Framework Errors
Abort CodeModuleMeaning
ENotOwnerobject / variousCaller does not own the object
EInvalidOwnertransferInvalid owner for transfer operation
ESharedObjectOperationNotAllowedtransferCannot perform this operation on shared objects
EEmptyInventorykioskKiosk inventory is empty
EItemNotFoundkioskItem not found in kiosk
ENotEnoughbalanceInsufficient balance for operation
ENonZerobalanceBalance is not zero (expected to be destroyed)
EDivisionByZeromathDivision by zero in math
EOverflowmathArithmetic overflow
EWrongInnerTypedynamic_fieldDynamic field type mismatch
EFieldDoesNotExistdynamic_fieldDynamic field not found on object
EFieldAlreadyExistsdynamic_fieldDynamic field already exists
Sui Coin / Token Errors
Abort CodeModuleMeaning
EBadWitnesscoinInvalid one-time witness type
ENotTreasurycoinCaller does not hold TreasuryCap
EInsufficientBalancecoinCoin value too low for operation
ECoinTypeMismatchpayCoins of different types in merge/split
Common DeFi Protocol Errors (Sui)
Abort Code PatternProtocol TypeMeaning
ESlippageExceededAMM/DEXPrice moved beyond slippage tolerance
EInsufficientLiquidityAMM/DEXPool has insufficient liquidity for swap
EPoolNotFoundAMM/DEXTrading pool does not exist
ELockExpired / ELockNotExpiredStakingTime-lock constraint violation
EInvalidPrice / EStalePriceOraclePrice feed invalid or outdated

Troubleshooting

IssueLikely CauseSolution
Object ownership vulnerabilities missedScanner doesn't model Sui object ownership typesLoad resources/object-security.md; distinguish owned/shared/immutable/wrapped objects
Shared object contention not flaggedScanner treats shared objects like ownedAnalyze all functions taking &mut shared objects for ordering/MEV attacks
Dynamic field injection not detectedScanner doesn't trace dynamic field accessAudit all dynamic_field::add/remove/borrow for unauthorized field manipulation
Flash loan patterns missedScanner doesn't recognize Sui Hot Potato patternCheck for structs without drop/store abilities returned from functions (must be consumed)
One-time witness (OTW) bypass not caughtScanner doesn't verify OTW patternVerify module's OTW struct has drop only, uppercase name matches module, used in init()
Capability token leaks not detectedScanner trusts Move type system for safetyTrace all Cap types — verify no public functions return or expose capabilities

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
46
Repository forks
6
7-day trend score
19

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/0x-shashi/web3-audit-skills/sui-scanner/badge)](https://verified-skill.com/skills/0x-shashi/web3-audit-skills/sui-scanner)

Something wrong with this skill or its page? Tell us.