agents/skills/aptos/centralization-risk/SKILL.md
Trigger Protocol has privileged roles (admin, operator, governance, resource account owner) - Covers Single points of failure, privilege escalation, external governance dependen...
npx skillsauth add plamentsv/plamen centralization-riskInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Trigger: Protocol has privileged roles (admin, operator, governance, resource account owner) Covers: Single points of failure, privilege escalation, external governance dependencies Required: NO (optional -- recommended when protocol has 3+ distinct privileged roles) Inject Into: Breadth agents
admin|owner|operator|governance|signer_cap|SignerCapability|resource_account|
has_role|is_admin|only_admin|assert_admin|get_signer
Aptos Move uses a capability-based access control model fundamentally different from EVM modifiers:
&signer and check signer::address_of(account) == @adminSignerCapability stored in resources grants signing rights to resource accountsassert! checks inside function bodiesSignerCapability rather than a private keyObject<T> has an owner chain; ownership transfers control accessEnumerate ALL capability-gated functions by searching for signer checks and capability usage:
| # | Function | Module | Access Gate | What It Controls | Impact If Abused |
|---|----------|--------|------------|------------------|-----------------|
| 1 | {func} | {module} | assert!(addr == @admin) | {parameter/state} | {worst case} |
| 2 | {func} | {module} | SignerCapability stored in {resource} | {operation} | {worst case} |
| 3 | {func} | {module} | Object<T> ownership check | {asset control} | {worst case} |
MANDATORY GREP: Search all .move files for:
signer::address_of followed by equality checksSignerCapability usage (creation, storage, account::create_signer_with_capability)object::is_owner and ownership assertions@admin, @operator, @governance, @protocol)Categorize each by impact:
Map the capability hierarchy:
| Role/Capability | Granted By | Can Delegate? | Stored Where? | Revocable? | Timelock? |
|----------------|-----------|---------------|--------------|-----------|-----------|
| Admin signer | Deployment (named address) | NO (fixed) | N/A -- address-based | NO (immutable) | NO |
| SignerCapability | account::create_resource_account | YES (if stored with store) | {resource at @addr} | {depends on module logic} | {YES/NO} |
| Object owner | object::transfer | YES (transfer ownership) | Object metadata | YES (transfer away) | NO |
Aptos-specific checks:
SignerCapability be duplicated? (if the resource containing it has copy ability -- CRITICAL)For each privileged role:
| Role | Key Compromise Impact | Mitigation | Residual Risk | |------|----------------------|------------|---------------| | @admin (EOA) | {what attacker can do} | {multisig? module-level checks?} | {what remains} | | Resource account | {what attacker can do if SignerCapability leaked} | {capability stored in immutable resource?} | {what remains} | | Object owner | {what attacker can do with object control} | {ownership transfer gated?} | {what remains} |
Severity assessment:
immutable -> eliminates UPGRADE_CONTROL risk entirelyAptos-specific risk: SignerCapability is the most dangerous capability -- it grants FULL control over the resource account, including publishing modules and transferring all assets. If the resource containing the capability has improper access control, it is equivalent to leaking a private key.
Identify parameters or behaviors controlled by EXTERNAL governance:
| Dependency | External Entity | What They Control | Protocol Impact If Changed | Notification? | |------------|----------------|-------------------|---------------------------|---------------| | {dep} | {entity} | {parameter/behavior} | {impact on this protocol} | YES/NO |
Aptos-specific patterns:
aptos_framework parameters controlled by Aptos governance (staking, gas, transaction limits)compatible policy -- new abort conditions, changed behaviorCheck:
Document emergency/pause capabilities:
| Emergency Function | Who Can Call | What It Affects | Recovery Path | Time to Recover | |-------------------|-------------|-----------------|---------------|-----------------| | {func} | {role/address} | {scope} | {how to resume} | {estimate} |
Aptos-specific checks:
immutable and paused -> permanent freeze? (no upgrade possible){CONTRACTS} -- List of modules to analyze
{ADMIN_ADDRESSES} -- Named addresses with privileged access (@admin, @operator, etc.)
{CAPABILITY_RESOURCES} -- Resources that store SignerCapability or other capabilities
{EXTERNAL_DEPS} -- External modules with governance dependencies
## Finding [CR-N]: Title
**Verdict**: CONFIRMED / PARTIAL / REFUTED
**Step Execution**: check1,2,3,4,5 | X(reason) | ?(uncertain)
**Severity**: Critical/High/Medium/Low/Info
**Location**: module::function (source_file.move:LineN)
**Centralization Type**: FUND_CONTROL / PARAMETER_CONTROL / OPERATIONAL_CONTROL / UPGRADE_CONTROL
**Affected Role**: {role_name / address / capability}
**Mitigation Present**: {multisig/timelock/immutable module/NONE}
**Description**: What is wrong
**Impact**: What can happen if role is compromised or acts maliciously
**Recommendation**: How to mitigate (add timelock module, separate capabilities, publish immutable)
development
Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project documentation checks. Generates a scored Audit Readiness Report and optionally runs static analysis. Trigger on: "prepare for audit", "audit readiness", "pre-audit check", "audit prep", "NatSpec check", or any request to review a Solidity codebase before a security review.
development
Launch the Plamen deterministic Web3 security audit pipeline
development
Run the Plamen smart-contract audit wizard in Codex
testing
Launch the Plamen deterministic L1 infrastructure audit pipeline