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

openclaw-secrets-hygieneOpenClaw secrets hygiene 搜索

Agent Skill

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

总安装

3,089

周安装

130

GitHub Stars

公开资料未说明

下载量

1,082
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install openclaw-secrets-hygiene

简介

通过协调网关重新启动、将纯文本凭证转换为 SecretRef 格式以及验证配置准确性来管理和审核 OpenClaw 机密。

SKILL.md

OpenClaw Secrets Hygiene Skill

Description

OpenClaw-specific secrets management and credential hygiene based on real implementation experience. Handles OpenClaw's unique patterns: gateway coordination, SecretRef format nuances, auth-profiles.json vs models.json differences, and sequential execution to avoid gateway conflicts.

When to Use

  • Auditing OpenClaw deployments for plaintext credentials
  • Migrating plaintext secrets to OpenClaw secrets management
  • Troubleshooting unresolved SecretRef objects
  • Coordinating gateway operations during secrets integration
  • Developing security policies for OpenClaw deployments

Inputs

  • Optional: Path to OpenClaw configuration directory (default: ~/.openclaw)
  • Optional: Agent IDs to audit (default: all agents)
  • Optional: Skip gateway operations flag (for analysis-only mode)

Outputs

  1. Audit report: Plaintext findings categorized by risk level
  2. Migration plan: Step-by-step migration instructions
  3. Configuration templates: Updated files with secret references
  4. Testing checklist: Validation steps for secrets integration
  5. Troubleshooting guide: Common issues and solutions

Key Learnings from Implementation

1. Gateway Coordination is Critical

  • Problem: Parallel gateway restarts cause connection loss (gateway closed (1012): service restart)
  • Solution: Sequential execution with only one subagent authorized for gateway operations
  • Pattern: Analysis → Preparation → Application → Testing (single gateway restart)

2. OpenClaw SecretRef Format Nuances

  • JSON Pointer format: References use /secret-name (JSON Pointer with leading slash)
  • secrets.json keys: Use "secret-name" (NO leading slash in key names)
  • Correct pattern: Reference "/secret-name" → Key "secret-name" in secrets.json
  • Provider reference: Must match filemain provider name in openclaw.json

3. Different File Types, Different Approaches

  • openclaw.json: Gateway token, external API keys - use SecretRef objects
  • auth-profiles.json: Authentication profiles - migrate to SecretRef objects
  • models.json: Model provider API keys - use placeholder "secretref-managed" string (OpenClaw resolves to secrets)

4. Testing Patterns

  • Gateway health: curl http://127.0.0.1:18789/health
  • Secrets audit: openclaw secrets audit
  • Secrets reload: openclaw secrets reload (may need OPENCLAW_GATEWAY_TOKEN env var)
  • Validation: Plaintext count reduction, unresolved reference resolution

Implementation Workflow

Phase 1: Audit & Analysis

# 1. Initial audit
openclaw secrets audit

# 2. Categorize findings
# - openclaw.json: Gateway token, external API keys
# - auth-profiles.json: Authentication profiles  
# - models.json: Model provider API keys

# 3. Risk assessment
# High: Gateway token, external API keys
# Medium: Authentication profiles
# Low: Model provider keys (agent-directory protected)

Phase 2: Preparation

# 1. Create centralized secrets file
mkdir -p ~/.openclaw
cat > ~/.openclaw/secrets.json << 'EOF'
{
  "gateway-token": "REPLACE_WITH_TOKEN",
  "brave-api-key": "REPLACE_WITH_KEY",
  "openai-api-key": "REPLACE_WITH_KEY",
  "agent-openrouter-key": "REPLACE_WITH_KEY"
}
EOF
chmod 600 ~/.openclaw/secrets.json

# 2. Update openclaw.json with secret references
# Change plaintext values to:
# {
#   "source": "file",
#   "provider": "filemain",
#   "id": "/secret-name"
# }

Phase 3: Agent Configuration Updates

# 1. Update auth-profiles.json files
# Change "key": "plaintext" to:
# "key": {
#   "source": "file",
#   "provider": "filemain",
#   "id": "/secret-name"
# }

# 2. Handle models.json API keys
# Use placeholder string (OpenClaw will resolve from secrets):
# "apiKey": "secretref-managed"
# NOT SecretRef objects (causes unresolved references)
# OpenClaw replaces placeholder with actual secret at runtime

Phase 4: Testing & Validation

# 1. Set gateway token for CLI operations
export OPENCLAW_GATEWAY_TOKEN="your-token"

# 2. Reload secrets
openclaw secrets reload

# 3. Verify audit improvement
openclaw secrets audit

# 4. Test gateway functionality
curl http://127.0.0.1:18789/health

# 5. Test external integrations (if applicable)
# Brave search, model API calls, etc.

Common Issues & Solutions

Issue 1: "JSON pointer segment does not exist"

Cause: Secret reference format mismatch Solution: Ensure secrets.json has key secret-name (no slash) for reference /secret-name

Issue 2: "gateway closed (1012): service restart"

Cause: Parallel gateway operations Solution: Sequential execution, single gateway restart point

Issue 3: "unresolved SecretRef object; regenerate models.json"

Cause: models.json contains SecretRef objects instead of placeholder strings Solution: Replace SecretRef objects with "secretref-managed" placeholder string Emergency fix: Use Python/script to convert {"source": "file", ...}"secretref-managed"

import json

with open('models.json', 'r') as f:
    data = json.load(f)

if 'providers' in data:
    for provider in data['providers']:
        if 'apiKey' in data['providers'][provider]:
            if isinstance(data['providers'][provider]['apiKey'], dict):
                data['providers'][provider]['apiKey'] = 'secretref-managed'

with open('models.json', 'w') as f:
    json.dump(data, f, indent=2)

Issue 4: "requires interactive TTY"

Cause: openclaw secrets configure needs terminal Solution: Manual configuration or environment variable workaround

Security Considerations

Risk Levels

  • High: Gateway token, external API keys (Brave, etc.)
  • Medium: Authentication profiles
  • Low: Model provider keys (protected in agent directories)

Acceptable Deferred Items

  • models.json API keys may remain plaintext if:

- Files are in protected agent directories (~/.openclaw/agents/*/agent/) - No world-readable permissions - Documented as technical debt

Documentation Requirements

  • Migration plan with timestamps
  • Policy framework for ongoing management
  • Regular audit schedule (weekly recommended)

Templates & Examples

secrets.json Template

{
  "gateway-token": "REPLACE",
  "brave-api-key": "REPLACE",
  "openai-api-key": "REPLACE",
  "agent-openrouter-key": "REPLACE"
}

auth-profiles.json Update Template

{
  "version": 1,
  "profiles": {
    "provider:profile": {
      "type": "api_key",
      "provider": "provider",
      "key": {
        "source": "file",
        "provider": "filemain",
        "id": "/secret-name"
      }
    }
  }
}

Success Metrics

  • Plaintext findings reduced by 70%+
  • Gateway operational with secret token
  • External integrations working with secret keys
  • Documentation complete (migration plan, policies)
  • Regular audit schedule established

Skill Author: Based on real OpenClaw security remediation experience by jlab1201 (2026-04-11) Lessons Incorporated: Gateway coordination, OpenClaw SecretRef patterns, emergency resolution techniques

适合场景

01

调用多模型

02

代码和文本生成

03

Agent 推理流程

04

OpenRouter 模型接入

能力概览

能力 1

统一调用多种 LLM

能力 2

支持 Claude、Gemini、Kimi 等模型

能力 3

适合聊天、代码和推理任务

能力 4

可作为 Agent 模型调用入口

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

平台分布

OpenClaw

73.47%
按下载量换算795

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills