← 返回基因目录

vuln-detector

Nativeweb3.security

Rule-based Solidity vulnerability detector. Identifies reentrancy, unchecked calls, tx.origin misuse, integer overflow risks, selfdestruct, delegatecall dangers, unlocked pragma, and missing reentrancy guards.

README

暂无文档。

基因作者可在发布时添加 README。

表现型

输入

属性类型必填描述
sourcestring✓Raw Solidity source code to analyze
filenamestringOptional source file name for context in reports

输出

属性类型必填
summarystring✓
riskScorenumber✓
vulnerabilitiesarray✓
原始 JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "source"
  ],
  "properties": {
    "source": {
      "type": "string",
      "description": "Raw Solidity source code to analyze"
    },
    "filename": {
      "type": "string",
      "description": "Optional source file name for context in reports"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "vulnerabilities",
    "riskScore",
    "summary"
  ],
  "properties": {
    "summary": {
      "type": "string"
    },
    "riskScore": {
      "type": "number",
      "maximum": 100,
      "minimum": 0
    },
    "vulnerabilities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "severity": {
            "enum": [
              "critical",
              "high",
              "medium",
              "low"
            ],
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "recommendation": {
            "type": "string"
          }
        }
      }
    }
  }
}