You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docker stdio servers: env values (incl. resolved secrets) are passed as -e KEY=VALUE argv and visible in ps #1809
For stdio upstreams launched with docker run (and for Docker-isolated servers), every entry of the server's env map is turned into a -e KEY=VALUEcommand-line argument of the docker process. Secrets put into env — including ones written as ${keyring:…}, ${env:…} or ${file:…} references — therefore end up in the process table and are readable by any local user via ps aux / pgrep -af / /proc/<pid>/cmdline.
internal/upstream/core/isolation.go (Docker isolation path) — same pattern for serverConfig.Env.
internal/upstream/core/client.go — ExpandStructSecretsCollectErrors resolves secret references on a copy of the server config before the args are built, so the keyring/file references protect the config file but not argv.
PR #1181 / #1749 mask these values in mcpproxy's own logs, but the real process argv is unchanged.
Note that the user deliberately wrote -e GRAFANA_SERVICE_ACCOUNT_TOKEN without a value; mcpproxy still prepends the KEY=VALUE form.
Expected
Secret values never appear in any process's argv.
Suggested fix
Docker already supports this natively: -e KEY (no =) makes the docker CLI take the value from its own environment. connection_stdio.go already merges c.config.Env into the child process environment (envVars), so injectEnvVarsIntoDockerArgs (and the isolation builder) could emit just -e KEY and leave the value in cmd.Env. The value then stays in /proc/<pid>/environ, which is readable only by the process owner and root.
An alternative is writing a 0600 temp --env-file, but -e KEY + cmd.Env needs no file lifecycle.
Docs
docs/features/keyring-integration.md says ${file:} keeps a secret out of docker inspect and /proc/<pid>/environ. For docker servers it does end up in argv, which is the more widely readable surface. It would help to state that explicitly until this is fixed.
Current workaround
Keep secrets out of env entirely for docker servers and pass "--env-file", "/etc/mcpproxy/secrets/<server>.env" (mode 0640 root:mcpproxy) in args.
Activity