Run a command with vault references resolved.
Every environment variable whose whole value is a reference
(vault://[<vault>/]<path>[#<field>]), from the process environment or
from --env-file files, is replaced by the secret's value in the child
process's environment only. Env files are read, never written. Every
reference is resolved before the command starts; if one cannot be
resolved nothing runs. Each vault is opened once.
Environment exposure: environment variables are visible to the
child process and everything it starts, and to other processes
running with the same privileges through the OS process table (for
example /proc/<pid>/environ). For sensitive values prefer --fd <n>=<ref>, which
delivers the value on a pipe read from file descriptor n (POSIX only)
and never places it in the environment.
Masking: when stdout or stderr is a terminal, and always in an agent
session, every resolved value of at least --mask-min bytes is replaced by
*** in the command's output. Shorter values are not masked (a warning
names their references), and encoded variants of a value (base64, URL
encoding, hex) are not masked. --no-mask turns masking off; it is
refused in an agent session. Without masking the command replaces
vaultfold (exec) on POSIX.
The repository hygiene check is strict for run: a failure refuses to run
unless --allow-unsafe-context is given. The command's exit status is
vaultfold run [flags] -- <command> [args...]
--allow-unsafe-context run even when the repository hygiene check fails
--env-file f read variables from the env file f (repeatable; later files override earlier ones)
--fd n=ref deliver a reference's value on file descriptor n of the child instead of the environment, as n=ref (repeatable; POSIX only)
--identity n unlock with the profile identity n
--mask-min n mask only values of at least n bytes (default 8)
--no-mask do not mask values in the child's output (refused in agent sessions)
--json print exactly one JSON document on stdout
--vault name select a vault from the registry by name