ZTP
强制性安全审核技能,用于根据 SEP-2026 零信任协议验证新代码、技能和 MCP 服务器。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~thomastrumpp-ztpcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~thomastrumpp-ztp/file -o thomastrumpp-ztp.md# openclaw-security
## Description
This skill enforces the **SEP-2026 Security Protocol**. It provides tools to audit source code for malicious patterns, obfuscation, and unauthorized network capability. It is the **Gatekeeper**; no external code (Skills, MCP Servers, Python scripts) should be integrated without passing this audit.
## Usage
Use this skill whenever you need to:
1. **Audit** a new Python file, Skill, or MCP Server before using or installing it.
2. **Verify** the safety of a downloaded script.
3. **Check** for supply chain attacks (typosquatting).
## Commands
### 1. Deep Audit (Source Code)
Run the **Shield Pro 2.0** static analyzer on a target directory or file.
```bash
python3 skills/openclawSecurity/scripts/shield_pro.py --target <path_to_scan> --format json
```
**Output:** A JSON report containing `CRITICAL`, `HIGH`, and `MEDIUM` findings.
**Action:**
- If `CRITICAL` or `HIGH` > 0: **REJECT** the code.
- If `MEDIUM` > 0: **HALT** and ask User for manual review.
### 2. Supply Chain Check
Check `requirements.txt` or `package.json` for typosquatting and version pinning issues.
```bash
python3 skills/openclawSecurity/scripts/shield_pro.py --target <path_to_requirements> --mode supply-chain
```
### 3. Layer 2: External Defense Arsenal (Recommended)
If available in the environment, the Agent MUST run these SOTA tools to augment Shield Pro's findings:
| Tool | Purpose | Command |
| :------------ | :---------------------------------------------- | :---------------------------------------------- |
| **Bandit** | Python Static Analysis (Common Vulnerabilities) | `bandit -r <target_dir> -f json` |
| **Safety** | Python Dependency Check (Known CVEs) | `safety check -r requirements.txt --json` |
| **NPM Audit** | Node.js Dependency Check | `npm audit --json` (in package dir) |
| **Trivy** | Filesystem/Container Scan (Secrets/Vulns) | `trivy fs <target_dir> --format json` |
| **Garak** | LLM/Prompt Injection Testing | `garak --model_type <type> --model_name <name>` |
> **Note:** If a tool is missing, log a warning in the final report but proceed with `shield_pro` findings.
## Workflow: The SEP-2026 Gatekeeper Process
1. **Acquire**: Download or locate the target code.
2. **Isolate**: ensure the code is not executed.
3. **Scan**: Run `shield_pro.py` on the target.
4. **Evaluate**:
- **Pass**: No Critical/High issues.
- **Fail**: Any Critical/High issue found. Reporting potential Line of Code (LOC) and threat type.
5. **Report**: Present the findings to the user.
## Principles
- **Zero Trust**: treat all input as malicious.
- **No Execution**: Never run the target code during the audit.
- **Paranoia**: False positives are better than missed malware.
---
## 中文说明
# openclaw-security
## 描述
此技能强制执行 **SEP-2026 安全协议**。它提供工具来审计源代码,检测恶意模式、混淆以及未经授权的网络能力。它是**守门人**;任何外部代码(技能、MCP 服务器、Python 脚本)在通过此审计之前都不应被集成。
## 用法
当你需要执行以下操作时使用此技能:
1. 在使用或安装新的 Python 文件、技能或 MCP 服务器之前对其进行**审计**。
2. **验证**已下载脚本的安全性。
3. **检查**供应链攻击(仿冒抢注,typosquatting)。
## 命令
### 1. 深度审计(源代码)
在目标目录或文件上运行 **Shield Pro 2.0** 静态分析器。
```bash
python3 skills/openclawSecurity/scripts/shield_pro.py --target <path_to_scan> --format json
```
**输出:** 一份包含 `CRITICAL`、`HIGH` 和 `MEDIUM` 发现的 JSON 报告。
**操作:**
- 如果 `CRITICAL` 或 `HIGH` > 0:**拒绝**该代码。
- 如果 `MEDIUM` > 0:**暂停**并请用户进行人工审查。
### 2. 供应链检查
检查 `requirements.txt` 或 `package.json` 是否存在仿冒抢注和版本固定问题。
```bash
python3 skills/openclawSecurity/scripts/shield_pro.py --target <path_to_requirements> --mode supply-chain
```
### 3. 第 2 层:外部防御武器库(推荐)
如果环境中可用,代理必须运行这些 SOTA 工具来增强 Shield Pro 的发现:
| 工具 | 用途 | 命令 |
| :------------ | :---------------------------------------------- | :---------------------------------------------- |
| **Bandit** | Python 静态分析(常见漏洞) | `bandit -r <target_dir> -f json` |
| **Safety** | Python 依赖检查(已知 CVE) | `safety check -r requirements.txt --json` |
| **NPM Audit** | Node.js 依赖检查 | `npm audit --json`(在包目录中) |
| **Trivy** | 文件系统/容器扫描(密钥/漏洞) | `trivy fs <target_dir> --format json` |
| **Garak** | LLM/提示注入测试 | `garak --model_type <type> --model_name <name>` |
> **注意:** 如果某个工具缺失,在最终报告中记录一条警告,但继续使用 `shield_pro` 的发现。
## 工作流:SEP-2026 守门人流程
1. **获取**:下载或定位目标代码。
2. **隔离**:确保代码不会被执行。
3. **扫描**:在目标上运行 `shield_pro.py`。
4. **评估**:
- **通过**:没有 Critical/High 问题。
- **失败**:发现任何 Critical/High 问题。报告潜在的代码行(LOC)和威胁类型。
5. **报告**:向用户呈现发现的问题。
## 原则
- **零信任**:将所有输入视为恶意的。
- **不执行**:审计期间绝不运行目标代码。
- **多疑**:误报胜于漏掉恶意软件。