From 8b4f890e61ec8bd770fd4d5a05c7fd98d5ef7a35 Mon Sep 17 00:00:00 2001 From: Coff0xc <184964491+Coff0xc@users.noreply.github.com> Date: Sat, 21 Nov 2026 17:49:22 +0000 Subject: [PATCH] fix(server): seal ARTEX_PG_PASSWORD with the other startup secrets The Linux handoff test reports every name in secretEnv. The new password variable was scrubbed but not included in that fixture, so CI reported it unset after sealing. --- server/envseal.go | 5 +++-- server/envseal_linux_test.go | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/envseal.go b/server/envseal.go index 165552d..9df3620 100644 --- a/server/envseal.go +++ b/server/envseal.go @@ -13,8 +13,9 @@ import ( // Sealing the server environment. ScrubSecretEnv removes the secrets from the Go // environment, but the kernel keeps the environment block the process was executed -// with: /proc//environ still shows ARTEX_PG_DSN, ARTEX_SECRET_KEY and the API -// keys to any process that can read it. SealProcessEnv re-executes the server once, +// with: /proc//environ still shows ARTEX_PG_DSN, ARTEX_PG_PASSWORD, +// ARTEX_SECRET_KEY and the API keys to any process that can read it. +// SealProcessEnv re-executes the server once, // with those variables left out of the block; the values travel to the new image // through an inherited pipe and are put back into the Go environment there, so the // readers that run next see the same configuration. diff --git a/server/envseal_linux_test.go b/server/envseal_linux_test.go index 3a50e09..a11176b 100644 --- a/server/envseal_linux_test.go +++ b/server/envseal_linux_test.go @@ -51,6 +51,7 @@ func TestSealedEnvironmentHandoff(t *testing.T) { } want := map[string]string{ "ARTEX_PG_DSN": "postgres://artex:p@ss@db.internal/artex?sslmode=disable\nsecond line\twith tab", + "ARTEX_PG_PASSWORD": "p/ss w@rd?#%", "ARTEX_SECRET_KEY": "", "ANTHROPIC_API_KEY": "sk-ant-test", "OPENAI_API_KEY": "=leading-equals",