.claude/skills/solidity-guard/skills/entry-point-analyzer/SKILL.md
Analyzes Solidity contract entry points to map attack surface. Identifies all external/public functions, categorizes by privilege level, maps access control, and detects authorization patterns. Use as first step in any audit.
npx skillsauth add alt-research/solidityguard entry-point-analyzerInstall 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.
Map the complete attack surface of Solidity contracts by analyzing all entry points. This is the essential first step in any security audit.
# Check for Foundry
ls foundry.toml
# Check for Hardhat
ls hardhat.config.js hardhat.config.ts
# Check Solidity version
rg "pragma solidity" contracts/
# Find all external/public functions
rg "function.*external|function.*public" contracts/ --type sol
# Find all state-changing functions
rg "function.*(external|public)" contracts/ -A 5
# Find constructors and initializers
rg "constructor|initialize" contracts/
| Category | Examples | Risk Level | |----------|----------|------------| | Admin | initialize, setAdmin, pause, upgrade | CRITICAL | | Financial | deposit, withdraw, transfer, swap, borrow | CRITICAL | | State Mutation | update, set, modify, approve | HIGH | | View/Pure | get, view, balanceOf, totalSupply | LOW | | User Action | claim, stake, vote, mint | MEDIUM |
For each function, extract:
## Function: withdraw(uint256 amount)
- **Visibility**: external
- **Modifiers**: onlyOwner, nonReentrant
- **State Changes**: balances mapping, totalDeposits
- **External Calls**: token.transfer()
- **Events**: Withdrawal(sender, amount)
- **Risk Level**: CRITICAL
┌─────────────────────────────────────────────┐
│ OWNER ONLY │
│ pause(), unpause(), setFee(), upgrade() │
├─────────────────────────────────────────────┤
│ AUTHORIZED ROLES │
│ withdraw(), liquidate(), harvest() │
├─────────────────────────────────────────────┤
│ ANY USER │
│ deposit(), swap(), getPrice() │
└─────────────────────────────────────────────┘
# Entry Point Analysis: [Contract Name]
## Contract Information
- **Name**: [Contract Name]
- **Address**: [If deployed]
- **Framework**: Foundry / Hardhat
- **Solidity Version**: [Version]
- **Inheritance Chain**: [Parent contracts]
## Functions Summary
| Function | Visibility | Modifiers | State Changes | Risk |
|----------|-----------|-----------|---------------|------|
| initialize | external | initializer | owner, settings | CRITICAL |
| deposit | external | nonReentrant | balances, supply | CRITICAL |
| withdraw | external | onlyOwner | balances, supply | CRITICAL |
| getBalance | view | — | none | LOW |
## Attack Surface Map
### Critical Entry Points (Require Deep Review)
1. `withdraw` - Fund extraction, reentrancy risk
2. `initialize` - Proxy initialization, reinit risk
3. `swap` - Price manipulation, slippage
### Red Flags
- [ ] Function with no access modifier
- [ ] Financial operation without nonReentrant
- [ ] Admin function without timelock
- [ ] Unprotected initializer
- [ ] Missing zero-address checks
tools
Advanced Solidity/EVM smart contract security auditor with 104 vulnerability patterns, multi-tool integration, and professional report generation.
development
Comprehensive Solidity contract security scanner detecting 104 vulnerability patterns across reentrancy, access control, arithmetic, DeFi, proxy, and token categories. Integrates Slither, Aderyn, and Mythril with manual analysis.
testing
Analyzes storage layout, proxy patterns, and state variable security in Solidity contracts. Detects storage collisions, uninitialized pointers, and upgrade risks. Use when auditing proxy/upgradeable contracts.
development
Validates Solidity implementation against specification documents. Extracts behavior from docs (README, specs, NatSpec) and verifies code matches documented intent. Uses Trail of Bits methodology for divergence detection.