Passwordstore Broker
简介
Passwordstore Broker
原始描述
Enforce safe secret handling by collecting secrets through one-time HTTPS forms, storing them in pass via scripts/vault.sh, and executing tools with environm...
通过你的 Agent 添加
安装目录:passwordstore-broker/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: passwordstore-broker
description: Enforce safe secret handling for agent workflows by never asking users to paste raw passwords/API keys into chat, brokering new secrets through scripts/get_password_from_user.py, storing them in pass via scripts/vault.sh, and executing tools with secret values injected through environment variables (via scripts/run_with_secret.sh) so secrets do not enter model context or logs.
Passwordstore Broker Agent Protocol
Run this exact sequence whenever a task needs credentials.
Prerequisites
- Before first use, ensure local dependencies and
pass initialization are complete by following references/SETUP.md.
Phase 1: Get Secrets
pass initialization are complete by following references/SETUP.md.Goal: ensure required secrets exist in local vault without exposing values in chat.
- Identify required env vars and corresponding secret keys before executing tools.
- Check whether each secret already exists:
scripts/vault.sh exists <secret-name>scripts/vault.sh lsfor discovery if key names are unknown
- If missing, collect it through one-time HTTPS intake:
scripts/get_password_from_user.py --secretname <secret-name> --port <port>
- Send the generated URL to the user and wait for submission to complete.
- The default
localhostURL only works on the same machine. - If the user is remote, use a host/IP or secure tunnel they can access.
- The default
- If intake fails or times out, retry with a new port and same secret name.
Exit criteria:
- All required secret names exist in vault.
Phase 2: Use Secrets
Goal: execute commands with env injection only, never by printing or pasting secrets.
- Run the target command through injector:
scripts/run_with_secret.sh --secret <secret-name> --env <ENV_VAR> -- <command> [args...]- Fallback one-liner:
<ENV_VAR>="$(scripts/vault.sh get <secret-name>)" <command> [args...]
- For multiple secrets, prefer one injected command invocation per secret-bearing step.
- Keep secrets process-local and short-lived:
- avoid writing them to files
- avoid
env,printenv,set, or verbose logs that may reveal values
- If credential is rejected, treat as rotation event and return to Phase 1.
Exit criteria:
- The required authenticated command completes without exposing secret values.
Phase 3: Interact With Vault
Goal: manage vault lifecycle safely and predictably.
Standard operations:
- Store/update secret from stdin:
scripts/vault.sh put <secret-name>
- Read secret (only when absolutely necessary):
scripts/vault.sh get <secret-name>
- Verify existence:
scripts/vault.sh exists <secret-name>
- List keys for discovery:
scripts/vault.sh ls
- Remove obsolete secret:
scripts/vault.sh rm <secret-name>
Naming policy:
- Use stable, scoped paths like:
github/tokenopenai/prod/api_keyaws/staging/access_key_id
Rotation policy:
- Default: replace value under same key.
- Use versioned keys only when the user explicitly requests audit/version history.
Non-Negotiable Guardrails
- Never ask users to paste raw secrets into chat.
- Never echo secrets back to user.
- Never store secrets in repository files, commit messages, issue comments, or transcripts.
- Prefer write-only handling; read plaintext values only when strictly required to complete a command.
Quick Runbook
- Map task auth requirements to
secret-name -> ENV_VAR.
- For each secret:
vault exists; if missing, run intake and wait.
- Execute target tooling via
run_with_secret.sh.
- Rotate or remove secrets via
vault.sh only when required.
- Map task auth requirements to
secret-name -> ENV_VAR. - For each secret:
vault exists; if missing, run intake and wait. - Execute target tooling via
run_with_secret.sh. - Rotate or remove secrets via
vault.shonly when required.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。