kylejfrost

OpenClaw Security Hardening

IT運用・セキュリティv1.1.0
作者:kylejfrost更新日 2026-05-11全 3 バージョン · 最新版の公開日 2026-02-02openclaw-security-hardening@clawhub_kylejfrost/openclaw-security-hardening
セキュリティスキャン#Hardening#Prompt Injection#Audit#Protection

AlphaMoatによると、2026-09時点でOpenClaw Security Hardeningのダウンロード数は3,354、スター数は5で、AIスキル全体5,078件中3,364位、IT運用・セキュリティでは264件中218位です。

インストール数
105
ダウンロード数
3354
スター数
5
総合順位
#3,364
全体の上位 67% · IT運用・セキュリティの上位 83%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗105332251
SkillHub ↗10533545—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

スキル内の悪意ある内容やプロンプトインジェクションのスキャン、外向きデータ通信の監査、ファイル整合性の監視、ワークスペース設定の点検、インストール前のスキル確認に使うスクリプトを説明します。検出範囲とコマンドを示すもので、スキャンに問題がないことが安全を保証するとは述べていません。

資料公開日 2026-10-29

できること

  • インストール済みスキルの不審な内容をスキャンする。
  • スキルがデータを外部へ送る可能性を調べる。
  • 整合性ベースラインを作成するか、ワークスペース設定を点検する。
  • 新しいスキルのインストール前に確認する。

使う場面

  • OpenClawのスキルやワークスペースのセキュリティ設定を見直すとき。
  • 新しいスキルを導入する前にローカルで確認したいとき。

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

このスキルディレクトリをスキャンし、人による確認が必要な結果をまとめてください。
ワークスペースのセキュリティ設定を点検し、変更はせず問題だけ報告してください。

月次の推移

ダウンロード数3354
2136279034442026-03 · ダウンロード数 22262026-05 · ダウンロード数 26742026-06 · ダウンロード数 28302026-07 · ダウンロード数 30922026-08 · ダウンロード数 32232026-09 · ダウンロード数 335426-0326-09
スター数5
4562026-03 · スター数 52026-05 · スター数 52026-06 · スター数 52026-07 · スター数 52026-08 · スター数 52026-09 · スター数 526-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-093354—5
2026-083223+4.2%5
2026-073092+9.3%5
2026-062830+5.8%5
2026-052674—5
2026-032226—5

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

6.6 KB・ClawHub v1.1.0
---
name: openclaw-security-hardening
description: Protect OpenClaw installations from prompt injection, data exfiltration, malicious skills, and workspace tampering
version: 1.0.0
author: openclaw-community
tags: [security, hardening, audit, protection]
---

# OpenClaw Security Hardening
すべて表示(全 229 行)
A comprehensive security toolkit for protecting OpenClaw installations from attacks via malicious skill files, prompt injection, data exfiltration, and workspace tampering.

## Threat Model

This skill protects against:

| Threat | Description | Tool |
|--------|-------------|------|
| **Prompt Injection** | Malicious skills containing instructions to override system prompts, ignore safety rules, or manipulate agent behavior | `scan-skills.sh` |
| **Data Exfiltration** | Skills that instruct the agent to send sensitive data (credentials, memory, config) to external endpoints | `audit-outbound.sh` |
| **Skill Tampering** | Unauthorized modification of installed skills after initial review | `integrity-check.sh` |
| **Workspace Exposure** | Sensitive files with wrong permissions, missing .gitignore rules, insecure gateway config | `harden-workspace.sh` |
| **Supply Chain** | Installing a new skill that contains hidden malicious patterns | `install-guard.sh` |

## Quick Start

```bash
# Run a full security scan of all installed skills
./scripts/scan-skills.sh

# Audit outbound data flow patterns
./scripts/audit-outbound.sh

# Initialize integrity baseline
./scripts/integrity-check.sh --init

# Harden your workspace
./scripts/harden-workspace.sh --fix

# Check a new skill before installing
./scripts/install-guard.sh /path/to/new-skill/
```

## Tools

### 1. `scan-skills.sh` — Skill File Scanner

Scans all installed skill files for malicious patterns including prompt injection, data exfiltration attempts, suspicious URLs, hidden unicode, obfuscated commands, and social engineering.

**Usage:**
```bash
# Scan all skill directories
./scripts/scan-skills.sh

# Scan a specific directory only
./scripts/scan-skills.sh --path /path/to/skills/

# Output as JSON for automation
./scripts/scan-skills.sh --json

# Show help
./scripts/scan-skills.sh --help
```

**What it detects:**
- Prompt injection patterns (override instructions, new system prompts, admin overrides)
- Data exfiltration (curl/wget to external URLs, sending file contents)
- Suspicious URLs (webhooks, pastebin, requestbin, ngrok, etc.)
- Base64-encoded content that could hide instructions
- Hidden unicode characters (zero-width spaces, RTL override, homoglyphs)
- References to sensitive files (.env, credentials, API keys, tokens)
- Instructions to modify system files (AGENTS.md, SOUL.md)
- Obfuscated commands (hex encoded, unicode escaped)
- Social engineering ("don't tell the user", "secretly", "without mentioning")

**Severity levels:**
- 🔴 **CRITICAL** — Likely malicious, immediate action needed
- 🟡 **WARNING** — Suspicious, review manually
- 🔵 **INFO** — Noteworthy but probably benign

---

### 2. `integrity-check.sh` — Skill Integrity Monitor

Creates SHA256 hash baselines of all skill files and detects unauthorized modifications.

**Usage:**
```bash
# Initialize baseline (first run)
./scripts/integrity-check.sh --init

# Check for changes (run periodically)
./scripts/integrity-check.sh

# Update baseline after reviewing changes
./scripts/integrity-check.sh --update

# Check specific directory
./scripts/integrity-check.sh --path /path/to/skills/

# Show help
./scripts/integrity-check.sh --help
```

**Reports:**
- ✅ Unchanged files
- ⚠️ Modified files (hash mismatch)
- 🆕 New files (not in baseline)
- ❌ Removed files (in baseline but missing)

**Automation:** Add to your heartbeat or cron to run daily:
```bash
# In HEARTBEAT.md or cron
0 8 * * * /path/to/scripts/integrity-check.sh 2>&1 | grep -E '(MODIFIED|NEW|REMOVED)'
```

---

### 3. `audit-outbound.sh` — Outbound Data Flow Auditor

Scans skill files for patterns that could cause data to leave your machine.

**Usage:**
```bash
# Audit all skills
./scripts/audit-outbound.sh

# Audit specific directory
./scripts/audit-outbound.sh --path /path/to/skills/

# Show whitelisted domains
./scripts/audit-outbound.sh --show-whitelist

# Add domain to whitelist
./scripts/audit-outbound.sh --whitelist example.com

# Show help
./scripts/audit-outbound.sh --help
```

**Detects:**
- HTTP/HTTPS URLs embedded in skill instructions
- References to curl, wget, fetch, web_fetch, browser navigate
- Email/message/webhook sending instructions
- Raw IP addresses in instructions
- Non-whitelisted external domains

---

### 4. `harden-workspace.sh` — Workspace Hardener

Checks and fixes common security misconfigurations in your OpenClaw workspace.

**Usage:**
```bash
# Check only (report issues)
./scripts/harden-workspace.sh

# Auto-fix safe issues
./scripts/harden-workspace.sh --fix

# Show help
./scripts/harden-workspace.sh --help
```

**Checks:**
- File permissions on sensitive files (MEMORY.md, USER.md, SOUL.md, credentials)
- .gitignore coverage for sensitive patterns
- Gateway auth configuration
- DM policy settings
- Sensitive content in version-controlled files

---

### 5. `install-guard.sh` — Pre-Install Security Gate

Run before installing any new skill to check for malicious content.

**Usage:**
```bash
# Check a skill before installing
./scripts/install-guard.sh /path/to/new-skill/

# Strict mode (fail on warnings too)
./scripts/install-guard.sh --strict /path/to/new-skill/

# Show help
./scripts/install-guard.sh --help
```

**Checks:**
- All patterns from scan-skills.sh
- Dangerous shell patterns in scripts (rm -rf, curl|bash, eval, etc.)
- Suspicious npm dependencies (if package.json exists)
- Exit code 0 = safe, 1 = suspicious (for CI/automation)

---

## Security Rules Template

Copy `assets/security-rules-template.md` into your `AGENTS.md` to add runtime security rules for your agent. These rules instruct the agent to refuse prompt injection attempts and protect sensitive data.

```bash
cat assets/security-rules-template.md >> /path/to/AGENTS.md
```

## Recommended Setup

1. **Initial setup:**
   ```bash
   ./scripts/scan-skills.sh              # Scan existing skills
   ./scripts/audit-outbound.sh           # Audit outbound patterns
   ./scripts/integrity-check.sh --init   # Create baseline
   ./scripts/harden-workspace.sh --fix   # Fix workspace issues
   ```

2. **Add security rules to AGENTS.md** from the template

3. **Before installing new skills:**
   ```bash
   ./scripts/install-guard.sh /path/to/new-skill/
   ```

4. **Periodic checks** (add to heartbeat or cron):
   ```bash
   ./scripts/integrity-check.sh          # Detect tampering
   ./scripts/scan-skills.sh              # Re-scan for new patterns
   ```

IT運用・セキュリティの人気スキル

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。