Sui Scanner Skill

SkillSecurity

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.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Sui Scanner Skill skill

What this skill tells your AI

The instructions your AI receives, as published by 0x-shashi/web3-audit-skills in skills/sui-scanner/SKILL.md and read by ahel’s review.

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

  • Move Scanner — Generic Move language patterns (shared with Aptos)
  • Aptos Scanner — Aptos-specific global storage patterns

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

Signals

GitHub stars
60
Forks
10
Last commit
Feb 2026
Advanced
Catalog kind
skill
Gateway key
sui-scanner
Source
github.com/0x-shashi/web3-audit-skills