Xpersona
S

Security Defense Line 安全防线

CLAWHUB · Unverified

安全防线 - 全方位安全防护与威胁防御系统。 当用户需要以下功能时触发此skill: (1) 智能合约安全审计与漏洞检测 (2) 钱包安全检测与防护 (3) 交易安全验证与风险预警 (4) 钓鱼网站/诈骗检测 (5) 私钥/助记词安全管理 (6) 多签钱包配置与管理 (7) 安全事件响应与应急处理 (8) 安全策... Skill: Security Defense Line 安全防线 Owner: shenmeng Summary: 安全防线 - 全方位安全防护与威胁防御系统。 当用户需要以下功能时触发此skill: (1) 智能合约安全审计与漏洞检测 (2) 钱包安全检测与防护 (3) 交易安全验证与风险预警 (4) 钓鱼网站/诈骗检测 (5) 私钥/助记词安全管理 (6) 多签钱包配置与管理 (7) 安全事件响应与应急处理 (8) 安全策... Tags: latest:2025.4.15 Version history: v2025.4.15 | 2026-04-15T05:11:16.851Z | auto No changes were detected in this version. - No updates to code or documentation. - Functionality remains the same a

62
Rank
84
Safety
1.5k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s176scxxt9cxw1s0gqyexga8hd83qc4r:shenmeng-security-defense-line
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-shenmeng-shenmeng-security-defense-line/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

147,149 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: security-defense-line
description: |
  安全防线 - 全方位安全防护与威胁防御系统。
  当用户需要以下功能时触发此skill:
  (1) 智能合约安全审计与漏洞检测
  (2) 钱包安全检测与防护
  (3) 交易安全验证与风险预警
  (4) 钓鱼网站/诈骗检测
  (5) 私钥/助记词安全管理
  (6) 多签钱包配置与管理
  (7) 安全事件响应与应急处理
  (8) 安全策略制定与合规检查
---

# Security Defense Line

> 💰 **本 Skill 已接入 SkillPay 付费系统**
> - 每次调用费用:**0.01 USDT**
> - 支付方式:BNB Chain USDT
> - 请先确保账户有足够余额

安全防线 — 守护数字资产,构筑安全堡垒

## 核心能力

### 1. 智能合约安全审计
- **静态分析** - Slither、Mythril、Aderyn自动扫描
- **漏洞检测** - 重入攻击、溢出、权限控制等
- **Gas优化** - 效率分析、成本优化建议
- **代码规范** - Solidity/ Rust最佳实践检查
- **依赖审计** - 第三方库安全评估
- **形式化验证** - 关键逻辑数学证明

### 2. 钱包安全检测
- **地址安全** - 黑名单检查、关联风险分析
- **私钥强度** - 熵值检测、弱密钥识别
- **助记词安全** - 泄露检测、生成验证
- **硬件钱包** - 固件验证、连接安全
- **热钱包防护** - 隔离策略、访问控制
- **备份验证** - 恢复测试、存储安全

### 3. 交易安全验证
- **交易预执行** - 模拟执行、结果预览
- **权限检查** - 授权额度、无限授权检测
- **价格影响** - 滑点分析、MEV风险评估
- **合约验证** - 目标合约安全评级
- **异常检测** - 可疑模式识别
- **多重确认** - 大额交易额外验证

### 4. 钓鱼与诈骗防护
- **域名验证** - 仿冒网站识别
- **URL分析** - 恶意链接检测
- **社交工程** - 诈骗话术识别
- **空投陷阱** - 虚假空投识别
- **假客服** - 冒充官方检测
- **二维码安全** - 恶意二维码扫描

### 5. 私钥与助记词管理
- **生成验证** - 真随机数检测
- **分层派生** - HD钱包路径验证
- **分片存储** - Shamir秘密共享
- **多重备份** - 多地备份策略
- **恢复演练** - 定期恢复测试
- **紧急冻结** - 泄露响应机制

### 6. 多签钱包管理
- **方案设计** - M-of-N策略制定
- **成员管理** - 签名者增删改
- **日常操作** - 发起、签名、执行
- **紧急处理** - 社会恢复、紧急转移
- **权限分层** - 操作权限分级
- **审计日志** - 完整操作记录

### 7. 安全事件响应
- **事件检测** - 异常行为监控
- **紧急冻结** - 资产快速锁定
- **损失评估** - 影响范围分析
- **取证分析** - 攻击链还原
- **恢复计划** - 系统重建方案
- **事后复盘** - 改进建议生成

### 8. 安全策略与合规
- **安全基线** - 最低安全配置
- **定期检查** - 自动化安全扫描
- **员工培训** - 安全意识提升
- **合规检查** - 法规要求对照
- **保险配置** - 安全保险建议
- **文档管理** - 安全策略文档

## 使用工作流

### 快速开始

```bash
# 1. 审计智能合约
python scripts/contract_auditor.py --address 0x... --network ethereum

# 2. 检测钱包安全
python scripts/wallet_guardian.py --address 0x... --full-scan

# 3. 验证交易安全
python scripts/tx_validator.py --tx-hash 0x... --simulate

# 4. 检查钓鱼风险
python scripts/phishing_detector.py --url https://suspicious-site.com

# 5. 管理多签钱包
python scripts/multisig_manager.py --wallet 0x... --operation status

# 6. 启动安全监控
python scripts/security_monitor.py --monitor-all --alert-telegram
```

### 配置示例

```yaml
# config/security_config.yaml
security:
  # 审计配置
  audit:
    tools:
      - slither
      - mythril
      - aderyn
    severity_threshold: medium
    fail_on_critical: true
  
  # 监控配置
  monitoring:
    wallets:
      - address: "0x..."
        name: "Main Wallet"
        alert_threshold: 1.0  # ETH
    
    contracts:
      - address: "0x..."
        name: "DeFi Position"
        events: ["Withdraw", "EmergencyShutdown"]
  
  # 告警配置
  alerts:
    telegram:
      enabled: true
      bot_token: "${TELEGRAM_BOT_TOKEN}"
      chat_id: "${TELEGRAM_CHAT_ID}"
    
    email:
      enabled: true
      smtp_server: "smtp.gmail.com"
      to: "security@example.com"
  
  # 防护规则
  protection:
    max_slippage: 3  # %
    max_gas_price: 500  # gwei
    block_suspicious_contracts: true
    require_confirmation_above: 10  # ETH
```

## 脚本说明

### scripts/contract_auditor.py
智能合约审计器

``

_meta.json

{
  "ownerId": "kn71568gr0p3240v36pag6f7rx83qbb2",
  "slug": "shenmeng-security-defense-line",
  "version": "2025.4.15",
  "publishedAt": 1776229876851
}

references/contract-auditing.md

# 智能合约安全审计技术手册

## 常见漏洞类型

### 1. 重入攻击 (Reentrancy)

**漏洞描述**
合约在转账后更新状态,攻击者可递归调用。

**检测代码**
```python
def detect_reentrancy(code: str) -> List[Dict]:
    """检测重入漏洞"""
    issues = []
    
    # 模式:转账后没有更新状态
    patterns = [
        r'(call|send|transfer)\([^)]+\).*\n.*[^=]=',  # 转账后赋值
        r'function\s+\w+.*\{[^}]*call[^}]*\}',  # 函数中包含call
    ]
    
    for pattern in patterns:
        matches = re.finditer(pattern, code, re.DOTALL)
        for match in matches:
            issues.append({
                'type': 'REENTRANCY',
                'severity': 'CRITICAL',
                'line': code[:match.start()].count('\n') + 1,
                'description': 'Potential reentrancy vulnerability detected',
                'fix': 'Use Checks-Effects-Interactions pattern and ReentrancyGuard'
            })
    
    return issues
```

**防护方案**
```solidity
// 使用检查-生效-交互模式
function withdraw() public {
    uint256 amount = balances[msg.sender];
    require(amount > 0, "No balance");
    
    // 先更新状态
    balances[msg.sender] = 0;
    
    // 再转账
    (bool success, ) = msg.sender.call{value: amount}("");
    require(success, "Transfer failed");
}

// 或使用重入锁
modifier nonReentrant() {
    require(!locked, "Reentrant call");
    locked = true;
    _;
    locked = false;
}
```

### 2. 整数溢出 (Integer Overflow)

**漏洞描述**
Solidity < 0.8.0 无内置溢出检查。

**检测**
```python
def detect_overflow(code: str, pragma: str) -> List[Dict]:
    """检测整数溢出风险"""
    issues = []
    
    # 检查编译器版本
    version_match = re.search(r'pragma solidity \^?(\d+)\.(\d+)', pragma)
    if version_match:
        major = int(version_match.group(1))
        minor = int(version_match.group(2))
        
        if major < 0 or (major == 0 and minor < 8):
            # 检查是否使用SafeMath
            if 'SafeMath' not in code:
                issues.append({
                    'type': 'INTEGER_OVERFLOW',
                    'severity': 'HIGH',
                    'description': 'Using Solidity < 0.8.0 without SafeMath',
                    'fix': 'Upgrade to Solidity ^0.8.0 or use SafeMath library'
                })
    
    return issues
```

### 3. 访问控制缺失

**检测**
```python
def detect_access_control(code: str) -> List[Dict]:
    """检测访问控制问题"""
    issues = []
    
    # 检查特权函数
    privileged_functions = [
        r'function\s+(mint|burn|transferOwnership|pause|unpause|upgrade)',
        r'function\s+\w+.*onlyOwner',
        r'selfdestruct'
    ]
    
    for pattern in privileged_functions:
        matches = re.finditer(pattern, code, re.IGNORECASE)
        for match in matches:
            func_start = match.start()
            func_end = code.find('}', func_start)
            func_body = code[func_start:func_end]
            
            # 检查是否有访问控制修饰符
            if not any(x in func_body for x in ['onlyOwner', 'onlyAdmin', 'require']):
                issues.append({
                    'type': 'MISSING_ACCESS_CONTROL',
                    'severity': 'CRITICAL',
                    'description

skill-card.md

## Description:

Security Defense Line is a third-party crypto security skill for smart contract checks, wallet and transaction risk review, phishing detection, multisig workflows, and incident response guidance.

This skill is ready for commercial/non-commercial use.

## Publisher:

[shenmeng](https://clawhub.ai/user/shenmeng)

### License/Terms of Use:

MIT-0

## Use Case:

External crypto users and developers use this skill to generate security-oriented checks, reports, command guidance, and configuration examples for contracts, wallets, transactions, phishing risks, multisig operations, and incident handling.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The artifact presents critical crypto protections while the security evidence reports mock or random security results.

Mitigation: Use outputs only as preliminary guidance; verify findings with maintained security tools and qualified human review before wallet, contract, transaction, or incident-response decisions.

Risk: The security evidence reports under-scoped billing behavior with a hardcoded billing credential and potential immediate charging during payment verification.

Mitigation: Review payment behavior before installation, replace hardcoded credentials with environment-managed secrets, and require explicit user consent before charges.

Risk: The artifact documents a security_monitor.py workflow, but that script is not present in the release evidence.

Mitigation: Confirm available files before relying on monitoring workflows and avoid treating missing commands as supported release functionality.

## Reference(s):

- [Security Defense Line on ClawHub](https://clawhub.ai/shenmeng/skills/shenmeng-security-defense-line)
- [Smart Contract Security Auditing Technical Manual](references/contract-auditing.md)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown guidance, CLI-oriented text reports, code snippets, shell commands, and JSON-like script outputs]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Paid SkillPay flow is described as 0.01 USDT per call; security outputs require independent review before operational use.]

## Skill Version(s):

2025.4.15 (source: server release evidence; artifact _meta.json reports 1.0.1)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Security Defense Line 安全防线 and adjacent AI workflows.