LeoYeAI/agent-master-skills / skills/agent-runtime-security
openclaw-security-hardening
UnverifiedComplete 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.
| File | Kind | Size |
|---|---|---|
| CHANGELOG.md | markdown | 3.9 KB |
| README.md | markdown | 3.2 KB |
| SKILL.md | skill md | 15.9 KB |
| _meta.json | config | 301 B |
| examples/SOUL-config-example.md | markdown | 3.4 KB |
| tests/pre-submit-check.sh | script | 3.0 KB |
| tests/security-test.sh | script | 5.5 KB |
tests/pre-submit-check.sh
View on GitHub#!/bin/bash
# ClawHub提交前安全检查脚本
echo "🔒 ClawHub提交前安全检查"
echo "========================"
echo ""
skill_dir="$HOME/.openclaw/workspace/skills/skills/openclaw-security-hardening"
# 检查1: 真实密钥
echo "🔍 检查1: 扫描真实密钥..."
echo "---------------------------"
real_keys=$(grep -r "cli_a9f1c3a7c\|diLMNYl2nzbL1nEtQNhjMeQp6rtQdzA7\|DHqybLBGCaINAWscdLkcGDGwn9g\|tbldoED8qoLnkpZC" "$skill_dir" 2>/dev/null | grep -v "Binary file")
if [ -n "$real_keys" ]; then
echo "❌ 发现真实密钥!"
echo "$real_keys"
echo ""
echo "⚠️ 请先清理真实密钥再提交!"
exit 1
else
echo "✅ 未发现真实密钥"
fi
echo ""
# 检查2: 敏感文件
echo "🔍 检查2: 扫描敏感文件..."
echo "---------------------------"
sensitive_files=$(find "$skill_dir" -type f \( -name ".env" -o -name "*.key" -o -name "*.secret" -o -name "*.pem" -o -name "credentials.json" \) 2>/dev/null)
if [ -n "$sensitive_files" ]; then
echo "❌ 发现敏感文件:"
echo "$sensitive_files"
echo ""
echo "⚠️ 请删除这些文件或添加到.gitignore!"
exit 1
else
echo "✅ 未发现敏感文件"
fi
echo ""
# 检查3: 文件权限
echo "🔍 检查3: 验证文件权限..."
echo "---------------------------"
for file in SKILL.md README.md CHANGELOG.md; do
if [ -f "$skill_dir/$file" ]; then
perm=$(stat -c %a "$skill_dir/$file")
echo " $file: $perm"
fi
done
echo ""
# 检查4: 必需文件
echo "🔍 检查4: 验证必需文件..."
echo "---------------------------"
required_files=("SKILL.md" "README.md")
missing_files=""
for file in "${required_files[@]}"; do
if [ ! -f "$skill_dir/$file" ]; then
missing_files="$missing_files $file"
fi
done
if [ -n "$missing_files" ]; then
echo "❌ 缺少必需文件:$missing_files"
exit 1
else
echo "✅ 所有必需文件存在"
fi
echo ""
# 检查5: 测试脚本
echo "🔍 检查5: 运行测试..."
echo "---------------------------"
if [ -x "$skill_dir/tests/security-test.sh" ]; then
bash "$skill_dir/tests/security-test.sh" > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "✅ 所有测试通过"
else
echo "⚠️ 有测试失败,请检查"
fi
else
echo "⊘ 测试脚本不存在或不可执行"
fi
echo ""
# 总结
echo "========================"
echo "📊 检查总结"
echo "========================"
echo "✅ 安全检查通过"
echo "✅ 可以提交到ClawHub"
echo ""
echo "📋 技能信息:"
echo " 名称: openclaw-security-hardening"
echo " 版本: 1.0.0"
echo " 位置: $skill_dir"
echo ""
echo "🚀 下一步:"
echo " 1. 访问 https://clawhub.com"
echo " 2. 点击 'Submit Skill'"
echo " 3. 上传技能目录"
echo " 4. 填写元数据"
echo " 5. 提交审核"
echo ""
echo "💡 提示:"
echo " - 只提交 SKILL.md, README.md, CHANGELOG.md"
echo " - 不要提交 .env, .key 等敏感文件"
echo " - 敏感信息已全部替换为占位符"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |