Skip to content
Agentmart
Submit a tool

openclaw-security-hardening

Complete OpenClaw Agent Security Hardening - Protects against data leaks (storage security) and prompt injection (runtime security).

Skill by LeoYeAI

IndexedMIT★ 2,168
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/leoyeai-openclaw-security-hardening

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Complete OpenClaw Agent Security Hardening - Protects against data leaks (storage security) and prompt injection (runtime security). Use for initial setup, security audits, and ongoing maintenance. Covers file permissions, sensitive data isolation, Git protection, and command execution safety.

Use cases: data, security, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/openclaw-security-hardening

What's inside

Skill name
openclaw-security-hardening
Description
Complete OpenClaw Agent Security Hardening - Protects against data leaks (storage security) and prompt injection (runtime security). Use for initial setup, security audits, and ongoing maintenance. Covers file permissions, sensitive data isolation, Git protection, and command execution safety.
License
MIT
Instructions
689 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions read files in your home folder (~/.ssh, ~/.aws…)

Agent Skills spec issues

  • name: "openclaw-security-hardening" does not match folder "agent-runtime-security"
  • body: 689 lines (spec recommends under 500)

Files (7)

  • CHANGELOG.md
  • README.md
  • SKILL.md
  • _meta.json
  • SOUL-config-example.md · examples/
  • pre-submit-check.sh · tests/
  • security-test.sh · tests/

SKILL.md (first lines)

# OpenClaw Security Hardening

**Complete Security Framework** - Protects OpenClaw agents from **data leaks** (static security) and **prompt injection** (runtime security).

## Overview

This skill provides **comprehensive security protection** for OpenClaw agents:

1. **Static Security** - Protect data at rest
   - File permissions (chmod 600)
   - Sensitive data isolation (.env files)
   - Git protection (.gitignore)
   - Automated monitoring (security-check.sh)

2. **Dynamic Security** - Prevent runtime attacks
   - Content vs Intent detection
   - Three-Question Test
   - Dangerous command recognition
   - Safe execution patterns

**When to use:**
- ✅ Initial OpenClaw setup
- ✅ Security audits
- ✅ After discovering vulnerabilities
- ✅ Regular maintenance (weekly)
- ✅ When users ask about security

---

## Part 1: Static Security (Data Protection)

### The Problem

**Sensitive data in clear text**:
```markdown
# MEMORY.md
- **App Secret**: your_app_secret_here
- **API Key**: sk-xxxxxx
```

**Risks**:
- Other users on multi-user systems can read files (644 permission)
- Malware can access WSL2 filesystem
- Accidental Git commits to public repos
- Cloud backup uploads (OneDrive, etc.)
- Temporary files forgotten and not cleaned

---

### Solution: Multi-Layer Protection

#### Layer 1: File System Permissions

**Problem**:
```bash
-rw-r--r-- 1 yc yc  MEMORY.md  # 644 - others can read
```

**Fix**:
```bash
chmod 600 ~/.openclaw/workspace/*.md
-rw------- 1 yc yc  MEMORY.md  # 600 - only you can read
```

**Core files to protect**:
```bash
MEMORY.md       # Your long-term memory
USER.md         # Information about you
SOUL.md         # Agent persona
TOOLS.md        # Environment-specific notes
.env            # Sensitive data (create this)
```

---

#### Layer 2: Data Isolation (.env files)

**Create .env file**:
```bash
cat > ~/.openclaw/workspace/.env << 'EOF'
# OpenClaw Environment Variables
# SENSITIVE DATA - Do not share or commit to Git

# Feishu Configuration
FEISHU_APP_ID=your_app_id_here
FEISHU_APP_SECRET=your_app_secret_here
FEISHU_APP_TOKEN=your_token_here
FEISHU_TABLE_ID=your_table_id_here

# API Endpoints
USER_REGISTER_API=https://your-api-endpoint-here

# Add other sensitive info here
EOF
```

**Set secure permissions**:
```bash
chmod 600 ~/.openclaw/workspace/.env
```

**Update MEMORY.md**:
```markdown
### 飞书应用配置
- **App ID**: your_app_id_here
- **App Secret**: 见.env文件(FEISHU_APP_SECRET)
- **用户注册接口**: 见.env文件(USER_REGISTER_API)
```

**Benefits**:
- Clear boundary: sensitive data in one place
- Easy to protect: .env can be separately encrypted
- Safe to share: MEMORY.md can be shared safely

---

#### Layer 3: Git Protection

**Add to .gitignore**:

From LeoYeAI/openclaw-master-skills, MIT.

More from LeoYeAI/openclaw-master-skills

Signals

Stars
2,168
Forks
325
Open issues
13
Last commit (this folder)
Jul 20, 2026 (3 months ago)
Last release
Jul 20, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
Website
myclaw.ai
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from LeoYeAI

Cite this page

openclaw-security-hardening skill. Agent Mart. https://agentmart.dev/skills/leoyeai-openclaw-security-hardening (last updated 2026-10-24)