Co-Pilot / 辅助式
更新于 a month ago

entry-point-analyzer

Ttrailofbits
1.8k
trailofbits/skills/plugins/entry-point-analyzer
84
Agent 评分

💡 摘要

自动识别智能合约中的状态改变入口点,以便进行安全审计。

🎯 适合人群

智能合约审计员区块链开发者安全研究人员合规官区块链项目经理

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析中风险

风险:Medium。建议检查:文件读写范围与路径穿越风险。以最小权限运行,并在生产环境启用前审计代码与依赖。

Entry Point Analyzer

A Claude skill for systematically identifying state-changing entry points in smart contract codebases to guide security audits.

Purpose

When auditing smart contracts, examining each file or function individually is inefficient. What auditors need is to start from entry points—the externally callable functions that represent the attack surface. This skill automates the identification and classification of state-changing entry points, excluding view/pure/read-only functions that cannot directly cause loss of funds or state corruption.

Supported Languages

| Language | File Extensions | Framework Support | |----------|-----------------|-------------------| | Solidity | .sol | OpenZeppelin, custom modifiers | | Vyper | .vy | Native patterns | | Solana | .rs | Anchor, Native | | Move | .move | Aptos, Sui | | TON | .fc, .func, .tact | FunC, Tact | | CosmWasm | .rs | cw-ownable, cw-controllers |

Access Classifications

The skill categorizes entry points into four levels:

  1. Public (Unrestricted) — Callable by anyone; highest audit priority
  2. Role-Restricted — Limited to specific roles (admin, governance, guardian, etc.)
  3. Review Required — Ambiguous access patterns needing manual verification
  4. Contract-Only — Internal integration points (callbacks, hooks)

Output

Generates a structured markdown report with:

  • Summary table of entry point counts by category
  • Detailed tables for each access level
  • Function signatures with file:line references
  • Restriction patterns and role assignments
  • List of analyzed files

Usage

Trigger the skill with requests like:

  • "Analyze the entry points in this codebase"
  • "Find all external functions and access levels"
  • "List audit flows for src/core/"
  • "What privileged operations exist in this project?"

Directory Filtering

Specify a subdirectory to limit scope:

  • "Analyze only src/core/"
  • "Find entry points in contracts/protocol/"

Role Detection

The skill infers roles from common patterns:

| Pattern | Detected Role | |---------|---------------| | onlyOwner, msg.sender == owner | Owner | | onlyAdmin, ADMIN_ROLE | Admin | | onlyGovernance, governance | Governance | | onlyGuardian, onlyPauser | Guardian | | onlyKeeper, onlyRelayer | Keeper/Relayer | | onlyStrategy, strategist | Strategist | | Dynamic checks (authorized[msg.sender]) | Review Required |

Installation

/plugin install trailofbits/skills/plugins/entry-point-analyzer

License

See LICENSE.txt for terms.

五维分析
清晰度9/10
创新性8/10
实用性9/10
完整性8/10
可维护性8/10
优缺点分析

优点

  • 简化审计过程。
  • 对入口点进行分类以便更好地关注。
  • 支持多种区块链语言。
  • 生成详细报告。

缺点

  • 可能需要手动验证模糊模式。
  • 仅限于特定的区块链语言。
  • 依赖于准确的角色检测。
  • 初始设置可能较复杂。

相关技能

building-secure-contracts

A
toolCo-Pilot / 辅助式
88/ 100

“看起来很能打,但别让配置把人劝退。”

spec-to-code-compliance

A
toolCo-Pilot / 辅助式
84/ 100

“看起来很能打,但别让配置把人劝退。”

pytorch

S
toolCode Lib / 代码库
92/ 100

“它是深度学习的瑞士军刀,但祝你好运能从47种安装方法里找到那个不会搞崩你系统的那一个。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 trailofbits.