360 Secure SkillHub
360 安全技能中心

Smart Contract Audit

核心功能:基于清单检测权限控制、重入、会计正确性等多类风险,生成含风险分级、影响说明及修复建议的结构化审计报告。典型场景:价值合约部署前、合约逻辑变更后、集成外部协议时。输入需提供合约文件范围,可选威胁模型、部署假设,输出为标准化审计报告。

mzfshark
mzfshark
热度 36.59
最近更新 2026-05-11 17:45:41
分类:开发依赖:读写文件 / 内部调用大模型应用场景:代码审查 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add axodus-smartcontracts-audits
Metadata
name
smart-contract-audit
description
Audit Solidity contracts for common vulnerabilities and design risks.
metadata
{"author":"RedHat Dev","version":"1.0.0","owner":"RedHat Dev Agent","category":"blockchain"}

SKILL: smart-contract-audit

Purpose

Perform a deterministic, evidence-based vulnerability review of Solidity contracts and produce a prioritized audit report with concrete fixes.

When to Use

  • Before any deployment (even testnet) of value-bearing contracts.
  • After changing access control, external calls, accounting, or token logic.
  • When integrating with external protocols.

Inputs

  • scope (required, string[]): contract files and dependencies.
  • threat_model (optional, string): assets at risk, attacker capabilities, trust assumptions.
  • deployment_assumptions (optional, string): upgradeability, admin keys, multisig/DAO governance.

Steps

  1. Map the system:
    • entrypoints (public/external)
    • privileged roles
    • external calls and token transfers
  2. Run checklist-based review:
    • access control (missing/overbroad roles)
    • reentrancy surfaces (external calls, callbacks)
    • accounting correctness (under/overflow, rounding, precision, fee logic)
    • ERC standard compliance (events, return values)
    • upgradeability hazards (storage layout, initializer patterns)
    • DoS vectors (unbounded loops, griefing)
  3. Identify invariants and where they can break.
  4. Produce findings with reproduction notes and recommended fixes.

Validation

  • Every finding includes:
    • impacted function(s)
    • why it’s exploitable or risky
    • concrete remediation guidance
  • Non-issues are explicitly marked as “informational” when needed.

Output

Audit report (example schema):

summary: "<system overview + top risks>"
findings:
  - id: "SC-001"
    severity: "critical|high|medium|low|info"
    title: "<short>"
    location: ["contracts/X.sol:123"]
    description: "<what is wrong>"
    impact: "<what can happen>"
    recommendation: "<how to fix>"
assumptions: ["..."]

Safety Rules

  • Do not provide exploit code for real targets.
  • Do not claim “secure” or “audited” as an absolute; report risk and evidence.
  • Escalate to stricter review if funds or governance are at stake.

Example

Scope: ["contracts/Vault.sol", "contracts/Token.sol"] Output: includes reentrancy review of withdraw() and role boundaries for setFee().