eco-server.service: stop leaking userToken JWT via ExecStart argv #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-23T19:19:13Z - https://github.com/coilysiren/infrastructure/issues/297
Problem - The eco-server systemd unit invokes
EcoServer -userToken="$eco_server_api_token"(seescripts/eco-server-start.sh), which puts the JWT from SSM/eco/server-api-tokeninto/proc/<pid>/cmdline. Anysystemctl status eco-server,ps, or journald scrape that captures the cmdline (including agent transcripts) leaks the token in cleartext.Surfaced - 2026-05-23, mid-incident chat transcript captured the JWT verbatim from
systemctl statusoutput during the LFS-pointer mod recovery (sibling issue: install-eco-mod-source.sh hardening).Fix shape - Pass the token via env var or stdin instead of argv. Eco supports
userTokenvia config file (Configs/Network.eco->ServerAPIToken) as well; writing it there at ExecStartPre time and dropping the argv flag is the cleanest path. Rotate/eco/server-api-tokenonce the unit no longer exposes it.Out of scope - The DiscordLink token already gets injected via
jqintoConfigs/DiscordLink.ecorather than argv. Mirror that pattern for the user token.