Move Scanner Skill

SkillSecurity

Use when the user wants to audit Move smart contracts for security vulnerabilities, scan Aptos or Sui contracts for resource safety, capability leaks, or module upgrade issues, review Move-based DeFi protocols for object model and linear type violations, or analyze cross-module trust boundaries.

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 Move Scanner Skill skill

What this skill tells your AI

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

Purpose

Analyze Move smart contracts for security vulnerabilities on both Aptos and Sui. Move's resource-oriented programming model — with linear types, abilities system, and the borrow checker — provides stronger safety guarantees than Solidity, but introduces unique vulnerability classes around capability management, module upgrades, and cross-module trust.

Move Security Model

Move was designed by Meta (formerly Facebook) for the Diem blockchain with safety as a first-class priority. The type system enforces:

Safety PropertyHow Move Enforces ItResidual Risk
No resource duplicationLinear types: resources can't be copied unless explicitly marked copyIncorrect copy ability on value types
No resource lossResources must be explicitly destroyed or storedIncorrect drop ability allows silent discard
Type safetyStatic type checking + bytecode verificationType confusion via deserialization
Access controlModule encapsulation + public vs public(friend)Overly permissive friend declarations
Memory safetyNo raw pointers, borrow checkerLogic errors in state transitions

Aptos vs Sui — Key Differences

FeatureAptosSui
State modelGlobal storage (move_to, borrow_global)Object model (owned, shared, immutable)
ExecutionSequentialParallel (for owned objects)
Upgrade modelModule upgrade authorityPackage upgrade via UpgradeCap
Initializationinit_module (called once on publish)init function with one-time witness
IdentityAccount addressesObject IDs
Token standardaptos_framework::coinsui::coin with TreasuryCap
Randomnessaptos_framework::randomnesssui::random

Detection Capabilities

Critical — Direct Fund Loss

VulnerabilityDescriptionDetection Signal
Capability leakAdminCap, MintCap, or TreasuryCap stored in publicly accessible locationCapability with store ability + move_to to accessible address
Missing signer checkEntry function doesn't validate caller identitypublic entry fun without signer parameter or authority check
Resource duplicationValue-holding resource has copy abilityhas copy on struct holding coins or tokens
Unsafe module upgradeUpgrade authority not protectedUpgrade policy set to compatible with weak authority check
Unauthorized mintingToken mint function callable by anyonemint function without capability or authority gate

High — Significant Impact

VulnerabilityDescriptionDetection Signal
Friend function abuseFriend modules can bypass internal invariantspublic(friend) on sensitive functions with excessive friends
Integer overflowMove integers overflow without abort by default+, * without checked arithmetic or assert! bounds
Object access bypass (Sui)Shared object manipulation or wrapped object extractionshared object without proper access control
Capability not burnedOne-time capabilities not destroyed after useInit witness or admin cap not consumed
Acquires annotation missingResource access without proper acquiresCompile-time error on Aptos, but indicates design issue

Medium — Conditional Impact

VulnerabilityDescriptionDetection Signal
Dynamic field overflow (Sui)Unbounded dynamic fields on objectsdynamic_field::add without count limits
Missing abort codesGeneric aborts make debugging/monitoring difficultabort without code or assert! without message
Event missingState changes without event emissionmove_to / move_from without event::emit
Shared object contention (Sui)Shared objects create bottlenecksFrequently-accessed shared objects
Phantom type confusionPhantom type parameters misusedphantom type enabling cross-type access

Move Type System — Abilities Audit Guide

The four abilities control what you can do with a type:

AbilityWhat It AllowsSecurity Concern
keyCan be stored in global storage (Aptos) or as an object (Sui)Required for top-level storage — ensure access control
storeCan be nested inside other resourcesValues with store can be transferred — check if intended
copyCan be duplicatedDANGEROUS for value types — duplicating coins = minting
dropCan be discarded without destructionCareful with capabilities — dropping an admin cap means losing it

Secure Capability Pattern

// SECURE: Capability without copy or drop — must be stored or explicitly destroyed
struct AdminCap has key, store {
    id: UID,  // Sui
}

// INSECURE: copy + drop allows duplication and silent discard
struct AdminCap has key, store, copy, drop {
    id: UID,
}

Resources

ResourceDescription
Move PatternsCommon vulnerability patterns in Move with code examples
Aptos SecurityAptos-specific security: global storage, coin module, upgrade policy
Sui SecuritySui-specific security: object model, shared objects, UpgradeCap

Workflows

WorkflowDescription
Move AuditUnified audit workflow for Move contracts (Aptos + Sui)

Notable Move Ecosystem Security Incidents

IncidentChainRoot CauseImpact
Pontem DEX exploitAptosPrice oracle manipulation via flash loanFund theft
Tortuga staking issueAptosStaking reward calculation errorIncorrect APY
Various Sui DeFi issuesSuiShared object contention + flash loan attacksTrading manipulation
Module upgrade attacksAptosUnprotected upgrade authorityProtocol takeover

Integration with Other Skills

SkillConnection
aptos-scanner/Aptos-specific patterns and audit workflow
chain-guides/aptos.mdChain context for Aptos (validators, gas, modules)
patterns/Cross-reference with general vulnerability categories
exploit-forensics/Move-based exploit analysis

Error Code Reference

Common Move abort codes encountered during audits. Move uses numeric abort codes (abort <code>) or assert conditions (assert!(<cond>, <code>)).

Move Standard Library Abort Codes

Abort CodeModuleMeaning
0x10001 (65537)vectorIndex out of bounds — vector::borrow or vector::remove
0x10002 (65538)vectorVector already contains element — vector::push_back on fixed
0x20001 (131073)optionOption::extract on None — missing existence check
0x20002 (131074)optionOption::borrow on None — attempt to read empty option
0x30001 (196609)stringInvalid UTF-8 bytes
0x40001 (262145)signerIncorrect signer in multi-signer scenario
0x50001 (327681)tableKey already exists in table
0x50002 (327682)tableKey not found in table
0x60001 (393217)coinInsufficient coin balance
0x60002 (393218)coinCoin store not registered
0x60003 (393219)coinCoin store already registered

Aptos Framework Abort Codes

Abort CodeModuleMeaning
0x80001 (524289)accountAccount already exists
0x80002 (524290)accountAccount does not exist
0x80005 (524293)accountSigner capability not found
0x90001 (589825)resource_accountResource account already exists
0xA0001 (655361)staking_contractUnauthorized — not the owner
ENOT_OWNER (varies)Common patternCaller is not the resource owner — check access logic
EALREADY_INITIALIZED (varies)Common patternModule/resource already initialized — check init guards
ENOT_AUTHORIZED (varies)Common patternMissing authorization — check signer validation

Sui Framework Abort Codes

Abort CodeModuleMeaning
ENotOwnerobjectCaller does not own the object
EEmptyInventorykioskKiosk has no items
EObjectNotSharedtransferAttempting shared-object operation on owned object
EInvalidCapVariousCapability token does not match expected type/ID
EDivisionByZeromathDivision by zero in fixed-point math
EOverflowmathArithmetic overflow in math operation

Troubleshooting

IssueLikely CauseSolution
Scanner doesn't distinguish Aptos vs Sui patternsGeneric Move analysis loadedLoad aptos-scanner/ or sui-scanner/ for chain-specific analysis
Capability leaks not detectedScanner doesn't track linear type flowManually trace all Capability and AdminCap types from creation to storage
Module upgrade risks missedScanner only checks current codeVerify UpgradeCap ownership and upgrade policy (immutable vs compatible)
Resource safety violations missedScanner trusts the Move verifierMove verifier catches type safety but NOT logic bugs — audit business logic
False positives on abort codesScanner flags all abort as errorsCustom abort codes are normal flow control — check if handled by callers
Object ownership confusion (Sui)Scanner doesn't model Sui object modelLoad sui-scanner/resources/object-security.md for ownership analysis

Signals

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