credential-vault
by chloepark85
Encrypted credential storage for OpenClaw agents. Stop storing API keys in plaintext.
安装
claude skill add --url github.com/openclaw/skills/tree/main/skills/chloepark85/credential-vault必需命令行工具
uv文档
🔐 Credential Vault
Encrypted credential storage for OpenClaw agents. Stop storing API keys in plaintext.
Overview
Credential Vault provides AES-256-GCM encrypted local storage for API keys, tokens, and other secrets. Instead of scattering credentials across .env files, centralize them in an encrypted vault with audit logging and expiry tracking.
Features
- AES-256-GCM encryption with PBKDF2 key derivation (600,000 iterations)
- CRUD operations for credentials
- Tag-based organization (by skill, project, etc.)
- Environment variable injection for easy integration
- Expiry tracking with notifications
- Audit logging (who accessed what, when)
- Session-based unlocking (no password re-entry)
Installation
cd ~/ubik-collective/systems/ubik-pm/skills/credential-vault
uv sync
Quick Start
# Initialize vault (one-time setup)
uv run vault init
# Unlock vault
uv run vault unlock
# Add credentials
uv run vault add OPENAI_API_KEY "sk-..." --tag openai
uv run vault add TAVILY_API_KEY "tvly-..." --tag tavily --expires 2026-12-31
# List credentials
uv run vault list
# Get a credential
uv run vault get OPENAI_API_KEY
# Export for a skill
eval $(uv run vault env --tag tavily)
# Lock when done
uv run vault lock
Security Model
Encryption
- Master password → PBKDF2-SHA256 (600,000 iterations) → 256-bit key
- Each secret encrypted with AES-256-GCM (unique nonce per entry)
- Authentication tags verify integrity
- Master password never stored (only verification hash)
Storage
- Vault:
~/.openclaw/vault/vault.enc.json(encrypted) - Audit log:
~/.openclaw/vault/audit.log(plaintext, no values) - Session key:
~/.openclaw/vault/session(temporary, cleared on lock)
Permissions
- Vault file:
0600(owner read/write only) - Session key: deleted on
vault lock
Threat Model
Protects against:
- ✅ Accidental credential leaks (git commits, logs)
- ✅ Casual file browsing
- ✅ Malware reading
.envfiles
Does NOT protect against:
- ❌ Keyloggers (can capture master password)
- ❌ Root-level system compromise
- ❌ Memory dumps while vault is unlocked
Usage Examples
See EXAMPLE.md for detailed usage patterns.
Commands
vault init
Initialize a new vault with a master password.
vault unlock
Unlock the vault for the current session.
vault lock
Lock the vault and clear session key.
vault status
Show vault status (locked/unlocked, credential count).
vault add KEY_NAME [VALUE] [--tag TAG] [--expires DATE]
Add or update a credential. If VALUE is omitted, prompts securely.
vault get KEY_NAME
Retrieve and decrypt a credential.
vault list [--tag TAG]
List all credentials (values masked). Optionally filter by tag.
vault remove KEY_NAME [-y]
Remove a credential. Prompts for confirmation unless -y is passed.
vault env [--tag TAG]
Export credentials as KEY=VALUE for environment injection.
Example:
eval $(uv run vault env --tag openai)
echo $OPENAI_API_KEY # Now available
vault audit [--last N]
View recent audit log entries.
vault expiring [--days N]
Check for credentials expiring within N days (default: 7).
vault rotate KEY_NAME [NEW_VALUE]
Replace a credential with a new value (preserves tags/metadata).
Integration with Skills
Pattern: Inject credentials before running a skill
# Tavily search skill
eval $(uv run vault env --tag tavily)
uv run scripts/search.py "OpenClaw release date"
Pattern: Skill checks vault directly
from lib.store import Store
store = Store()
# Assumes vault is unlocked by user beforehand
api_key = store.get("TAVILY_API_KEY")
Pattern: Auto-unlock in HEARTBEAT.md
# HEARTBEAT.md
Check if vault is locked. If so, prompt user to unlock before running daily checks.
Best Practices
- Use tags consistently — Tag credentials by skill name for easy filtering
- Set expiry dates — Track when API keys need rotation
- Lock when idle — Run
vault lockwhen not actively using credentials - One vault per machine — Don't sync the vault file across machines
- Rotate regularly — Use
vault expiringto track upcoming expirations - Review audit logs — Check
vault auditperiodically
Limitations
- Local only — No network sync (by design)
- Single-user — No multi-user access control
- No backup — User responsible for backing up
~/.openclaw/vault/ - Session key on disk —
vault unlockstores decryption key untilvault lock
Troubleshooting
"Vault is locked"
Run uv run vault unlock and enter your master password.
"Incorrect master password"
Double-check your password. If forgotten, you'll need to reinitialize (losing all credentials).
"Vault not initialized"
Run uv run vault init to create a new vault.
Session key persists after reboot
Session file is cleared on vault lock, but not automatically on reboot. Run vault lock explicitly.
Development
Run tests
uv run pytest
Add a test
See tests/test_roundtrip.py for examples.
License
MIT-0 (public domain equivalent)
相关 Skills
安全专家
by alirezarezvani
覆盖威胁建模、漏洞评估、安全架构设计、代码审计与渗透测试,内置 STRIDE、OWASP、加密模式和安全扫描流程,适合系统设计评审与上线前安全排查。
✎ 安全专家把威胁建模、漏洞分析到渗透测试串成一套流程,内置 STRIDE 与 OWASP 指南,做安全设计和排查更省心。
安全运营
by alirezarezvani
覆盖应用安全、漏洞管理与合规审计,支持代码/依赖扫描、CVE 评估、Secrets 检测和安全自动化,适合做安全基线落地、漏洞响应、审计检查与安全开发治理。
✎ 应用安全、漏洞管理和合规检查一套打通,还能自动化扫描与响应,帮团队更早发现并收敛风险。
安全审计
by alirezarezvani
安装前审计 Claude Code Skill 的代码执行、Prompt 注入和依赖供应链风险,支持本地目录或 Git 仓库扫描,输出 PASS/WARN/FAIL 结论及修复建议
✎ 把代码审查、漏洞扫描和合规检查串成一条线,帮团队更早发现风险,做安全治理更省心。
相关 MCP 服务
by Sentry
搜索和分析 Sentry 错误报告,辅助调试。
✎ 把零散的 Sentry 错误报告变成可检索线索,帮你在海量报错里更快定位线上故障,排障调试明显省时。
by sinewaveai
为 AI agents 提供安全层:拦截 prompt injection、识别伪造 packages,并扫描漏洞风险。
✎ 给 AI Agent 补上关键安全层,能拦截 prompt 注入、识别伪造包并扫描漏洞风险,把防护前置更省心。
by pantheon-security
强化安全性的 NotebookLM MCP,集成 post-quantum encryption,提升数据防护能力。