omermaksutii/rugproof/access-control
Claude Code and agent skill by omermaksutii/rugproof
- community
Checking that the SKILL.md file is still in the repository.
Detect missing or incorrect access control — missing modifiers, wrong role checks, privileged function exposure, public initializers, and role-escalation paths. Activate on any function that mutates state, transfers funds, mints tokens, sets admin parameters, upgrades implementations, or pauses/unpauses.
Install
npx vskill@latest install omermaksutii/rugproof/access-controlSKILL.md
The same SKILL.md was published earlier as iktok90-design/ai-smart-contract-auditor/access-control.
Access control detection
When this applies
Any state-mutating function. In particular:
- Functions modifying balances, totalSupply, allowances, prices, fees
setOwner,transferOwnership,grantRole,setAdmin,setMinter- Upgrade pathways:
upgradeTo,_authorizeUpgrade, proxy admins - Pause/unpause, emergency-withdraw, sweep, recoverERC20
- Initializers (
initialize,__Init,_init) - Functions guarded only by
msg.sender == tx.originor address checks against a single static value - Bridges, governors, vaults, anything with treasury
Detection patterns
Missing modifier (CRITICAL)
Wrong role check (HIGH)
Initializer left public (CRITICAL)
See also: [[initialization]]
tx.origin auth (HIGH)
Public privileged getter masking setter
Sometimes a setter is internal but a public wrapper exists with weak checks. Search for "alternate paths" to the same state slot.
Role admin self-grant (HIGH)
DEFAULT_ADMIN_ROLE can grant itself any role. If the admin is an EOA, a single key compromises everything. Look for renounceable admin patterns or multi-sig requirements.
selfdestruct reachable without ownership check (CRITICAL — but see [[selfdestruct-eip6780]])
Sweep / recoverERC20 with no asset allowlist (MEDIUM-HIGH)
Critical if it can sweep user deposits, Medium if only stuck airdrops.
Severity rubric
| Pattern | Severity | |
|---|---|---|
| Privileged mint/burn with no auth | Critical | |
Public initialize on a deployed proxy | Critical | |
| Owner sweep that includes user deposits | Critical | |
| Wrong role guards a sensitive op | High | |
tx.origin auth | High | |
| Centralized single-key admin with no timelock | High (see [[centralization-risk]]) | |
| Renounced ownership but admin role retained | Medium | |
| Missing zero-address check on role grant | Low |
Remediation patterns
- Use
OwnableUpgradeable/AccessControlUpgradeablefrom OZ — never roll your own. - For each function: state the one role that should call it as a comment, then add the matching modifier.
- Initializers:
_disableInitializers()in the constructor,initializermodifier on init. - Multi-sig + timelock on
DEFAULT_ADMIN_ROLE. Document the timelock duration. - Two-step ownership transfer (
Ownable2Step) to prevent locking out the contract. - For sweeps: explicit allowlist of recoverable tokens, or
denylistuser-deposit tokens.
False-positive notes
- Internal functions called only from properly-guarded externals are fine — verify call sites.
- A function may look unguarded but its only side-effect is emitting an event — Info, not High.
- "Permissionless" by design (e.g.
claim()for caller) is fine — verify intent against the spec.
Related
- [[initialization]] — initializer-specific access control
- [[centralization-risk]] — admin-power audit
- [[delegatecall-risks]] — proxy upgrade authorization
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/access-control/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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
[](https://verified-skill.com/skills/omermaksutii/rugproof/access-control)