Files
nexus/wiki/concepts/Static-Analysis.md
2026-04-21 00:02:55 +08:00

1.2 KiB
Raw Blame History

title, type, tags, sources, last_updated
title type tags sources last_updated
Static Analysis concept
smart-contract
security
tools
blockchain-security-auditor
2026-04-20

Definition

静态分析Static Analysis是通过分析代码结构而不执行程序来检测漏洞的方法是智能合约安全审计的第一道防线。

Tools in Ecosystem

  • SlitherTrail of Bits 开发Python 实现
  • MythrilConsensys Diligence 开发,符号执行
  • Medusa:二进制模糊测试框架
  • Semgrep:通用代码分析工具

Slither Detectors

严重级别 检测器
High reentrancy-eth, suicidal, controlled-delegatecall
Medium reentrancy-benign, timestamp, low-level-calls
Low naming-convention, unused-state

Limitations

  • 只能发现约 30% 的真实漏洞
  • 漏报率高false negatives
  • 逻辑漏洞和经济漏洞难以发现
  • 依赖工具更新维护

Best Practice

  • 静态分析作为第一轮扫描
  • 人工审查作为主要手段
  • 属性测试补充验证

Connections