Some checks are pending
CI — CoM Config Validation / Validate JSON Configs (push) Waiting to run
CI — CoM Config Validation / Validate YAML Configs (push) Waiting to run
CI — CoM Config Validation / Lint Shell Scripts (push) Waiting to run
CI — CoM Config Validation / Secret Detection (push) Waiting to run
CI — CoM Config Validation / Lint Markdown (push) Waiting to run
CI — CoM Config Validation / Validate CODEOWNERS (push) Waiting to run
Public, sanitized mirror of an AI orchestration command center: agents, skills, MCP servers, slash-command workflows. All infrastructure identifiers, hostnames, mesh IPs/subnets, repo paths, maintainer identity, and hardware fleet specifics scrubbed to <placeholders>; session debug logs and host-specific memory removed. No live credentials. Verified clean by automated leak sweep. See SANITIZATION.md. churchofmalware.org . authorized research only
3.4 KiB
3.4 KiB
Move Entry Point Detection (Aptos)
Entry Point Identification (State-Changing Only)
In Move, public functions can be invoked from transaction scripts (Aptos) and typically modify state. In addition, all entry functions are entrypoints. Package-protected (public package) and friend (friend or public friend) functions should be excluded.
Aptos Move
// Public entry functions are entry points
public entry fun transfer(from: &signer, to: address, amount: u64) { }
// Public functions callable by other modules
public fun helper(): u64 { }
// Entry-only functions (can't be called by other modules)
entry fun private_entry(account: &signer) { }
Visibility Rules
| Visibility | Include? | Notes |
|---|---|---|
public entry fun |
Yes | Transaction entry point (state-changing) |
entry fun |
Yes | Transaction-only entry point |
public fun |
No | Module-callable only, not direct entry |
fun (private) |
No | Not externally callable |
public(friend) fun |
No | Friend modules only |
Access Control Patterns
Signer-Based Control (Aptos)
// Admin check via signer
public entry fun admin_action(admin: &signer) {
assert!(signer::address_of(admin) == @admin_address, E_NOT_ADMIN);
}
// Owner check via resource
public entry fun owner_action(owner: &signer) acquires Config {
let config = borrow_global<Config>(@module_addr);
assert!(signer::address_of(owner) == config.owner, E_NOT_OWNER);
}
Capability Pattern (Aptos)
// Capability resource
struct AdminCap has key, store {}
// Requires capability
public entry fun admin_action(admin: &signer) acquires AdminCap {
assert!(exists<AdminCap>(signer::address_of(admin)), E_NO_CAP);
}
Access Control Classification
| Pattern | Classification |
|---|---|
signer::address_of(s) == @admin |
Admin |
signer::address_of(s) == config.owner |
Owner |
exists<AdminCap>(addr) |
Admin (capability) |
exists<GovernanceCap>(addr) |
Governance |
exists<GuardianCap>(addr) |
Guardian |
&signer with no checks |
Review Required |
Contract-Only Detection
Friend Functions
// Only callable by friend modules
public(friend) fun internal_callback() { }
// Friend declaration
friend other_module;
Module-to-Module Patterns
// Functions designed for other modules
public fun on_transfer_hook(amount: u64): bool {
// Called by token module
}
Extraction Strategy
Aptos
- Parse all
.movefiles - Find
moduledeclarations - Extract functions with
public entryorentryvisibility - Check function body for:
signer::address_ofcomparisons → Role-basedexists<*Cap>checks → Capability-based- No access checks → Public (Unrestricted)
Move-Specific Considerations
- Resource Model: Access control often through resource ownership
- Capabilities:
Capsuffix typically indicates capability pattern - Acquires:
acquires Resourceshows what global resources are accessed - Generic Types: Type parameters may carry capability constraints
- Friend Visibility:
public(friend)limits callers to declared friends
Common Gotchas
- Init Functions:
initorinitializeoften create initial capabilities - Module Upgrades: Check upgrade capability ownership
- Phantom Types: Type parameters with
phantomdon't affect runtime