返回顶部
E

Enterprise Security企业安全

企业级安全套件 - 高危操作确认、自动备份、回滚机制、技能安检

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

Enterprise Security

企业级安全套件 (Enterprise Security)

版本: 1.0.0
作者: Cloud
适用: OpenClaw Agent / 企业级 / 个人开发者



🛡️ 功能

1. 高危操作确认

7 类高危操作前自动提示确认:

  • - ✅ 修改任何 MD 文件
  • ✅ 安装/卸载/更新 skill
  • ✅ 重启 Gateway
  • ✅ 删除文件/目录
  • ✅ 创建/修改/删除 cron 任务
  • ✅ 修改环境变量/API 密钥
  • ✅ 发送外部消息

2. 自动备份

修改文件前自动创建备份:

  • - 支持 .md/.json/.js/.ts/.py 等文件
  • 命名格式:文件名.YYYYMMDD.NNN.bak
  • 自动清理过期备份

3. 变更日志

自动记录所有高危操作到 CHANGELOG.md:

  • - 操作类型
  • 修改原因
  • 执行者
  • 回滚方法

4. 回滚机制

支持从备份文件恢复:

  • - 一键回滚
  • 自动备份回滚前状态
  • 记录回滚日志

5. 技能安装安检

安装 skill 前自动检查:

  • - 来源验证
  • 代码审查
  • 依赖检查
  • 权限评估
  • 风险等级判定



🚀 安装

bash

1. 安装 Skill


clawhub install enterprise-security

2. 激活(写入安全规则到记忆)

node ~/.openclaw/workspace/skills/enterprise-security/activate.js

3. 重启 Gateway

openclaw gateway restart

完成! AI 会自动执行安全检查。



🔧 使用

方式 1:AI 自动调用(推荐)

激活后,AI 会自动在执行高危操作前调用:

AI 准备修改文件 → 自动调用 confirmHighRisk → 用户确认 → 执行

方式 2:手动调用

javascript
const security = require(./skills/enterprise-security);

// 高危操作确认
await security.confirmHighRisk({
operation: modify_file,
file: MEMORY.md,
reason: 更新记忆系统
});

// 自动备份
await security.autoBackup({
filePath: ~/.openclaw/workspace/SOUL.md,
reason: 修改前备份
});

// 技能安检
const result = await security.checkSkill({
skillName: new-skill,
author: community-user,
repository: github.com/user/new-skill
});

if (result.risk === high) {
throw new Error(高风险技能,拒绝安装);
}

// 回滚
await security.rollback({
file: MEMORY.md,
targetVersion: 20260311.001,
reason: 用户要求回滚
});



📝 配置

编辑 config/rules.json:

json
{
highriskoperations: [
modifymdfiles,
install_skills,
restart_gateway,
delete_files,
modify_cron,
modify_env,
sendexternalmessages
],
auto_backup: {
enabled: true,
file_types: [.md, .json, .js, .ts, .py],
maxbackupsper_file: 10
},
changelog: {
enabled: true,
path: memory/CHANGELOG.md
},
security_check: {
enabled: true,
whitelist: [github.com/openclaw]
}
}



📊 API 参考

confirmHighRisk(options)

高危操作确认

javascript
await security.confirmHighRisk({
operation: modify_file, // 操作类型
file: test.md, // 涉及文件(可选)
reason: 更新配置 // 原因(可选)
});

autoBackup(options)

自动备份

javascript
await security.autoBackup({
filePath: test.md, // 文件路径
reason: 修改前备份 // 原因(可选)
});

checkSkill(options)

技能安装安检

javascript
const result = await security.checkSkill({
skillName: new-skill,
author: user,
repository: github.com/user/skill,
permissions: [read_file],
dependencies: []
});

console.log(result.risk); // low/medium/high
console.log(result.recommendations);

rollback(options)

回滚操作

javascript
await security.rollback({
file: test.md, // 文件路径
targetVersion: 20260311.001, // 目标版本
reason: 用户要求回滚 // 原因
});



📝 更新日志

v1.0.0 (2026-03-11)

  • - ✅ 初始版本
  • ✅ 高危操作确认
  • ✅ 自动备份
  • ✅ 变更日志
  • ✅ 回滚机制
  • ✅ 技能安装安检

📞 联系方式

  • - 作者: Cloud
  • GitHub: [待填写]

📄 许可证

MIT License

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 enterprise-security-suite-1776155348 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 enterprise-security-suite-1776155348 技能

通过命令行安装

skillhub install enterprise-security-suite-1776155348

下载

⬇ 下载 Enterprise Security v1.0.1(免费)

文件大小: 10.28 KB | 发布时间: 2026-4-15 12:40

v1.0.1 最新 2026-4-15 12:40
- Refactored module structure: removed modules/confirmation.js, added modules/confirm.js and activate.js, with updates to imports/usages.
- Simplified and shortened documentation in SKILL.md: merged feature overviews, reduced redundancy, and updated configuration/API reference.
- Changed skill name and slug to "Enterprise Security" for consistency.
- Updated auto-backup options: clarified supported file types, removed .jsx/.tsx from examples, added max_backups_per_file.
- Removed .clawhub-publish.json, README.md, and old config/rules.json; configuration is now directly in SKILL.md.
- Improved activation and setup workflow, introducing explicit activation step via activate.js.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部