Ox0400/dsh-vault ↗★ 11

dsh-vault

用于存储开发者凭据的加密保险箱插件 适合需要在DSH中安全存储和读取API密钥、密码等敏感凭据的用户。

包名
dsh-vault
兼容性
待验证
Harness 依赖范围
>=0.1.0-rc.6
Cordis 依赖范围
>=4.0.0
版本
1.10.74-rc.4
许可证
MIT
最近更新
2026年9月24日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Ox0400/dsh-vault

Configuration

[!WARNING] Security: never put the master password in plaintext A profile patch (cordis.patch.yml / cordis.yml) is a config file that is easy to commit to git, screenshot, or capture in logs — so a plaintext masterPassword: row leaks the key to your whole encrypted vault. Always use masterPasswordEnv and export the real password into the process/shell environment instead (e.g. export DSH_VAULT_PASSWORD='…'). See the community-plugin-audit handbook for the evidence-first checklist for credential-handling plugins.

# ✗ DON'T — plaintext master password in a config file
- id: vault
  name: dsh-vault
  config:
    masterPassword: 'my-secret'
# ✓ DO — reference an environment variable; keep the file itself 0600
- id: vault
  name: dsh-vault
  config:
    masterPasswordEnv: DSH_VAULT_PASSWORD
OptionDescription
masterPasswordThe master password inline (appears in cordis.yml; not recommended)
masterPasswordEnvEnvironment variable name holding the master password (recommended)
pathVault file path; defaults to $DSH_HOME/vault/default.json
nameVault name for the default path (e.g. name: work → $DSH_HOME/vault/work.json)
accessModeAccess policy for the model tools. Three states: readonly (mutations rejected on tools + UI), ask (default — reads free, every add/update/delete goes through the harness approval channel so the user confirms each write), or auto (automatic read-write, no per-call prompt). The Settings UI offers this exact three-way choice and persists it to /access.json.
autoCapturefalse (default). When true, the system prompt instructs the model to detect credentials shared in conversation and — per user preference — offer to save them with vault_add.
lockTimeoutSecondsAuto-lock: after this many seconds of inactivity the vault re-locks (key wiped) and every read/write requires vault_unlock. 0/absent disables.
exportPasswordEnvEnvironment variable holding the export/import password for vault_export/vault_import (never pass it as a model argument).
backupRetentionHow many encrypted backups to keep (default 10); vault_backup prunes older copies.

Example:

- id: vault
  name: dsh-vault
  config:
    masterPasswordEnv: DSH_VAULT_PASSWORD
    accessMode: ask
    autoCapture: true

With autoCapture: true, when you share a credential in chat (e.g. "my npm token is npm_…"), the assistant offers to store it; on your consent it calls vault_add immediately. With autoCapture off, credentials are only saved when you explicitly ask. The Settings UI shows the current mode (read-only / ask-before-write / automatic read-write) with a dropdown to switch it, an auto-capture toggle (detect credentials shared in chat → offer to save), a kind filter, a health & rotation summary, a trash view, and masked secret fields with a Show/Hide toggle.

The vault is created automatically on first tool use; every launch re-unlocks with the master password. Forgetting the master password = permanent data loss (no backdoor — by design).