/vault-kv:runfrom vault-kv
Injects a single Vault KV secret field as an environment variable into a trusted child process. Useful for securely passing secrets to local commands without shell exposure.
Ships in vault-kv. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Do not run this helper from an agent, ask for secret values, or capture provider or
child output. An authorized operator can run it in a trusted terminal after
configuring VAULT_ADDR, TLS verification, and authenticating the Vault CLI
using the organization's approved method. Install a trusted Vault CLI on PATH.
The CLI supports token-based authentication and previously authenticated AppRole
sessions; this helper does not perform login or accept credentials in arguments.
node /path/to/vault-kv/scripts/run.js 2 secret evidence/service api_key -- /path/to/trusted-command
Specify the actual mount version (1 or 2); do not guess. The helper uses it
to select the KV v1 or KV v2 JSON data shape, not to verify the mount version.
By default Vault returns the latest version. To request a specific KV v2 secret
version, place --version=N after the field and before --, for example:
node /path/to/vault-kv/scripts/run.js 2 secret evidence/service api_key --version=7 -- /path/to/trusted-command
The pin must be a canonical positive integer up to 2147483647 and is rejected for
KV v1. The helper checks that Vault's response metadata reports the requested
version before starting the child. Provider failures and malformed or mismatched
versions fail closed. Pinned reads require Node.js 22 or another runtime supporting
JSON.parse reviver context.source; otherwise they fail closed. The reported
version must use the canonical integer representation emitted by Vault. This
does not independently authenticate the provider response; use a trusted Vault
CLI and verify TLS.
The first example invokes vault kv get -format=json -mount=secret evidence/service;
the pinned example adds -version=7. The helper
injects the selected field only as VAULT_KV_VALUE into the child. The entire
secret at that path is retrieved into helper memory, not just the selected field.
Mount and secret path are separate. The selected field must be a
nonempty UTF-8 string without NUL; no trimming or newline is added. Unsupported
values and provider errors fail closed. Provider and child output are suppressed,
stdin is closed, and no shell is used. Provider calls time out after 15 seconds;
the trusted command has no timeout. Exit 0 means the child succeeded, 1 means
provider/payload/child failure, and 2 means invalid usage. Errors are generic.
Grant the identity read only on the selected data path, e.g. secret/evidence/service
for KV v1 or secret/data/evidence/service for KV v2. CLI mount discovery may
need access depending on deployment; consult Vault's policy guidance rather than
granting broad privileges. Secret paths and field names are arguments and may
appear in process listings and Vault audit logs; do not put secret values in them.
Vault audit configuration governs what is recorded server-side.
Only use a trusted command: it can persist, transmit or log the value even though
its stdout and stderr are suppressed. VAULT_TOKEN is removed from the child
environment, but other inherited environment variables and Vault CLI token-helper
files may still allow access. Local privileged processes may inspect memory or
environments. The helper cannot erase all in-memory copies. Never place secrets in
evidence, chat, shell history, or command arguments; the operator must secure the
host and any child-generated files. Restrict access to those artifacts.
This is a manual runtime helper, not automatic integration with evidence collection or IaC scans. It does not generate dynamic credentials, write to Vault, manage leases, authenticate AppRole, or emit findings. Those remain future scope; do not assume a read operation always has no side effects for non-KV engines.
Sources: Vault KV get,
KV v1 API,
KV v2 API,
Vault policies,
Vault CLI.
Offline tests use a mock vault executable; no live Vault compatibility or
account permissions have been verified.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub grcengclub/claude-grc-engineering --plugin vault-kvOther plugins' skills for the same job