← 返回 Skills 市场
williamwang-wh

Claw Ctct Security Patrol

作者 Williamwang-wh · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
92
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install claw-ctct-security-patrol
功能描述
OpenClaw 安全巡检工具,一键执行系统安全扫描并生成通俗易懂的报告。 使用场景:用户说"安全巡检"、"安全检查"、"安全审计"、"巡检"、"security audit"、"检查安全"、"系统安全"等。 触发条件:任何与 OpenClaw 安全检测、审计、巡检相关的请求。
使用说明 (SKILL.md)

OpenClaw 安全巡检

第一步:检查运行环境

执行命令 node --version,确认返回了版本号(如 v18.x.x 或更高)。

  • 如果命令成功返回版本号 → 继续第二步
  • 如果报错"command not found" → 告诉用户:"安全巡检需要 Node.js 环境,请先安装 Node.js(推荐 v18 以上),安装后再来找我。",然后停止,不要继续后续步骤

第二步:首次使用引导

检查文件 ~/.openclaw/.audit-first-run 是否存在。

如果文件已存在 → 跳过本步,直接进入第三步。

如果文件不存在(说明是首次使用),向用户发送以下消息,然后等待用户回复:

你好!这是首次使用安全巡检功能。

除了现在手动执行,你还可以设置每天自动巡检,系统会自动检查并把报告推送给你。**(默认执行时间为 02:00,也可以自定义为其他时间)**

请选择:
1. 设置每天自动巡检(推荐,省心)
2. 先跑一次看看,以后再说

根据用户回复执行:

  • 用户选 1(或回复"设置"、"自动"、"定时"等含义)→ 先创建标记文件 ~/.openclaw/.audit-first-run(内容写 setup-done),然后必须读取 references/cron-setup.md 文件,严格按照其中的步骤帮用户配置定时任务。配置完成后再继续第三步。
  • 用户选 2(或回复"先跑一次"、"以后再说"、"跳过"等含义)→ 创建标记文件 ~/.openclaw/.audit-first-run(内容写 skipped),然后继续第三步。

关于定时任务的硬性要求

  • 必须使用 openclaw cron add 命令
  • 禁止使用系统 crontab(crontab -e 等)
  • 原因:系统 crontab 无法正确初始化 OpenClaw 环境,会导致执行失败

第三步:询问检测模式

向用户发送以下消息,然后等待用户回复:

请选择检测模式:

1. 完整检测(推荐) — 除了本地扫描,还会联网查询是否有恶意插件,并同步安全评分
   发送的数据:每项检查的名称和结果摘要、设备标识(MAC 地址、主机名)、随机生成的 Agent ID
   不会发送:文件内容、密码、密钥、日志原文等敏感信息
2. 仅本地扫描 — 不联网、不发送任何数据,适合离线或隐私敏感环境

记住用户的选择,下一步会用到。

第四步:执行安全扫描

根据用户在第三步的选择,执行对应的命令:

  • 用户选 1(完整检测)→ 执行命令:node \x3CSKILL_DIR>/scripts/openclaw-hybrid-audit-changeway.js --push
  • 用户选 2(仅本地)→ 执行命令:node \x3CSKILL_DIR>/scripts/openclaw-hybrid-audit-changeway.js

其中 \x3CSKILL_DIR> 是本 skill 的安装目录(即本 SKILL.md 所在的目录)。

输出要求(严格遵守):

脚本执行完毕后,不要把脚本的完整控制台输出发给用户。脚本输出内容很长、包含大量技术细节,直接展示会让用户困惑。

你需要从脚本输出中只提取以下 3 个信息,然后按下面的格式发给用户:

  1. 从输出末尾找到 PASS X FAIL X SKIP X 这一行,提取 PASS、FAIL、SKIP 的数量
  2. 从输出末尾找到 系统安全得分: XX / 100 这一行,提取得分
  3. 从输出末尾找到 详细审计报告已保存至: ... 这一行,提取报告文件路径

然后只向用户发送以下内容(不要多写,不要少写):

检测统计: PASS X FAIL X SKIP X
系统安全得分: XX / 100

详细审计报告已保存至: \x3C报告文件路径>

需要我帮你解读这份报告吗?回复"是"我会逐项分析每个检查结果,告诉你哪些没问题、哪些需要注意。

然后停下来等用户回复,不要自动开始分析。

第五步:解读报告(用户要求时才执行)

当用户回复"是"、"要"、"分析"、"解读"、"看看"等肯定含义时,执行本步。

5.1 读取报告文件

读取文件 ~/.openclaw/security-reports/report-YYYY-MM-DD.txt,其中 YYYY-MM-DD 是今天的日期。

如果文件不存在,告诉用户:"没有找到今天的报告文件,可能扫描还没完成,请稍后再试。"

5.2 按以下格式逐项输出分析

输出规则(非常重要,必须全部遵守):

  • 按报告中 [1/14][2/14]... 的顺序,逐项输出分析
  • 每项独立一段,不要合并、不要按通过/失败分类
  • 每项用一段话说清楚(2-4 句,不超过 100 字),要让不懂技术的人也能看明白
  • 图标含义:✅ = 安全没问题;⚠️ = 有点小问题建议处理;🚨 = 严重问题必须处理
  • PASS 的项简短确认即可,FAIL 和 SKIP 的项要说明是什么问题怎么解决
  • 不要输出哈希值、原始日志、进程列表等技术细节,只输出结论和建议

5.3 解读模板(严格按此格式输出)

以下是完整的输出模板。你必须按照这个格式来写,内容根据实际报告调整:

## 🔒 安全巡检报告解读

> 扫描时间:YYYY-MM-DD HH:MM
> 安全评分:XX / 100

---

### 1. 核心运行环境健康度
(根据报告中 [1/14] 的 PASS/FAIL 状态来写)

### 2. 系统敏感目录防篡改监控
(根据报告中 [2/14] 的内容来写)

### 3. 网关进程内存凭证隔离检查
(根据报告中 [3/14] 的内容来写)

... 依次写到第 14 项 ...

---

### 总结

用 2-3 句话概括整体安全状况,列出最需要关注的 1-2 个问题(如果有)。

5.4 解读案例(供你参考,实际输出时根据真实报告内容来写)

以下是基于一份真实报告的解读示范,展示每种状态该怎么写:

## 🔒 安全巡检报告解读

> 扫描时间:2026-03-15 17:04
> 安全评分:79 / 100

---

### 1. 核心运行环境健康度
✅ 环境扫描通过。有 3 条配置建议(如反向代理信任设置、credentials 目录权限),不影响安全但建议后续优化。

### 2. 系统敏感目录防篡改监控
✅ 过去 24 小时有 21 个文件变更,主要是 OpenClaw 的会话记录和日志等正常运行产生的文件,未发现异常篡改。

### 3. 网关进程内存凭证隔离检查
⏭️ 跳过。macOS 系统限制(SIP 保护机制),无法扫描其他进程的环境变量,这是正常的,不用担心。

### 4. 核心配置防篡改与权限基线
⚠️ 首次运行,还没有建立文件指纹基线,所以无法判断配置是否被篡改。好消息是:核心文件(openclaw.json、paired.json、sshd_config)的访问权限都设置正确。建议后续手动生成基线文件以开启防篡改监控。

### 5. 组件与插件供应链完整性
⚠️ 检测到 Skill/MCP 组件文件与上次基线不一致。如果你最近安装或更新了插件(如 wechat-macro-daily-report),这属于正常变更。如果没有主动操作过,建议检查是否有未经授权的组件变更。

### 6. 远程访问与爆破攻击监控
✅ 安全。过去 24 小时没有发现任何 SSH 登录失败记录,说明没有人在尝试暴力破解你的远程登录。

### 7. 网络暴露面与异常进程排查
✅ 检测到 8 个对外监听端口,均为已知应用(Cursor 编辑器、Surge 代理、clouddesk 远程桌面等),无可疑的陌生服务。CPU 占用正常。

### 8. 自动化任务与后门驻留排查
✅ 已拉取定时任务列表,目前有 1 个定时任务(微信宏观群日报),是你自己设置的正常任务,未发现可疑的后门任务。

### 9. 高危命令与越权行为审计
⏭️ 跳过。今天的 OpenClaw 运行日志文件不存在,可能是今天还没有执行过需要记录的操作。不用担心,下次有日志时会自动检查。

### 10. 异常外联与数据外泄监控
⏭️ 跳过。同上,今天的日志文件不存在,无法扫描网络请求记录。

### 11. 系统凭证与敏感文件访问审计
⏭️ 跳过。同上,今天的日志文件不存在,无法扫描文件访问行为。

### 12. 硬编码密钥与助记词防泄漏扫描
✅ 安全。扫描了工作区的所有文件,没有发现明文写死的私钥或助记词。

### 13. 特权提权(Sudo)操作对账审计
✅ 安全。今天系统没有执行过 sudo 特权命令,Agent 的记忆记录也没有相关内容,两边对账一致,不存在偷偷提权的情况。

### 14. 生态组件恶意威胁情报扫描
✅ 安全。已列出本机安装的 54 个 Skill 组件,全部在安全名单中。(如果使用了完整检测模式且命中威胁情报,这里会显示具体的恶意组件和处置建议。)

---

### 总结

整体安全状况良好。主要有两个可以改进的地方:
1. **建立配置文件指纹基线** — 这样以后可以自动检测核心配置是否被篡改
2. **确认插件变更** — 组件文件有变化,如果是你自己安装/更新的就没问题

其他检查项全部通过,没有发现安全威胁。

5.5 关于图标使用

在解读报告时使用以下图标(只有这 4 个,不要使用其他图标):

图标 含义 对应报告状态
安全,没问题 [PASS]
⚠️ 有小问题,建议处理 [FAIL] 但不严重
🚨 严重问题,必须处理 [FAIL] 且有安全风险
⏭️ 跳过了,不用担心 [SKIP]

判断 FAIL 是 ⚠️ 还是 🚨 的标准

  • 如果报告里提到"篡改"、"恶意"、"爆破"、"危险"、"高危" → 用 🚨
  • 如果报告里提到"首次运行"、"缺失基线"、"权限过宽"、"未知请求" → 用 ⚠️

定时任务配置

当用户后续要求"设置定时巡检"、"修改定时任务"、"自动巡检"时:

  1. 读取 references/cron-setup.md 文件
  2. 严格按照其中的步骤执行
  3. 必须使用 openclaw cron add 命令,禁止使用系统 crontab
安全使用建议
This skill is plausibly a legitimate local security auditor, but review these before enabling: - Inspect the bundled script yourself (scripts/openclaw-hybrid-audit-changeway.js) to find where and to which URL(s) it sends data in --push mode. The SKILL.md promises only summary data will be sent, but the endpoint(s) are not published in the docs. - If you care about privacy, run the tool first in "仅本地扫描" mode (no --push). Confirm the generated report file (~/.openclaw/security-reports/report-YYYY-MM-DD.txt) contains only non-sensitive summaries. - Be cautious when allowing the skill to configure scheduled runs. openclaw cron add will create recurring jobs that can run unattended and may push results. Only enable scheduling after you verify the push behavior and destination. - The script reads system logs and spawns many system commands (lsof, journalctl, find, etc.). That is normal for audits but can reveal sensitive metadata — run in an isolated environment (VM) if you want to audit before trusting it on a production host. - If you are not comfortable auditing the code, do not enable the scheduled/--push mode and keep use manual, local scans only. If you proceed, prefer an isolated account or VM and provide chat/channel IDs only to destinations you control.
功能分析
Type: OpenClaw Skill Name: claw-ctct-security-patrol Version: 1.0.0 The skill bundle is a comprehensive security auditor that performs high-risk operations, including reading system logs (journalctl, auth.log), scanning process environments (/proc/pid/environ), and searching the workspace for secrets. While these actions align with its stated purpose, the script exfiltrates device identifiers (MAC address, hostname) and a full inventory of installed skills to an external endpoint (https://auth.ctct.cn:10020) when the 'Full Detection' mode is used. The SKILL.md and cron-setup.md files actively encourage users to enable this telemetry-heavy mode, which constitutes a significant privacy risk and data exfiltration of system metadata, although it lacks clear evidence of traditional malicious intent like credential theft.
能力评估
Purpose & Capability
The name/description (security巡检) match the included assets: a Node.js audit script that reads logs, runs system inspection commands, writes reports to ~/.openclaw, and can optionally perform a network "--push" mode. Asking for Node and filesystem/command access is coherent with an on-host audit tool.
Instruction Scope
SKILL.md explicitly instructs the agent to create marker files in ~/.openclaw, configure an OpenClaw cron job (using openclaw cron add, forbidding system crontab), run the bundled script (local or with --push), and only surface a small summary to the user. It also instructs reading the daily report file for detailed analysis. These instructions legitimately go beyond simple read-only checks (they write files and can schedule recurring runs) — expected for an audit tool, but they grant persistent and recurring execution and require careful user consent. The document claims what data will be sent when using --push (names, result summaries, device identifiers), but does not name the remote endpoint(s) or provide code-level evidence of exact network destinations in the SKILL.md.
Install Mechanism
No install spec (instruction-only) and the package only includes a local Node.js script and docs. No remote downloads or archive extraction are present in the manifest, which lowers supply-chain risk. The included JS file will be executed locally — no additional installers are fetched.
Credentials
The skill declares no required env vars, which matches the metadata. The script nevertheless accesses the user's home directory, temp logs, and spawns many system utilities (find, pgrep, lsof, journalctl, etc.) to enumerate system state — this is proportionate for a security audit but can surface sensitive information. The SKILL.md states that sensitive data (file contents, passwords, keys, full logs) are not sent in '完整检测' mode, and the script appears to limit what it reports, but SKILL.md and the code do enable sending device identifiers (MAC address, hostname, Agent ID) and potentially threat-intelligence comparisons. The manifest does not disclose the remote endpoints used by the push mode, so the exact recipients of that data are not verifiable from the package.
Persistence & Privilege
always:false (no forced global installation). However, the skill encourages creating a persistent marker file (~/.openclaw/.audit-first-run) and configuring a scheduled job via openclaw cron add (an automated recurring run that can push reports). Scheduled execution is user-driven in the flow, but it creates ongoing capability to run the audit and push results. Autonomous invocation by the agent is allowed by default (disable-model-invocation:false), which combined with scheduled jobs increases the operational footprint — this requires explicit user consent and review before enabling.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claw-ctct-security-patrol
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claw-ctct-security-patrol 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
claw-ctct-security-patrol v1.0.0 – Initial release. - Provides one-click system security audit with easy-to-understand report. - Supports both manual and automatic (scheduled) auditing options. - Guides users through environment checks, audit mode selection, and detailed report interpretation. - Ensures user privacy: clear explanation about what information is sent or kept local. - Offers direct assistance interpreting audit reports in everyday language.
元数据
Slug claw-ctct-security-patrol
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Claw Ctct Security Patrol 是什么?

OpenClaw 安全巡检工具,一键执行系统安全扫描并生成通俗易懂的报告。 使用场景:用户说"安全巡检"、"安全检查"、"安全审计"、"巡检"、"security audit"、"检查安全"、"系统安全"等。 触发条件:任何与 OpenClaw 安全检测、审计、巡检相关的请求。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 92 次。

如何安装 Claw Ctct Security Patrol?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install claw-ctct-security-patrol」即可一键安装,无需额外配置。

Claw Ctct Security Patrol 是免费的吗?

是的,Claw Ctct Security Patrol 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Claw Ctct Security Patrol 支持哪些平台?

Claw Ctct Security Patrol 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Claw Ctct Security Patrol?

由 Williamwang-wh(@williamwang-wh)开发并维护,当前版本 v1.0.0。

💬 留言讨论