← ClaudeAtlas

auditing-smart-contract-access-controllisted

Audit a smart contract for a privileged action any caller can reach, so an attacker invokes a function that should be restricted. Covers a state-changing or fund-moving function missing an authorization modifier, an ownership or role check that is wrong or bypassable, an unprotected initializer that lets an attacker seize ownership of a proxy or an uninitialized contract, a delegatecall to an attacker-supplied or upgradeable target that runs foreign code in this contract's context, a self-destruct or upgrade reachable without the right role, and a role granted to an address that should not hold it. Use when the fix would add or repair an authorization check, not reorder effects before interactions (that is the reentrancy skill). The attacker calling a privileged function is the source, the restricted action executing for them is the sink, and a missing or defeated authorization check is the bug.
UnboundCompute/security-agent-skills · ★ 4 · AI & Automation · score 80
Install: claude install-skill UnboundCompute/security-agent-skills
# Auditing smart-contract access control: who is allowed to call the privileged function Access control on a contract is a set of gates: a modifier or a check that says only the owner, only a role, only during initialization. The bug is a privileged action, moving funds, changing configuration, upgrading, self-destructing, whose gate is missing, wrong, or reachable by the wrong caller. This is a crowded audit area, so the discipline is confirming the action is genuinely privileged and the gate is genuinely absent or defeated on a reachable path, not flagging every public function. The dividing line from reentrancy: if the fix is to add or repair an authorization check, it belongs here; if the fix is to reorder effects before interactions or add a mutex, it belongs in the reentrancy skill. Two initialization and delegation shapes, the unprotected initializer and the delegatecall to an attacker-controlled target, are access-control bugs and are audited here. ## When to use - A function changes state, moves funds, upgrades, self-destructs, or grants a role. - You see an authorization modifier, an ownership or role check, an initializer, or a delegatecall. - You want to know whether an attacker can reach a privileged action the contract meant to restrict. ## Scope check Audit only contracts you own or are authorized to assess, and exercise a privileged path only on a test network or a local fork, calling an unguarded privileged function on a live contract can seize or destro