Pre-Publish Security Check

v1.0.0

Skill 发布前安全检查工具。在发布 skill 到 ClawHub 前,自动扫描敏感信息(API Key、Token、私钥、邮箱、手机号、精确坐标等)。Use before publishing any skill to prevent leaking private data.

0· 109·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for vlalamoon/pre-publish-security-check.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Pre-Publish Security Check" (vlalamoon/pre-publish-security-check) from ClawHub.
Skill page: https://clawhub.ai/vlalamoon/pre-publish-security-check
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install pre-publish-security-check

ClawHub CLI

Package manager switcher

npx clawhub@latest install pre-publish-security-check
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the actual behavior: the skill is a pre-publish scanner and the shipped shell script implements pattern checks for API keys, private keys, emails, phones, and coordinates as advertised. No unrelated credentials, binaries, or services are requested.
Instruction Scope
Instructions and script operate only on the supplied skill directory and print findings; they do not read other system paths or send data externally. Note: some grep patterns and --include filters are narrow (e.g., coordinate pattern expects comma-separated values, email regex only matches several common domains), so it may produce false negatives/positives. The SKILL.md and script instruct running the local shell script only.
Install Mechanism
No install spec or remote downloads; this is instruction-only plus a single local shell script. No external packages or archives are fetched or written to disk beyond the provided files.
Credentials
The skill declares no required environment variables or credentials and the script does not read secrets or environment variables beyond the provided SKILL_DIR argument. There is no disproportionate credential access requested.
Persistence & Privilege
The skill is not forced-always, requests no persistent presence, and does not alter other skills or system configuration. It is user-invocable and runs only when invoked.
Assessment
This appears to be a safe, local pre-publish scanner. Before using it: (1) review and, if needed, extend the regexes to match your expected key formats (the script's patterns are conservative and may miss or overmatch some cases); (2) run it locally or in CI on copies of skill directories—it does not send data anywhere; (3) be aware of false negatives (e.g., separate LNG/LAT assignments or uncommon email domains) and false positives; (4) ensure the script has the correct execution permissions and that you trust the skill source before running it on sensitive directories.

Like a lobster shell, security has layers — review code before you run it.

latestvk975m1edvgz0yb3fsm5atdrw2183ghy2
109downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Skill 发布前安全检查

在发布 skill 到 ClawHub 前,自动扫描敏感信息,防止隐私泄露。

检查项

类型检测内容
🔑 API KeysOpenAI sk-*, Tavily tvly-*, 自定义格式
🔐 Tokens32位以上随机字符串、硬编码 token
🔒 私钥RSA/私钥文件特征
📍 坐标精确到小数点后4位的经纬度
📧 邮箱个人邮箱地址
📱 手机中国手机号

使用方式

发布前检查

# 检查指定 skill
./skill-pre-publish-check.sh /path/to/skill

# 在 skill 目录下运行
cd my-skill
../skill-security-check/skill-pre-publish-check.sh .

集成到发布流程

# 发布前自动检查
skill_dir="./my-skill"
./skill-security-check/skill-pre-publish-check.sh "$skill_dir" && \
  clawhub publish "$skill_dir" --slug my-skill --version 1.0.0

输出示例

发现敏感信息

🔍 检查 skill: ./my-skill

⚠️ 发现可能的敏感信息:
./my-skill/script.py:api_key = "sk-abc123..."
./my-skill/config.sh:TOKEN="secret_token_here"

❌ 发现敏感信息,请修复后再发布!

修复建议:
  1. 使用环境变量: os.environ.get('API_KEY', '')
  2. 在 SKILL.md 中说明需要配置的环境变量
  3. 示例值使用占位符: your_token, YOUR_API_KEY

检查通过

🔍 检查 skill: ./my-skill

✅ 未发现敏感信息,可以安全发布

修复建议

API Key / Token

# ❌ 错误
API_KEY = "sk-abc123..."
TOKEN = "your_actual_token_here"

# ✅ 正确
API_KEY = os.environ.get('API_KEY', '')
TOKEN = os.environ.get('CAIYUN_TOKEN', '')

# 并在 SKILL.md 中说明

坐标

# ❌ 错误
LNG="113.9536"
LAT="22.5788"

# ✅ 正确
LNG="${LNG:-}"  # 通过环境变量配置
LAT="${LAT:-}"

# 或使用模糊示例
LNG="116.4"  # 北京示例
LAT="39.9"

邮箱/手机

# ❌ 错误
联系作者: real_email@example.com

# ✅ 正确
联系作者: your_email@example.com

最佳实践

  1. 发布前必检 — 每次发布前运行检查
  2. 环境变量 — 所有敏感配置用环境变量
  3. 占位符 — 文档示例用 your_xxx 占位
  4. .gitignore — 不要提交 .env 文件
  5. 定期轮换 — 如有泄露立即轮换密钥

Comments

Loading comments...