返回顶部
d

deepsafe-scan深度安全扫描

Preflight security scanner for AI coding agents — scans deployment config, skills/MCP servers, memory/sessions, and AI agent config files (hooks injection) for secrets, PII, prompt injection, and dangerous patterns. Runs 4 model behavior probes (persuasion, sandbagging, deception, hallucination). Supports LLM-enhanced semantic analysis. Works with OpenClaw, Claude Code, Cursor, and Codex. Use when a user asks for a security audit, health check, or wants to scan their AI agent setup for vulnerabi

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 2.0.1
安全检测
已通过
258
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

deepsafe-scan

DeepSafe Scan — AI编码代理的预检安全扫描器

全功能预检安全扫描器,覆盖5个维度
配置姿态(配置)、技能(技能与MCP)、记忆(会话)、钩子(代理配置注入)、模型(行为安全探测)。

支持OpenClaw、Claude Code、Cursor和Codex。LLM功能可自动检测凭证——无需手动配置。

使用场景

  • - 用户要求扫描、审计、检查安全性或健康检查其AI设置
  • 用户安装新技能、MCP服务器或克隆包含代理配置的项目
  • 用户想知道会话历史中是否有任何机密或PII泄露
  • 用户询问钩子注入风险(Claude Code的settings.json、.cursorrules等)
  • 用户想要探测模型行为是否存在操纵、欺骗或幻觉风险

运行方式

快速静态扫描(无需API密钥)

bash
python3 {baseDir}/scripts/scan.py --modules posture,skill,memory,hooks --scan-dir . --no-llm --format markdown

完整扫描(自动检测API凭证)

bash

OpenClaw(自动读取网关配置)


python3 {baseDir}/scripts/scan.py --openclaw-root ~/.openclaw --format html --output /tmp/deepsafe-report.html

Claude Code / Cursor / Codex(使用ANTHROPICAPIKEY或OPENAIAPIKEY)

python3 {baseDir}/scripts/scan.py --modules posture,skill,memory,hooks,model --scan-dir . --format html --output /tmp/deepsafe-report.html

定向扫描

bash

仅钩子注入(最快——检查.claude/settings.json、.cursorrules等)


python3 {baseDir}/scripts/scan.py --modules hooks --scan-dir . --no-llm --format markdown

仅记忆扫描(检查泄露的机密/PII)

python3 {baseDir}/scripts/scan.py --openclaw-root ~/.openclaw --modules memory --no-llm

仅模型行为探测

python3 {baseDir}/scripts/scan.py --openclaw-root ~/.openclaw --modules model --profile quick

输出选项

bash
python3 {baseDir}/scripts/scan.py --format json # 机器可读
python3 {baseDir}/scripts/scan.py --format markdown # 人类可读摘要
python3 {baseDir}/scripts/scan.py --format html --output /tmp/report.html # 可视化报告

缓存控制

bash
python3 {baseDir}/scripts/scan.py --ttl-days 3 # 缓存3天
python3 {baseDir}/scripts/scan.py --no-cache # 始终重新扫描

结果解读

评分

  • - 每个模块评分1-100(100=干净,每发现一个问题扣分,最低1分)
  • 模块贡献分 = floor(评分 / 4),范围1-25
  • 总分 = 4个贡献分之和,最高100分

严重级别

  • - 严重(-10分):即时利用风险——机密泄露、无认证、数据外泄链
  • (-5分):严重风险——提示注入、敏感文件访问、网络暴露
  • (-2分):中等风险——硬编码密钥、缺少日志、供应链问题
  • (-1分):轻微改进——非标准端点、缺少元数据

风险评级

  • - 85-100:低风险(绿色)
  • 65-84:中风险(黄色)
  • 40-64:高风险(橙色)
  • 4-39:严重风险(红色)

扫描后操作

  1. 1. 向用户展示总分和各模块细分
  2. 首先列出严重和高风险发现,并附上清晰说明
  3. 对每个发现,解释风险是什么以及如何修复
  4. 主动提供帮助修复问题(例如:需要我向您的网关配置添加认证吗?)

扫描内容

配置姿态模块(部署配置)

读取openclaw.json并检查:网关认证、网络暴露、API密钥处理、TLS、插件权限、MCP服务器风险、日志记录、沙箱。

技能模块(已安装技能与MCP)

扫描workspace/skills/、mcp/、mcp-servers/中的所有文件,检查:隐藏Unicode、提示注入、危险运行时调用、编码载荷、敏感文件引用、硬编码机密、系统提示提取、命令注入、数据外泄模式、破坏性操作、无确认自动执行、过度权限。

如果提供了--gateway-url(且未设置--no-llm),还会对每个技能的SKILL.md运行LLM增强语义分析,检测社会工程、隐式数据外泄和更深层次的模式识别。

记忆模块(会话与存储数据)

扫描agents/、credentials/、identity/、logs/、workspace/,检查:27种以上机密模式(OpenAI、GitHub、AWS、Slack、Stripe等的API密钥)、9种PII模式(电子邮件、电话、身份证号、信用卡)、持久性提示注入痕迹。

模型模块(4项行为安全探测)

需要--gateway-url和--gateway-token。运行:
  • - 说服探测:测试模型是否能在多轮对话中操纵用户意见
  • 能力隐藏探测:测试模型是否能策略性地隐藏能力(性能控制)
  • 欺骗探测:3阶段测试推理/行动不一致性(DTR指标)
  • 幻觉评估探测:测试在QA基准上的幻觉检测准确性

每个探测产生一个带有风险级别和评分的发现。各探测的平均值 = 模块评分。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 deepsafe-scan-1776109518 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 deepsafe-scan-1776109518 技能

通过命令行安装

skillhub install deepsafe-scan-1776109518

下载

⬇ 下载 deepsafe-scan v2.0.1(免费)

文件大小: 140.1 KB | 发布时间: 2026-4-15 12:27

v2.0.1 最新 2026-4-15 12:27
v2.0.1: Add honeypot demo repo (awesome-ai-rules) for security demonstration. Hooks scanner now recursively walks subdirectories.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部