entry-point-analyzer
Skill này làm gì
Liệt kê các hàm trong smart contract có thể thay đổi trạng thái, sắp xếp theo người được phép gọi, như công khai, admin hoặc chỉ contract. Dành cho kiểm toán viên mới bắt đầu làm việc trên một contract.
Khi nào nên dùng
- ✓Khi kiểm toán viên bắt đầu một cuộc kiểm toán bảo mật và cần lập bản đồ bề mặt tấn công của contract.
- ✓Khi nhóm muốn xem một contract có những hàm admin hoặc hàm giới hạn theo vai trò nào.
- ✓Khi ai đó muốn biết những hàm nào trong contract có thể thay đổi trạng thái.
Liên kết skill
https://github.com/trailofbits/skills/blob/main/plugins/entry-point-analyzer/skills/entry-point-analyzer/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Lập bản đồ mọi hàm trong smart contract của tôi làm thay đổi trạng thái, nhóm theo người được phép gọi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill tìm trong code các hàm có thể gọi từ bên ngoài và thay đổi trạng thái, và bỏ qua các hàm chỉ đọc. Nó sắp xếp chúng theo mức truy cập và viết một báo cáo có cấu trúc.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Entry Point Analyzer
Systematically identify all state-changing entry points in a smart contract codebase to guide security audits.
Execution in Codex
Use the available file-reading, search, and shell tools. Resolve bundled reference links relative to this SKILL.md, not the audited repository. Slither is optional; use manual inspection if it is unavailable or fails. Report unreadable source or reference files as coverage gaps. Runtime permissions come from the workspace.
When to Use
Use this skill when:
- Starting a smart contract security audit to map the attack surface
- Asked to find entry points, external functions, or audit flows
- Analyzing access control patterns across a codebase
- Identifying privileged operations and role-restricted functions
- Building an understanding of which functions can modify contract state
When NOT to Use
Do NOT use this skill for:
- Vulnerability detection (use audit-context-building or domain-specific-audits)
- Writing exploit POCs (use solidity-poc-builder)
- Code quality or gas optimization analysis
- Non-smart-contract codebases
- Analyzing read-only functions (this skill excludes them)
Scope: State-Changing Functions Only
This skill focuses exclusively on functions that can modify state. Excluded:
| Language | Excluded Patterns |
|---|---|
| Solidity | view, pure functions |
| Vyper | @view, @pure functions |
| Solana | Functions without mut account references |
| Move | Read-only function bodies; visibility alone does not establish mutability |
| TON | get methods (FunC), read-only receivers (Tact) |
| CosmWasm | query entry point and its handlers |
Include state-changing Move public fun even without entry: Aptos transaction
scripts and Sui programmable transaction blocks can reach them. Trace callees when
needed to determine state effects, and record signer, capability, and object
ownership requirements separately from visibility.
Why exclude read-only functions? They cannot directly cause loss of funds or state corruption. While they may leak information, the primary audit focus is on functions that can change state.
Workflow
- Detect Language - Identify contract language(s) from file extensions and syntax
- Use Tooling (if available) - For Solidity, check if Slither is available and use it
- Locate Contracts - Find all contract/module files (apply directory filter if specified)
- Extract Entry Points - Parse each file for externally callable, state-changing functions
- Classify Access - Categorize each function by access level
- Generate Report - Output structured markdown report
Slither Integration (Solidity)
For Solidity codebases, Slither can automatically extract entry points. Before manual analysis:
1. Check if Slither is Available
which slither
2. If Slither is Detected, Run Entry Points Printer
slither . --print entry-points
This outputs a table of all state-changing entry points with:
- Contract name
- Function name
- Visibility
- Modifiers applied
3. Use Slither Output as Foundation
- Parse the Slither output table to populate your analysis
- Cross-reference with manual inspection for access control classification
- Slither may miss some patterns (callbacks, dynamic access control)—supplement with manual review
- If Slither fails (compilation errors, unsupported features), fall back to manual analysis
4. When Slither is NOT Available
If which slither returns nothing, proceed with manual analysis using the language-specific reference files.
Language Detection
| Extension | Language | Reference |
|---|---|---|
.sol |
Solidity | references/solidity.md |
.vy |
Vyper | references/vyper.md |
.rs + Cargo.toml with solana-program |
Solana (Rust) | references/solana.md |
.move + Move.toml with edition |
Move (Sui) | references/move-sui.md |
.move + Move.toml with Aptos |
Move (Aptos) | references/move-aptos.md |
.fc, .func, .tact |
TON (FunC/Tact) | references/ton.md |
.rs + Cargo.toml with cosmwasm-std |
CosmWasm | references/cosmwasm.md |
Load the appropriate reference file(s) based on detected language before analysis.
Access Classification
Classify ea
Câu hỏi thường gặp
Nó có tìm lỗi không?
Không. Nó lập bản đồ bề mặt tấn công. Việc phát hiện lỗ hổng thuộc về một skill kiểm toán khác.
Nó hỗ trợ những ngôn ngữ nào?
Mô tả liệt kê Solidity, Vyper, Solana với Rust, Move, TON và CosmWasm, cùng một số ngôn ngữ khác.
Có cần Slither không?
Không. Slither là tùy chọn, và skill có thể đọc code thủ công nếu không có Slither.
Chi tiết
Mô tả gốc của tác giả
Analyzes smart contract codebases to identify state-changing entry points for security auditing. Detects externally callable functions that modify state, categorizes them by access level (public, admin, role-restricted, contract-only), and generates structured audit reports. Excludes view/pure/read-only functions. Use when auditing smart contracts (Solidity, Vyper, Solana/Rust, Move, TON, CosmWasm) or when asked to find entry points, audit flows, external functions, access control patterns, or privileged operations.
repo: trailofbits/skills
Độ phổ biến
- Sao GitHub
- 8.0k
- Vị trí xếp hạng
- #12677
- Giấy phép
- CC-BY-SA-4.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
audit-context-building
8.0kGiúp agent tìm hiểu một codebase lạ trước khi review bảo mật, lập bản đồ những gì mỗi hàm giả định, đảm bảo và phụ thuộc vào.
algorand-vulnerability-scanner
8.0kGiúp agent quét smart contract Algorand viết bằng TEAL hoặc PyTeal để tìm 11 vấn đề bảo mật phổ biến, như tấn công rekey và phí không được kiểm tra.
audit-prep-assistant
8.0kGiúp agent chuẩn bị codebase cho một đợt review bảo mật bên ngoài, với phân tích tĩnh, độ phủ test, dọn mã chết và tài liệu rõ ràng.
cairo-vulnerability-scanner
8.0kGiúp agent quét smart contract Cairo trên StarkNet để tìm 6 vấn đề nghiêm trọng, gồm tràn số học, thông điệp xuyên lớp rủi ro và replay chữ ký.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.