微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🛡️

AI 工作区安全守护卫士

Openclaw Sentinel · v1.0.0
办公 安全 B 级 作者 atlaspa 公开目录收录
下载 2.1k 安装 1 收藏 4.8k 浏览 12
原始页面

简介

实时监控工作区文件完整性,检测提示注入攻击与未授权篡改,守护 AI 代理核心身份与记忆安全。

原始描述

Supply chain security for agent skills. Pre-install inspection, post-install scanning, obfuscation detection, and known-bad signature matching. Verify skills are safe before they touch your workspace. Free alert layer — upgrade to openclaw-sentinel-pro for quarantine, blocking, and community threat feeds.

中文使用说明 来自收录源

核心用法

OpenClaw Sentinel 是一款专为 AI 代理工作区设计的本地安全监控工具,通过三大核心功能保护代理身份文件与记忆系统:

1. 基线完整性校验

  • baseline 命令创建受监控文件的哈希基线,覆盖 SOUL.md、AGENTS.md、IDENTITY.md、USER.md 等核心身份文件
  • verify 命令比对当前状态与基线,检测修改、删除或新增未跟踪文件
  • accept 命令允许人工审核后更新特定文件的基线

2. 提示注入检测

  • scan 命令深度扫描多种攻击向量:指令覆盖短语(如 "ignore previous instructions")、Base64 可疑载荷、零宽字符与 RTL 覆盖等 Unicode 技巧
  • 识别 Markdown 图片外渗 URL、HTML 脚本注入、系统提示标记(<system>、[SYSTEM])及 Shell 命令注入
  • 发现注入模式触发 CRITICAL 级别警报

3. 快速状态监控

  • status 一键输出工作区健康摘要
  • full 组合执行完整性与注入扫描

显著优点

  • 零依赖架构:纯 Python 标准库实现,无需 pip 安装,无网络调用,完全本地运行
  • 跨平台兼容:支持 macOS、Linux、Windows,适配 OpenClaw、Claude Code、Cursor 等遵循 Agent Skills 规范的工具
  • 智能分级监控:区分 Critical(身份文件)、Memory(预期可变)、Config(配置)、Skills(技能元数据)四类文件,避免噪音
  • 工作区自动发现:支持环境变量、当前目录检测、默认路径三级回退策略
  • 清晰退出码:0(干净)、1(需审核修改)、2(需紧急处理注入),便于 CI/CD 集成

潜在局限

  • 免费版无自动响应:检测后需人工介入,自动化防护(快照恢复、技能隔离、Git 回滚)需升级至 Sentinel-Pro
  • 依赖初始基线质量:若基线创建时文件已遭污染,后续校验失效
  • 无法阻止实时攻击:仅事后检测,不具备主动拦截能力
  • Unicode 技巧识别边界:新型 homoglyph 或编码绕过可能逃逸规则库
  • 内存文件预期变化:虽标记为 INFO 级别,但恶意修改与正常更新难以区分

适合人群

  • 使用 Claude Code、Cursor 等 AI 编码工具的专业开发者
  • 运行多代理协作系统的团队,需确保 AGENTS.md 等协调文件未被篡改
  • 对 AI 供应链安全有顾虑的用户,担心恶意技能或心跳载荷植入后门
  • 需要将文件完整性检查集成到 CI/CD 或自动化脚本的安全工程师

常规风险

  • 误报风险:合法重构身份文件或更新技能元数据时,需频繁运行 accept 更新基线
  • 基线泄露风险:若基线数据库被盗,攻击者可针对性构造哈希碰撞(虽 Python hashlib 默认抗碰撞)
  • 权限要求:需对工作区目录有读写权限,受限环境可能无法完整监控
  • 升级诱导:Pro 版功能宣传可能分散用户对免费版局限性的注意力,需理性评估实际需求

技术可信度说明

本工具设计思路符合最小权限原则与纵深防御理念,但当前报告为占位生成,未经过实际代码审计或动态测试验证。

技能正文


name: openclaw-sentinel description: "Verify workspace file integrity and scan for prompt injection patterns in agent identity and memory files. Detects unauthorized modifications to SOUL.md, AGENTS.md, IDENTITY.md, memory files, and installed skills. Free detection layer — upgrade to openclaw-sentinel-pro for automated countermeasures." user-invocable: true metadata: {"openclaw":{"emoji":"🛡️","requires":{"bins":["python3"]},"os":["darwin","linux","win32"]}}

OpenClaw Sentinel

Monitors your workspace files for unauthorized modifications and prompt injection attacks. Existing security tools scan skills before installation — this tool watches the workspace itself after installation, catching tampering that other tools miss.

Why This Matters

Your agent reads SOUL.md, AGENTS.md, IDENTITY.md, USER.md, and memory files on every session startup and trusts them implicitly. A compromised skill, a malicious heartbeat payload, or an unauthorized process can modify these files to:

  • Inject hidden instructions that alter agent behavior
  • Embed data exfiltration URLs in markdown images
  • Override identity and safety boundaries
  • Plant persistent backdoors in memory files

This skill detects all of these.

Need automated response? Upgrade to openclaw-sentinel-pro for snapshot restore, skill quarantine, git rollback, and automated protection sweeps.

Commands

Establish Baseline

Create or reset the integrity baseline. Run this after setting up your workspace or after reviewing and accepting all current file states.

python3 {baseDir}/scripts/integrity.py baseline --workspace /path/to/workspace

Verify Integrity

Check all monitored files against the stored baseline. Reports modifications, deletions, and new untracked files.

python3 {baseDir}/scripts/integrity.py verify --workspace /path/to/workspace

Scan for Injections

Scan workspace files for prompt injection patterns: hidden instructions, base64 payloads, Unicode tricks, markdown image exfiltration, HTML injection, and suspicious system prompt markers.

python3 {baseDir}/scripts/integrity.py scan --workspace /path/to/workspace

Full Check (Verify + Scan)

Run both integrity verification and injection scanning in one pass.

python3 {baseDir}/scripts/integrity.py full --workspace /path/to/workspace

Quick Status

One-line summary of workspace health.

python3 {baseDir}/scripts/integrity.py status --workspace /path/to/workspace

Accept Changes

After reviewing a legitimate change, update the baseline for a specific file.

python3 {baseDir}/scripts/integrity.py accept SOUL.md --workspace /path/to/workspace

Workspace Auto-Detection

If --workspace is omitted, the script tries:

  1. OPENCLAW_WORKSPACE environment variable
  2. Current directory (if AGENTS.md exists)
  3. ~/.openclaw/workspace (default)

What Gets Monitored

Category Files Alert Level on Change
Critical SOUL.md, AGENTS.md, IDENTITY.md, USER.md, TOOLS.md, HEARTBEAT.md WARNING
Memory memory/*.md, MEMORY.md INFO (expected to change)
Config *.json in workspace root WARNING
Skills skills/*/SKILL.md WARNING

Injection patterns trigger CRITICAL alerts regardless of file category.

Injection Patterns Detected

  • Instruction override: "ignore previous instructions", "disregard above", "you are now", "new system prompt"
  • Base64 payloads: Suspiciously long base64 strings outside code blocks
  • Unicode manipulation: Zero-width characters, RTL overrides, homoglyphs
  • Markdown exfiltration: Image tags with data-encoding URLs
  • HTML injection: script tags, iframes, hidden elements
  • System prompt markers: <system>, [SYSTEM], <<SYS>> blocks
  • Shell injection: $(...) outside code blocks

Exit Codes

  • 0 — Clean, no issues
  • 1 — Modifications detected (review needed)
  • 2 — Injection patterns detected (action needed)

No External Dependencies

Python standard library only. No pip install. No network calls. Everything runs locally.

Cross-Platform

Works with OpenClaw, Claude Code, Cursor, and any tool using the Agent Skills specification.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

其他来源收录

同一技能在不同目录的原始页面:

标签

securityintegrity-monitoringprompt-injectionworkspace-protectionai-safetyfile-integritylocal-security

同类 Skill