搜索

PythonReactSEOPDF
OpenClaw

keychain-bridge

Manage secrets via macOS Keychain instead of plaintext files. Migrate existing secrets, read/write keychain entries, bridge to files for bash tools, audit for leaks, diagnose access issues. Use when asked about secrets, keychain, credentials, API keys, or security hardening on macOS.

euda1mon1a0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install euda1mon1a/keychain-bridge

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Keychain Bridge

Trigger Phrases

  • "migrate secrets to keychain" / "move secrets"
  • "check keychain health" / "keychain status"
  • "audit secrets" / "check for leaks"
  • "read secret" / "get API key"
  • "store secret" / "write to keychain"
  • "keychain not working" / "security find-generic-password hangs"

Example Usage

User: "Migrate my secrets to the keychain"
Action: python3 SKILL_DIR/scripts/migrate_secrets.py --dir ~/.openclaw/secrets/ --account moltbot --dry-run

User: "Check if the keychain bridge is healthy"
Action: Run keychain health check (test write/read/delete cycle)

User: "Audit for plaintext secret leaks"
Action: python3 SKILL_DIR/scripts/audit_secrets.py --dir ~/.openclaw/secrets/ --account moltbot

Manage secrets via macOS Keychain instead of plaintext files. Eliminates plaintext credential storage while maintaining compatibility with bash-based tools through a file-bridge architecture.

Prerequisites

The keyring Python library must be installed for each Python version that will access secrets:

pip3 install keyring
# If multiple Python versions exist (common on macOS):
/usr/bin/python3 -m pip install keyring
/opt/homebrew/opt/python@3.14/bin/python3.14 -m pip install --break-system-packages keyring

Check Keychain Health

Verify the keychain bridge is working correctly:

python3 -c "
import keyring
# Test write
keyring.set_password('keychain-bridge-test', 'test', 'hello')
# Test read
val = keyring.get_password('keychain-bridge-test', 'test')
assert val == 'hello', f'Read back {val!r}, expected hello'
# Cleanup
keyring.delete_password('keychain-bridge-test', 'test')
print('Keychain health: OK')
"

If this fails, see Diagnose Issues below.

Migrate Secrets

Migrate plaintext secret files to macOS Keychain. The migration tool:

  • Auto-detects all Python versions on the system
  • Injects each secret from ALL detected Python binaries (required for ACL coverage)
  • Verifies the round-trip read
  • Optiona...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/euda1mon1a/keychain-bridge
Version
—
Commit
33dc05022d4dd4d3b4159c893cd824875531aef5
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Keychain Bridge for OpenClaw

Stop storing API keys in plaintext. Migrate your OpenClaw secrets to macOS Keychain with one command — and never worry about credential leaks again.

The Problem

macOS Tahoe 26.x introduced several breaking changes to keychain access that affect OpenClaw deployments:

  • security find-generic-password -w hangs indefinitely — the standard CLI method for reading keychain items is broken on Tahoe (exit code 36 or infinite hang)
  • Plaintext files in ~/.openclaw/secrets/ are discoverable by any process with file access — and 283 ClawHub skills were found with credential exposure
  • Keychain ACLs are per-binary — an item created by Python 3.9 can't be read by Python 3.14 unless both binaries are in the ACL
  • Python keyring hangs from bash LaunchAgents — a novel finding where the SecurityAgent session attachment is lost in bash-to-python subprocess transitions

The Solution

Keychain Bridge is a battle-tested skill built from a real production deployment on a Mac Mini M4 Pro running OpenClaw 24/7 with 12+ API keys, 25 scripts, and 15 cron jobs. It provides:

  • One-command migration from plaintext files to macOS Keychain
  • Auto-detection of all Python versions on the system with full ACL coverage
  • Group A/B architecture for mixed Python/bash environments
  • Plaintext leak auditor that catches forgotten secret files
  • Diagnostic tools for every known Tahoe keychain failure mode
  • Boot-time file bridge for bash scripts that can't use keychain directly

What You Get

File Purpose
SKILL.md Full agent instructions — your OpenClaw agent knows how to use everything
scripts/migrate_secrets.py Batch migration with multi-Python ACL injection and verification
scripts/audit_secrets.py Continuous plaintext leak detection and keychain health checks
scripts/keychain_helper.py Drop-in Python module — replaces file reads with keychain lookups
...

来源内容

SKILL.md
# Keychain Bridge

## Trigger Phrases

- "migrate secrets to keychain" / "move secrets"
- "check keychain health" / "keychain status"
- "audit secrets" / "check for leaks"
- "read secret" / "get API key"
- "store secret" / "write to keychain"
- "keychain not working" / "security find-generic-password hangs"

## Example Usage

```
User: "Migrate my secrets to the keychain"
Action: python3 SKILL_DIR/scripts/migrate_secrets.py --dir ~/.openclaw/secrets/ --account moltbot --dry-run

User: "Check if the keychain bridge is healthy"
Action: Run keychain health check (test write/read/delete cycle)

User: "Audit for plaintext secret leaks"
Action: python3 SKILL_DIR/scripts/audit_secrets.py --dir ~/.openclaw/secrets/ --account moltbot
```

Manage secrets via macOS Keychain instead of plaintext files. Eliminates plaintext credential storage while maintaining compatibility with bash-based tools through a file-bridge architecture.

## Prerequisites

The `keyring` Python library must be installed for each Python version that will access secrets:

```bash
pip3 install keyring
# If multiple Python versions exist (common on macOS):
/usr/bin/python3 -m pip install keyring
/opt/homebrew/opt/python@3.14/bin/python3.14 -m pip install --break-system-packages keyring
```

## Check Keychain Health

Verify the keychain bridge is working correctly:

```bash
python3 -c "
import keyring
# Test write
keyring.set_password('keychain-bridge-test', 'test', 'hello')
# Test read
val = keyring.get_password('keychain-bridge-test', 'test')
assert val == 'hello', f'Read back {val!r}, expected hello'
# Cleanup
keyring.delete_password('keychain-bridge-test', 'test')
print('Keychain health: OK')
"
```

If this fails, see **Diagnose Issues** below.

## Migrate Secrets

Migrate plaintext secret files to macOS Keychain. The migration tool:
- Auto-detects all Python versions on the system
- Injects each secret from ALL detected Python binaries (required for ACL coverage)
- Verifies the round-trip read
- Optiona...
README
# Keychain Bridge for OpenClaw

Stop storing API keys in plaintext. Migrate your OpenClaw secrets to macOS
Keychain with one command — and never worry about credential leaks again.

## The Problem

macOS Tahoe 26.x introduced several breaking changes to keychain access that
affect OpenClaw deployments:

- **`security find-generic-password -w` hangs indefinitely** — the standard CLI
  method for reading keychain items is broken on Tahoe (exit code 36 or infinite hang)
- **Plaintext files in `~/.openclaw/secrets/`** are discoverable by any process
  with file access — and 283 ClawHub skills were found with credential exposure
- **Keychain ACLs are per-binary** — an item created by Python 3.9 can't be read
  by Python 3.14 unless both binaries are in the ACL
- **Python keyring hangs from bash LaunchAgents** — a novel finding where the
  SecurityAgent session attachment is lost in bash-to-python subprocess transitions

## The Solution

Keychain Bridge is a battle-tested skill built from a real production deployment
on a Mac Mini M4 Pro running OpenClaw 24/7 with 12+ API keys, 25 scripts, and
15 cron jobs. It provides:

- **One-command migration** from plaintext files to macOS Keychain
- **Auto-detection** of all Python versions on the system with full ACL coverage
- **Group A/B architecture** for mixed Python/bash environments
- **Plaintext leak auditor** that catches forgotten secret files
- **Diagnostic tools** for every known Tahoe keychain failure mode
- **Boot-time file bridge** for bash scripts that can't use keychain directly

## What You Get

| File | Purpose |
|------|---------|
| `SKILL.md` | Full agent instructions — your OpenClaw agent knows how to use everything |
| `scripts/migrate_secrets.py` | Batch migration with multi-Python ACL injection and verification |
| `scripts/audit_secrets.py` | Continuous plaintext leak detection and keychain health checks |
| `scripts/keychain_helper.py` | Drop-in Python module — replaces file reads with keychain lookups |
|...

相关技能

OpenClaw

x402hub

capncoconut

Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...

OpenClaw

claw

capevace

Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.