bambu-studio-ai
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
企业级安全套件 - 高危操作确认、自动备份、回滚机制、技能安检
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
SkillHub CLI
skillhub install gk752448784/enterprise-security-suiteInspect the source and compatibility requirements, then follow its installation steps.
Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.
版本: 1.0.0
作者: Cloud
适用: OpenClaw Agent / 企业级 / 个人开发者
7 类高危操作前自动提示确认:
修改文件前自动创建备份:
文件名.YYYYMMDD.NNN.bak
自动记录所有高危操作到 CHANGELOG.md:
支持从备份文件恢复:
安装 skill 前自动检查:
# 1. 安装 Skill
clawhub install enterprise-security
# 2. 激活(写入安全规则到记忆)
node ~/.openclaw/workspace/skills/enterprise-security/activate.js
# 3. 重启 Gateway
openclaw gateway restart
完成! AI 会自动执行安全检查。
激活后,AI 会自动在执行高危操作前调用:
AI 准备修改文件 → 自动调用 confirmHighRisk → 用户确认 → 执行
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:
{
"high_risk_operations": [
"modify_md_files",
"...
These signals come from indexed source analysis and may lag behind changes. Check the current source files.
# 企业级安全套件 (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
{
"high_risk_operations": [
"modify_md_files",
"...Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
Search and hire real humans for tasks — photography, delivery, research, and more
Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.
Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...