env-secure-manager

Secure environment variable & secret management with AES-256 encryption, auto-redaction, permission control, prevent credential leakage

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "env-secure-manager" with this command: npx skills add ayalili/env-secure-manager

🔐 环境变量安全管理器

核心亮点

  1. 🛡️ AES-256加密存储:敏感信息自动加密,即使配置文件泄露也无法获取明文密钥
  2. 🚫 自动脱敏机制:自动检测并脱敏输出中的敏感信息,防止密钥泄露到日志/聊天记录
  3. 🔑 权限控制:访问敏感值需要显式授权,避免意外泄露
  4. 🔄 自动密钥生成:首次使用自动生成安全密钥,也支持自定义密钥

🎯 适用场景

  • 管理API密钥、数据库密码等敏感信息
  • 防止敏感信息泄露到日志、输出或会话历史
  • 批量加载环境变量,统一管理配置
  • 多Agent环境下的安全配置共享

📝 参数说明

参数类型必填说明
actionstring操作类型:init/set/get/list/delete/redact/loadFromEnv
keystringset/get/delete操作必填,环境变量名,大写字母+下划线
valuestringset操作必填,变量值
isSecretbooleanset操作可选,是否为敏感信息,默认false
allowSecretbooleanget操作可选,是否允许获取敏感值,默认false
textstringredact操作必填,要脱敏的文本
prefixstringloadFromEnv操作可选,环境变量前缀,默认OPENCLAW_
encryptionKeystringinit操作可选,自定义32位加密密钥

💡 开箱即用示例

初始化(可选,建议启动时调用)

// 使用自定义密钥
await skills.envSecureManager({
  action: "init",
  encryptionKey: "你的32位安全密钥"
});

// 自动生成密钥
await skills.envSecureManager({ action: "init" });

存储敏感密钥

await skills.envSecureManager({
  action: "set",
  key: "OPENAI_API_KEY",
  value: "sk-xxx",
  isSecret: true
});

安全获取密钥

const result = await skills.envSecureManager({
  action: "get",
  key: "OPENAI_API_KEY",
  allowSecret: true // 必须显式授权才能获取敏感值
});

输出自动脱敏

// 即使日志里不小心打印了密钥,也会自动脱敏
const logText = `调用OpenAI API,密钥是sk-xxx,参数是xxx`;
const redacted = await skills.envSecureManager({
  action: "redact",
  text: logText
});
// 输出:调用OpenAI API,密钥是***REDACTED***,参数是xxx

🔧 技术实现说明

  • 使用AES-GCM 256位加密算法,符合企业级安全标准
  • 敏感信息永远不以明文存储,运行时解密
  • 自动脱敏机制支持多值替换,覆盖所有泄露场景
  • 轻量无依赖,不影响Agent执行性能

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Accelo

Accelo integration. Manage Organizations, Leads, Pipelines, Users, Goals, Filters. Use when the user wants to interact with Accelo data.

Registry SourceRecently Updated
General

8X8

8x8 integration. Manage Persons, Organizations, Deals, Leads, Activities, Notes and more. Use when the user wants to interact with 8x8 data.

Registry SourceRecently Updated
General

7Shifts

7shifts integration. Manage Companies. Use when the user wants to interact with 7shifts data.

Registry SourceRecently Updated
General

46Elks

46elks integration. Manage Organizations. Use when the user wants to interact with 46elks data.

Registry SourceRecently Updated