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.
This commit is contained in:
Coff0xc
2026-11-21 17:49:22 +00:00
parent ff287467aa
commit 8b4f890e61
2 changed files with 4 additions and 2 deletions
+3 -2
View File
@@ -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/<pid>/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/<pid>/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.
+1
View File
@@ -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",