- scripts/setup_claude_access.py: narrow envbao-claude policy/token and an exec_only claude.toml; optional merge of Claude Code settings - [security] exec_only refuses plain export mode and --no-redact - PyInstaller onedir build (~0.06s start-up vs ~1.4s onefile) - macOS .pkg, Debian/Ubuntu/Raspberry Pi OS .deb (pure-Python builder), tarball + scripts/install.sh; release pipeline updated - docs: claude-access, install matrix, releasing, usage, security Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
3.1 KiB
Security model
Threat model
envbao protects a long-lived OpenBao token on a single-user workstation and makes sure secrets
reach the shell without being exposed or interpreted as code. It does not defend against an
attacker who already runs as you or as root, nor does it protect the environment of processes once
variables are exported (any child process inherits them).
Controls
-
Permission policy - before anything else,
~/.envbao(or the--configparent) and every entry beneath it must be: not a symlink, a regular file/directory, owned by the current user, and without any group/other permission bits (effectively0700dirs /0600files). Otherwiseenvbaologs CRITICAL, prints nothing to stdout, never contacts the server, and exits 78. Atoken_fileoutside the directory is checked identically. -
Fail closed - output is produced only after every query succeeded. Errors yield empty stdout.
-
Transport - TLS verification is always on (optional
ca_cert).http://is only allowed to loopback unlessallow_insecure_http = true. Redirects are never followed, so the token cannot be forwarded elsewhere. Responses are size-limited. -
Injection safety - names must match
[A-Za-z_][A-Za-z0-9_]*; values are quoted (shlex.quote, or fish single-quote escaping) and NUL bytes are rejected. Tests round-trip hostile values ($(...), backticks, quotes, newlines) through a real shell. -
Protected variables - secrets may not set shell/loader control variables such as
PATH,IFS,ENV,BASH_ENV,PROMPT_COMMAND,LD_*,DYLD_*,PYTHONPATH,NODE_OPTIONS, etc., unless explicitly listed in[security] allow_protected. Refusals are logged at ERROR. -
No secret leakage - the token is excluded from
repr(), never put on a command line or in the environment, and never logged. Secret values are never logged. HTTP error messages carry only status and path. Unexpected exceptions log only their type, not a traceback, unless-vv. -
Audit trail - log file (
0600, created atomically with that mode, rotated) plus best-effort syslog for WARNING and above. Events: permission violations, auth failures, per-query outcome, overrides, refused variables, count of exported variables. -
execmode -envbao execinjects only the requested groups into one child process and masks their values (raw, JSON, URL-encoded) in its output; with[security] exec_only = trueplain export mode and--no-redactare refused. Masking is defence in depth, not a sandbox (see claude-access.md).
Recommendations
- Use a token with a narrow read-only policy and a TTL; renew it periodically.
- Prefer
token_fileif you want to rotate the token without editing the config. - Keep
~/.envbaoout of backups/sync tools that change permissions. - Verify release packages against
SHA256SUMS. - Do not keep a root/admin
BAO_TOKENexported in your shell profile.
Reporting a vulnerability
Please report privately to the maintainer rather than opening a public issue.