Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

secret-safe秘密保险箱

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

11,432

周安装

458

GitHub Stars

公开资料未说明

下载量

3,701
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:secret-safe(秘密保险箱)
来源仓库:https://github.com/brycexbt/secret-safe
安装命令:
openclaw skills install secret-safe
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install secret-safe

简介

secret-safe 为 Agent Skill 提供安全的 API 密钥与秘密集中管理机制。

  • 适用于需要通过外部服务认证但又不愿在聊天中明文传递凭证的场景。
  • 支持多种后端存储(如文件、环境变量、远程 KMS),灵活适配不同部署模式。
  • 密钥加载过程需验证来源合法性,防止中间人攻击或配置注入风险。
  • 建议启用访问日志与异常告警,定期检查权限分配是否符合最小特权原则。

SKILL.md

name
secret-safe
description
>
tags
[security, api-keys, credentials, secrets, audit]
version
1.0.0

Secret-Safe: Secure Credential Handling for Agent Skills

Why this skill exists: Snyk researchers found that 7.1% of all ClawHub skills instruct agents to handle API keys through the LLM context — making every secret an active exfiltration channel. This skill teaches the correct pattern.

The Core Rule

A secret must never appear in:

  • The LLM prompt or system context
  • Claude's response or reasoning
  • Logs, session exports, or .jsonl history files
  • File artifacts created by the agent
  • Error messages echoed back to the user

A secret must only flow through:

  • process.env (injected by OpenClaw before the agent turn)
  • The shell environment of a subprocess the agent spawns
  • A secrets manager CLI (read at subprocess level, not piped back into context)

Pattern 1: Environment Injection (Preferred)

This is OpenClaw's native, secure path. Use it for any skill that needs an API key.

In SKILL.md frontmatter

---
name: my-service-skill
description: Interact with MyService API.
metadata: {"openclaw": {"requires": {"env": ["MY_SERVICE_API_KEY"]}, "primaryEnv": "MY_SERVICE_API_KEY"}}
---

The requires.env gate ensures the skill will not load if the key isn't present — no silent failures, no prompting the user to paste a key mid-conversation.

The primaryEnv field links to skills.entries.<n>.apiKey in openclaw.json, so the user configures it once in their config file, never in chat.

In skill instructions

## Authentication
The API key is available as `$MY_SERVICE_API_KEY` in the shell environment.
Pass it to CLI tools or curl as an environment variable — never echo it or
include it in any output returned to the user.

Example safe curl invocation (instruct the agent to do this)

# CORRECT — key stays in environment, never in command string visible to LLM
MY_SERVICE_API_KEY="$MY_SERVICE_API_KEY" curl -s \
  -H "Authorization: Bearer $MY_SERVICE_API_KEY" \
  https://api.myservice.com/v1/data

Never instruct the agent to do this:

# WRONG — key is visible in LLM context, command history, and logs
curl -H "Authorization: Bearer sk-abc123realkeyhere" https://api.myservice.com/

Pattern 2: Secrets Manager Integration

For production setups or team environments, read secrets from a manager at subprocess level.

Supported managers

ManagerCLIEnv var pattern
macOS Keychainsecurity find-generic-password -wN/A
1Password CLIop read op://vault/item/fieldOP_SERVICE_ACCOUNT_TOKEN
Dopplerdoppler run --DOPPLER_TOKEN
HashiCorp Vaultvault kv get -field=valueVAULT_TOKEN
Bitwarden CLIbw get password item-nameBW_SESSION

Safe shell wrapper pattern

Create a scripts/run-with-secret.sh in your skill:

#!/usr/bin/env bash
# Fetches the secret at subprocess level — never echoes to stdout
SECRET=$(security find-generic-password -s "my-service-api-key" -w 2>/dev/null)
if [ -z "$SECRET" ]; then
  echo "ERROR: Secret 'my-service-api-key' not found in keychain." >&2
  exit 1
fi
export MY_SERVICE_API_KEY="$SECRET"
exec "$@"

The agent runs bash {baseDir}/scripts/run-with-secret.sh <actual-command> — the secret is fetched and injected entirely outside the LLM's view.


Pattern 3: User Setup Flow (first-run)

If the user hasn't configured a key yet, guide them through setup without asking for the key in chat.

Correct setup prompt to give the user:

To use this skill, add your API key to ~/.openclaw/openclaw.json:

  skills:
    entries:
      my-service:
        apiKey: "your-key-here"

Or set it as an environment variable before starting OpenClaw:
  export MY_SERVICE_API_KEY="your-key-here"

Do NOT paste your key into this chat — it will be logged.

Incorrect (never do this):

Please share your API key so I can help you set it up.

Auditing Another Skill for Leaks

When asked to review a SKILL.md for credential safety, check for these patterns:

🔴 Critical — Must Fix

PatternWhy it's dangerous
Instruction to paste key into chatKey goes into LLM context + session logs
echo $API_KEY or print(api_key) in instructionsOutput captured in context
Key interpolated into a string returned to userExposed in response artifact
cat ~/.env or reading raw env filesEntire env dumped into context
Key stored in a file the agent createsCreates a static credential artifact
Instructions tell agent to "remember" the keyKey persists across context window

🟡 Warning — Should Fix

PatternRisk
No requires.env gate in frontmatterSkill silently fails or user is prompted
Logging command output without filteringMay capture keys in error messages
Using set -x in shell scriptsEchoes all commands including key values
Passing key as a positional argumentVisible in ps aux on the host

🟢 Safe Patterns

  • requires.env in frontmatter
  • Key accessed only as $ENV_VAR in shell, never echoed
  • Subprocess scripts that fetch and inject without returning to context
  • Error messages that say "key not found" without printing the value
  • Output filtered through sed/grep before returning to agent

Self-Check Before Publishing a Skill

Run through this checklist before putting any skill on ClawHub:

  • [ ] Does the skill ever ask the user to paste a secret into the conversation?
  • [ ] Does the skill ever echo, print, log, or return a secret value?
  • [ ] Does the skill read a .env file and dump its contents?
  • [ ] Does the skill store a secret in a file artifact?
  • [ ] Are all API key references gated with requires.env in frontmatter?
  • [ ] Do error messages avoid reflecting credential values?
  • [ ] Does any shell script use set -x (which would expose key values)?
  • [ ] Would running clawhub audit {skill-name} pass?

If any box is unchecked, do not publish until fixed.


Quick Reference: Safe vs Unsafe Patterns

# UNSAFE — never write instructions like these:
"Ask the user for their OpenAI API key and use it to call the API."
"Set the Authorization header to Bearer {user_api_key}."
"Store the API key in a variable and use it throughout the session."

# SAFE — write instructions like these:
"The API key is injected as $OPENAI_API_KEY via environment — use it directly."
"Run: OPENAI_API_KEY=$OPENAI_API_KEY curl ..."
"If $OPENAI_API_KEY is not set, print an error and exit — do not ask the user."

Reference Files

  • references/env-injection-examples.md — Full worked examples for popular APIs (OpenAI, Anthropic, GitHub, Stripe, Slack)
  • references/audit-checklist.md — Printable audit checklist for skill authors and reviewers

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

82.03%
按下载量换算3,036

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills