Exec
Run a subprocess with vault credentials injected as environment variables. The credential exists only in the child process memory — never written to disk, never passed as a CLI argument.Function
execWithCredentials(options)
Command and arguments to execute.
Passports to inject, each with
passportRef (ID or name) and optional envVarOverride.Unlocked vault instance.
Actor name for audit logging.
Inherit parent environment. Default:
true.Additional env vars to set.
Working directory for child process.
Print what would be injected without executing.
Promise<ExecResult> — { exitCode, signal?, injectedVars, duration, auditEntryIds }
Security Properties
- Credentials exist only in the child process environment
IDW_PASSPHRASEandIDW_SESSION_TOKENare stripped from the child environment- Policy engine is evaluated before any credential is injected
- All access is audit-logged with command name, PID, and duration
- Signals (SIGTERM, SIGINT, SIGHUP) are propagated to the child