0x-shashi/web3-audit-skills/aptos-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 Aptos Move smart contracts, scan Aptos-specific patterns including global storage model, resource accounts, or coin modules, review Aptos DeFi protocols for framework module interaction vulnerabilities, or analyze Aptos-specific upgrade and governance patterns.

Install

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

SKILL.md

Aptos Specialized Scanner

Specialized security scanner for Aptos Move smart contracts. Extends the general Move Scanner with Aptos-specific patterns, framework modules, and the global storage model.


Why a Separate Aptos Scanner?

While the Move Scanner covers language-level patterns shared between Aptos and Sui, Aptos has a fundamentally different storage model (global resources under addresses), framework (AptosFramework), and upgrade system that require dedicated detection rules.

FeatureAptosSui
StorageGlobal resources under addressesObject model
Resource accessmove_to, borrow_global, move_fromPassed as function parameters
UpgradeModule upgrade with compatibility policyPackage upgrade with UpgradeCap
Tokensaptos_framework::coinsui::coin with TreasuryCap
AccountsAccount + AuthenticationKeyNo account concept
Randomnessaptos_framework::randomness (commit-reveal)sui::random

Detection Capabilities

CategoryDetectionSeverity
Resource SafetyResource created but never stored (move_to missing)High
Resource Safetyborrow_global_mut without authorization checkCritical
Resource Safetymove_from extracting resource without ownership proofCritical
Resource SafetyMissing exists<T>(addr) check before accessMedium
AbilitiesValue-holding type with copy ability (duplication)Critical
AbilitiesCapability with drop (can be silently discarded)High
UpgradeModule upgrade authority is single EOAHigh
Upgradecompatible upgrade policy on critical moduleMedium
CoinMintCapability stored in publicly accessible locationCritical
CoinCoinStore registration not checked before depositMedium
AuthMissing signer parameter on privileged entry functionCritical
Authsigner::address_of() not compared to authorized addressHigh
AuthResource account SignerCapability exposed publiclyCritical
StorageTable/SimpleMap with unbounded growthMedium
Storageacquires annotation missing (compile-time, but indicates design)Low
EventsState change without event emissionLow

Aptos Framework Security-Critical Modules

ModuleFunctions to AuditKey Risk
aptos_framework::coininitialize, mint, burn, transfer, registerCap management
aptos_framework::accountcreate_account, rotate_authentication_keyAuth key rotation
aptos_framework::resource_accountcreate_resource_account, retrieve_resource_account_capSigner cap leak
aptos_framework::objectcreate_object, transfer, generate_signerObject ownership
aptos_framework::fungible_assetmint, burn, transfer, deposit, withdrawNew token standard
aptos_framework::multisig_accountcreate, execute_transactionMultisig logic
aptos_framework::staking_contractcreate_staking_contract, distributeReward calculation
aptos_framework::governancecreate_proposal, voteVoting power

Common Aptos Vulnerability Examples

Resource Account Signer Capability Leak
move
// CRITICAL: SignerCapability stored with 'store' ability allows extraction
struct ResourceAccountCap has key, store {
signer_cap: account::SignerCapability,
}
// If anyone can get a reference to this struct, they can create a signer
// for the resource account and drain all its assets
public fun get_resource_signer(cap: &ResourceAccountCap): signer {
account::create_signer_with_capability(&cap.signer_cap)
}
// SAFE: No public accessor, internal only
struct ResourceAccountCap has key {
signer_cap: account::SignerCapability,
}
fun internal_get_signer() acquires ResourceAccountCap {
let cap = borrow_global<ResourceAccountCap>(@resource_addr);
let signer = account::create_signer_with_capability(&cap.signer_cap);
// Use signer internally only
}
Coin Registration Race Condition
move
// VULNERABLE: Depositing without checking CoinStore registration
public fun distribute_rewards(recipients: &vector<address>) {
let i = 0;
while (i < vector::length(recipients)) {
let addr = *vector::borrow(recipients, i);
// ABORTS if addr doesn't have CoinStore<RewardToken> registered!
coin::deposit(addr, reward_coins);
i = i + 1;
};
}
// SAFE: Check registration first
public fun distribute_rewards(recipients: &vector<address>) {
let i = 0;
while (i < vector::length(recipients)) {
let addr = *vector::borrow(recipients, i);
if (coin::is_account_registered<RewardToken>(addr)) {
coin::deposit(addr, reward_coins);
} else {
// Handle: skip, queue for later, or register for them
};
i = i + 1;
};
}

Resources

Workflows

See Also

Error Code Reference

Aptos-specific error codes and framework abort codes. Aptos uses the Move abort system with standard error categories.

Aptos Error Categories (std::error)
CategoryConstantHex PrefixMeaning
INVALID_ARGUMENT10x1____Bad input parameter
OUT_OF_RANGE20x2____Value outside acceptable range
NOT_FOUND60x6____Resource or item not found
ALREADY_EXISTS80x8____Resource or item already exists
PERMISSION_DENIED50x5____Insufficient permissions
RESOURCE_EXHAUSTED90x9____Limit reached (e.g., max supply)
UNAVAILABLE130xD____Temporarily unavailable
Aptos Framework Errors
Abort CodeModuleMeaning
0x10006coinCoin store not registered for address
0x10007coinInsufficient coin balance
0x80001accountAccount already exists
0x80002accountAccount not found
0x50001tableKey already exists
0x50002tableKey not found
0x60001coinCoin amount is zero
0x90001resource_accountResource account already exists
ENOT_OWNERCommonSigner is not the owner — access control check
ENOT_AUTHORIZEDCommonLacking required authorization
Aptos Token / NFT Errors
Abort CodeModuleMeaning
ETOKEN_NOT_FOUNDtokenToken or collection does not exist
ECOLLECTION_NOT_FOUNDtokenCollection does not exist
EINSUFFICIENT_BALANCEtokenToken balance too low for operation
ENOT_CREATORtokenCaller is not the collection creator
EFIELD_NOT_MUTABLEtokenAttempting to modify immutable field

Troubleshooting

IssueLikely CauseSolution
Global storage vulnerabilities missedScanner doesn't audit borrow_global / move_to patternsMap all global storage operations; check exists<T> before borrow_global and move_to
Resource account risks not flaggedScanner doesn't track SignerCapability lifecycleTrace resource_account::create_resource_account and verify SignerCapability storage/access
Module upgrade attack surface ignoredScanner only checks current codeVerify UpgradePolicy (immutable vs compatible); check who holds the UpgradeCap
View functions not auditedScanner focuses on entry functionsView functions can leak sensitive state; audit all #[view] functions for information disclosure
Event emission gaps not detectedScanner doesn't check event coverageVerify all state-changing operations emit events for off-chain tracking
Coin type confusion not caughtScanner trusts Move type systemVerify all coin operations use correct type parameters; check for CoinType aliasing

Security

  • Security scanPassed, 98 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/aptos-scanner/badge)](https://verified-skill.com/skills/0x-shashi/web3-audit-skills/aptos-scanner)

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