bittersecurity/vigilo/access-control
Claude Code and agent skill by bittersecurity/vigilo
- community
Checking that the SKILL.md file is still in the repository.
Auto-loaded by access-control-auditor agent during Phase 2. Provides detection patterns for: missing modifiers, privilege escalation, tx.origin phishing, OR/AND logic errors, missing two-step transfer. Core artifact: Permission Matrix.
Install
npx vskill@latest install bittersecurity/vigilo/access-controlSKILL.md
The same SKILL.md was published earlier as bittersecurity/vigilo/access-control.
Access Control Vulnerability Analysis
OWASP SC01:2025 - Access Control is #1 vulnerability class in OWASP Smart Contract Top 10 (2025), with $1.2B+ in cumulative losses through 2025, including the Bybit hack ($1.4B) and multiple privilege escalation exploits.
Why Access Control Bugs Happen (Root Causes)
Understanding root causes helps detect vulnerabilities more effectively.
Root Cause 1: Intent-Implementation Gap
Developer thinks "only admin can call this" but forgets to add modifier.
Detection: Find external/public functions without modifiers, then verify intent.
Root Cause 2: Visibility ≠ Permission
external/public means "anyone can call" - not a permission system.
Detection: Every state-changing external/public function needs explicit permission checks.
Root Cause 3: Undefined Trust Boundary
Who is "admin"? What can they do? Often undocumented.
Detection: Map all admin powers. Flag undocumented capabilities as centralization risks.
Root Cause 4: Broken Permission Hierarchy
Admin can create admins → single key compromise = total system takeover.
Detection: Trace role grant paths. Flag self-granting or circular hierarchies.
The Permission Matrix (Core Artifact)
Build this for every contract:
| Contract | Function | Sensitivity | Required Role | Actual Check | Gap? | |
|---|---|---|---|---|---|---|
| Vault | withdraw | CRITICAL | User (own funds) | None | YES | |
| Vault | setFee | HIGH | Admin | onlyOwner | No | |
| Vault | pause | HIGH | Guardian | onlyAdmin | WRONG ROLE | |
| Token | mint | CRITICAL | Minter | None | YES |
Sensitivity Classification
| Level | Examples | Impact if Missing | |
|---|---|---|---|
| CRITICAL | withdraw, transfer, mint, upgrade | Direct fund loss | |
| HIGH | pause, setFee, setOracle | Protocol malfunction | |
| MEDIUM | setParameter, whitelist | Degraded operation | |
| LOW | view, pure functions | Information leak |
Detection Patterns
Pattern 1: Missing Access Control
Root Cause: Intent-Implementation Gap
Search Queries:
Verification Questions:
- Does this function modify state?
- Is there a modifier or require statement?
- What is the intended caller?
Pattern 2: Privilege Escalation
Root Cause: Broken Permission Hierarchy
Search Queries:
Verification Questions:
- Can a role grant itself or other roles?
- Is there a role hierarchy (admin > moderator > user)?
- What happens if the top role is compromised?
Pattern 3: tx.origin Phishing
Root Cause: Confusing transaction origin with message sender
Search Queries:
Verification Questions:
- Is tx.origin used for authorization?
- Can an attacker trick the owner into calling a malicious contract?
Pattern 4: Incorrect Permission Logic (OR vs AND)
Root Cause: Logic error in permission checks
Search Queries:
Verification Questions:
- Should this be AND or OR?
- What is the minimum permission needed?
- Can the condition be bypassed?
Pattern 5: Missing Two-Step Transfer
Root Cause: No confirmation for critical ownership changes
Search Queries:
Verification Questions:
- Is ownership transfer single-step or two-step?
- What happens if wrong address is provided?
- Is there a timelock for ownership changes?
Pattern 6: Role Hierarchy Exploitation (OpenZeppelin)
Root Cause: Misunderstanding of AccessControl patterns
Search Queries:
Verification Questions:
- Who holds DEFAULT_ADMIN_ROLE?
- Is there a two-step admin transfer?
- Can admin roles be renounced?
Pattern 7: ERC-4337 Account Abstraction Vulnerabilities
Root Cause: Misunderstanding of EntryPoint trust model and Paymaster authorization
Search Queries:
Verification Questions:
- Is the EntryPoint address hardcoded and canonical?
- Does Paymaster validate that msg.sender is EntryPoint?
- Does Account validate that msg.sender is EntryPoint?
- Can Paymaster be called directly by attackers?
- Does Paymaster check userOp.sender (account contract)?
- Is there a whitelist of trusted Paymasters?
- Can bundlers manipulate gas prices or limits?
- Is signature validation done correctly (UserOp hash vs transaction hash)?
Line-by-Line Verification Checklist
For each external/public function:
- [ ] Does this function modify state?
- [ ] Is there a modifier applied?
- [ ] Does the modifier check the correct role?
- [ ] Can the require/revert condition be bypassed?
- [ ] Who is the intended caller? Is this documented?
- [ ] What is the worst case if anyone can call this?
ERC-4337 Specific Checks (if applicable)
- [ ] Is EntryPoint address hardcoded and canonical?
- [ ] Does Paymaster validate msg.sender == EntryPoint?
- [ ] Does Account validate msg.sender == EntryPoint?
- [ ] Can Paymaster be called directly by non-EntryPoint callers?
- [ ] Does Paymaster validate userOp.sender (account contract)?
- [ ] Is there a whitelist of trusted Paymasters?
- [ ] Can bundlers manipulate gas prices or operation limits?
- [ ] Is signature validation using correct hash (UserOp vs transaction)?
Centralization Risk Assessment
Document admin powers that can harm users:
| Admin Power | Risk Level | Impact | |
|---|---|---|---|
| Pause withdrawals | High | Users locked out | |
| Change fee to 100% | Critical | Rug pull | |
| Upgrade implementation | Critical | Arbitrary code execution | |
| Mint unlimited tokens | Critical | Inflation attack | |
| Whitelist addresses | Medium | Censorship | |
| Change oracle | Critical | Price manipulation |
Flag as finding if:
- Power is undocumented
- No timelock protection
- Single key (not multisig)
Search Query Reference
Rationalization Table (Reject These Excuses)
| Excuse | Reality | |
|---|---|---|
| "It's an internal function" | Internal functions can be called via public entry points | |
| "Only admin can call this" | Admin keys get compromised; document the risk | |
| "This is by design" | Document it as centralization risk if undocumented | |
| "Low likelihood" | Access control bugs caused $953M in losses | |
| "I'll check later" | Check NOW or miss critical vulnerabilities | |
| "The modifier exists somewhere" | Verify it's actually applied to THIS function | |
| "Frontend prevents this" | On-chain must be secure standalone |
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 repositoryCheckingpackages/opencode/skills/access-control/SKILL.md
Popularity
- Repository stars
- 67
- Repository forks
- 19
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (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/bittersecurity/vigilo/access-control)