返回顶部
z

zero2ai-security-audit安全审计

Security auditing for git commits, repos, and skills before publishing. Run automatically before any `git commit`, `git push`, or `clawhub publish`. Detects hardcoded secrets, API keys, tokens, absolute paths, committed node_modules, .env files, and other sensitive patterns. Use when reviewing code for security issues, pre-publishing skills, or investigating a potential secret exposure.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
296
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

zero2ai-security-audit

安全审计

每次提交、推送或发布技能前,必须运行 scripts/audit.py,无一例外。

何时运行

触发条件命令
执行 git commit 前python3 {skilldir}/scripts/audit.py --staged
执行 git push 前
python3 {skilldir}/scripts/audit.py --last-commit | | 执行 clawhub publish 前 | python3 {skilldir}/scripts/audit.py path> | | 临时扫描任意路径 | python3 {skill_dir}/scripts/audit.py |

{skill_dir} = /home/aladdin/.openclaw/workspace/skills/skill-security-audit

退出码

  • - 0 = 干净
  • 1 = 存在高危或中危发现(阻止发布/推送)
  • 2 = 使用错误

检测内容

严重级别模式
🔴 高危API密钥、机密信息、密码、JWT令牌、WooCommerce密钥、AWS密钥、私钥块、Bearer令牌、.env文件
🟡 中危
绝对路径 /home//、/root/ 路径、刷新令牌、已提交的 node_modules/ | | 🔵 低危 | 硬编码IP、长base64字符串 |

规则

  1. 1. 高危发现 = 硬性阻止。 绝不允许在存在高危发现的情况下提交或发布。立即轮换任何已暴露的机密信息。
  2. 中危发现 = 发布前修复。 将绝对路径替换为相对路径或环境变量默认值。移除 node_modules/。
  3. 低危发现 = 审查。 不阻止但需调查。
  4. 误报处理: 如果匹配项是变量名或安全占位符(非实际值),请在注释中说明其安全性原因,然后重新运行。

发现真实机密信息后的处理

  1. 1. 不要推送该提交。 如果已推送:立即轮换该机密信息,然后重写历史记录或从git中删除该文件。
  2. 在提供商门户(TikTok开发者平台、AWS IAM、WooCommerce等)中轮换。
  3. 迁移至环境变量:process.env.SECRET_NAME 或从仓库外的本地配置文件中读取。
  4. 将配置文件路径添加到 .gitignore。
  5. 立即向Aladdin报告,说明严重级别和暴露的内容。

技能发布检查清单

执行 clawhub publish 前:

  • - [ ] audit.py path> 返回0(干净)
  • [ ] 技能文件夹中不存在 nodemodules/
  • [ ] 无指向用户主目录的绝对路径
  • [ ] 无硬编码的业务特定ID或凭据
  • [ ] package.json 中的名称与技能文件夹名称一致
  • [ ] 如果已重命名,更新SKILL.md中的描述

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 zero2ai-security-audit-1776289180 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 zero2ai-security-audit-1776289180 技能

通过命令行安装

skillhub install zero2ai-security-audit-1776289180

下载

⬇ 下载 zero2ai-security-audit v1.0.0(免费)

文件大小: 5.54 KB | 发布时间: 2026-4-16 17:39

v1.0.0 最新 2026-4-16 17:39
Initial release of zero2ai-security-audit for automated security checks.

- Automatically audits git commits, pushes, and skill publishing for sensitive info and patterns.
- Detects secrets, API keys, tokens, private key blocks, committed node_modules, .env files, absolute paths, and more.
- Enforces blocking rules for HIGH and MEDIUM severity findings to prevent accidental exposure.
- Provides clear instructions, severity definitions, and remediation steps.
- Includes a publish checklist to ensure best security practices before release.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部