From 60441c8ced55847f77fc2f777890e0e8d922a368 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 7 Mar 2026 16:42:34 -0800 Subject: [PATCH] Systemd: allowlist environment file fixtures --- src/daemon/systemd.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/daemon/systemd.test.ts b/src/daemon/systemd.test.ts index 5262ed02cf5..42c18093d6d 100644 --- a/src/daemon/systemd.test.ts +++ b/src/daemon/systemd.test.ts @@ -496,10 +496,10 @@ describe("readSystemdServiceExecStart", () => { ].join("\n"); } if (pathValue === "/home/test/.openclaw/first.env") { - return "OPENCLAW_GATEWAY_TOKEN=first-token\n"; + return "OPENCLAW_GATEWAY_TOKEN=first-token\n"; // pragma: allowlist secret } if (pathValue === "/home/test/.openclaw/second env.env") { - return 'OPENCLAW_GATEWAY_PASSWORD="second password"\n'; + return 'OPENCLAW_GATEWAY_PASSWORD="second password"\n'; // pragma: allowlist secret } throw new Error(`unexpected readFile path: ${pathValue}`); }); @@ -523,12 +523,12 @@ describe("readSystemdServiceExecStart", () => { } if (pathValue.endsWith("/.config/systemd/user/gateway.env")) { return [ - "OPENCLAW_GATEWAY_TOKEN=relative-token", - "OPENCLAW_GATEWAY_PASSWORD=relative-password", + "OPENCLAW_GATEWAY_TOKEN=relative-token", // pragma: allowlist secret + "OPENCLAW_GATEWAY_PASSWORD=relative-password", // pragma: allowlist secret ].join("\n"); } if (pathValue.endsWith("/.config/systemd/user/override.env")) { - return "OPENCLAW_GATEWAY_TOKEN=override-token\n"; + return "OPENCLAW_GATEWAY_TOKEN=override-token\n"; // pragma: allowlist secret } throw new Error(`unexpected readFile path: ${pathValue}`); }); @@ -554,8 +554,8 @@ describe("readSystemdServiceExecStart", () => { return [ "# comment", "; another comment", - 'OPENCLAW_GATEWAY_TOKEN="quoted token"', - "OPENCLAW_GATEWAY_PASSWORD=quoted-password", + 'OPENCLAW_GATEWAY_TOKEN="quoted token"', // pragma: allowlist secret + "OPENCLAW_GATEWAY_PASSWORD=quoted-password", // pragma: allowlist secret ].join("\n"); } throw new Error(`unexpected readFile path: ${pathValue}`);