返回顶部
🇺🇸 English
🇨🇳 简体中文
🇨🇳 繁體中文
🇺🇸 English
🇯🇵 日本語
🇰🇷 한국어
🇫🇷 Français
🇩🇪 Deutsch
🇪🇸 Español
🇷🇺 Русский
o

openclaw-bastion

# OpenClaw Bastion

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
1,472
下载量
1
收藏
概述
安装方式
版本历史

openclaw-bastion

# OpenClaw Bastion Runtime prompt injection defense for agent workspaces. While other tools watch workspace identity files, Bastion protects the input/output boundary — the files being read by the agent, web content, API responses, and user-supplied documents. ## Why This Matters Agents process content from many sources: local files, API responses, web pages, user uploads. Any of these can contain prompt injection attacks — hidden instructions that manipulate agent behavior. Bastion scans this content before the agent acts on it. ## Commands ### Scan for Injections Scan files or directories for prompt injection patterns. Detects instruction overrides, system prompt markers, hidden Unicode, markdown exfiltration, HTML injection, shell injection, encoded payloads, delimiter confusion, multi-turn manipulation, and dangerous commands. If no target is specified, scans the entire workspace. ```bash python3 {baseDir}/scripts/bastion.py scan ``` Scan a specific file or directory: ```bash python3 {baseDir}/scripts/bastion.py scan path/to/file.md python3 {baseDir}/scripts/bastion.py scan path/to/directory/ ``` ### Quick File Check Fast single-file injection check. Same detection patterns as `scan`, targeted to one file. ```bash python3 {baseDir}/scripts/bastion.py check path/to/file.md ``` ### Boundary Analysis Analyze content boundary safety across the workspace. Identifies: - Agent instruction files that contain mixed trusted/untrusted content - Writable instruction files (attack surface for compromised skills) - Blast radius assessment for each critical file ```bash python3 {baseDir}/scripts/bastion.py boundaries ``` ### Command Allowlist Display the current command allowlist and blocklist policy. Creates a default `.bastion-policy.json` if none exists. ```bash python3 {baseDir}/scripts/bastion.py allowlist python3 {baseDir}/scripts/bastion.py allowlist --show ``` The policy file defines which commands are considered safe and which patterns are blocked. Edit the JSON file directly to customize. Bastion Pro enforces this policy at runtime via hooks. ### Status Quick summary of workspace injection defense posture: files scanned, findings by severity, boundary safety, and overall posture rating. ```bash python3 {baseDir}/scripts/bastion.py status ``` ## 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 Detected | Category | Patterns | Severity | |----------|----------|----------| | **Instruction override** | "ignore previous", "disregard above", "you are now", "new system prompt", "forget your instructions", "override safety", "act as if no restrictions", "entering developer mode" | CRITICAL | | **System prompt markers** | `<system>`, `[SYSTEM]`, `<<SYS>>`, `<\|im_start\|>system`, `[INST]`, `### System:` | CRITICAL | | **Hidden instructions** | Multi-turn manipulation ("in your next response, you must"), stealth patterns ("do not tell the user") | CRITICAL | | **HTML injection** | `<script>`, `<iframe>`, `<img onerror=>`, hidden divs, `<svg onload=>` | CRITICAL | | **Markdown exfiltration** | Image tags with encoded data in URLs | CRITICAL | | **Dangerous commands** | `curl \| bash`, `wget \| sh`, `rm -rf /`, fork bombs | CRITICAL | | **Unicode tricks** | Zero-width characters, RTL overrides, invisible formatting | WARNING | | **Homoglyph substitution** | Cyrillic/Latin lookalikes mixed into ASCII text | WARNING | | **Base64 payloads** | Large encoded blobs outside code blocks | WARNING | | **Shell injection** | `$(command)` subshell execution outside code blocks | WARNING | | **Delimiter confusion** | Fake code block boundaries with injection content | WARNING | ## Context-Aware Scanning - Patterns inside fenced code blocks (` ``` `) are skipped to avoid false positives - Per-file risk scoring based on finding count and severity - Self-exclusion: Bastion skips its own skill files (which describe injection patterns) ## Exit Codes | Code | Meaning | |------|---------| | 0 | Clean, no issues | | 1 | Warnings detected (review recommended) | | 2 | Critical findings (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.

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 openclaw-bastion-1776359875 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 openclaw-bastion-1776359875 技能

通过命令行安装

skillhub install openclaw-bastion-1776359875

下载 Zip 包

⬇ 下载 openclaw-bastion v1.0.2

文件大小: 20.45 KB | 发布时间: 2026-4-17 14:09

v1.0.2 最新 2026-4-17 14:09
- Removed upgrade messaging and references to "bastion-pro" from documentation.
- Updated SKILL.md and README to reflect only the open, alert-only features now.
- No changes to commands or detection capabilities.
- Documentation now focuses solely on features available in the free version.

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

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

p2p_official_large
返回顶部