diff --git a/changelog.d/maintenance/scrub-boundary-test-creds.md b/changelog.d/maintenance/scrub-boundary-test-creds.md new file mode 100644 index 0000000000..e054292504 --- /dev/null +++ b/changelog.d/maintenance/scrub-boundary-test-creds.md @@ -0,0 +1 @@ +- **chore(security):** scrub hardcoded live-instance credentials (API key + auth cookie + host URL) from the `tests/boundary/*.live.test.ts` files landed via #6786 — they now read `OMNIROUTE_TEST_BASE` / `OMNIROUTE_TEST_BEARER` / `OMNIROUTE_TEST_COOKIE` from the environment and stay gated behind `RUN_BOUNDARY_LIVE=1`. diff --git a/tests/boundary/gemma4-multiturn.live.test.ts b/tests/boundary/gemma4-multiturn.live.test.ts index f1348374e9..c44acc8b9e 100644 --- a/tests/boundary/gemma4-multiturn.live.test.ts +++ b/tests/boundary/gemma4-multiturn.live.test.ts @@ -8,10 +8,12 @@ import test from "node:test"; import assert from "node:assert/strict"; -const BASE = "https://omniroute.vhost2.harre.dynv6.net/v1"; -const AUTH = "Bearer sk-7b3a9f0879f9bfcf-4f8870-d0e71799"; +const BASE = process.env.OMNIROUTE_TEST_BASE || "http://localhost:20128/v1"; +const AUTH = process.env.OMNIROUTE_TEST_BEARER + ? `Bearer ${process.env.OMNIROUTE_TEST_BEARER}` + : ""; const COOKIE = - "auth_token=eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkIjp0cnVlLCJleHAiOjE3ODYwMDc2Mzl9.YjGPcmh50QvtfnRJPXhsillOlJ3HKiCHRPX7kaWe5Y0"; + process.env.OMNIROUTE_TEST_COOKIE || ""; const MODEL = "gemini/gemma-4-26b-a4b-it"; diff --git a/tests/boundary/gemma4-newline-investigation.live.test.ts b/tests/boundary/gemma4-newline-investigation.live.test.ts index 7f8d2811f5..d3d8675bf2 100644 --- a/tests/boundary/gemma4-newline-investigation.live.test.ts +++ b/tests/boundary/gemma4-newline-investigation.live.test.ts @@ -5,15 +5,17 @@ * characterize when Gemma4 emits literal \\n (backslash-n) vs actual * newlines (0x0A) in tool call JSON arguments. * - * Tests hit the LIVE OmniRoute API at omniroute.vhost2.harre.dynv6.net. + * Tests hit the LIVE OmniRoute API at the configured OMNIROUTE_TEST_BASE instance. */ import test from "node:test"; import assert from "node:assert/strict"; -const BASE = "https://omniroute.vhost2.harre.dynv6.net/v1"; -const AUTH = "Bearer sk-7b3a9f0879f9bfcf-4f8870-d0e71799"; +const BASE = process.env.OMNIROUTE_TEST_BASE || "http://localhost:20128/v1"; +const AUTH = process.env.OMNIROUTE_TEST_BEARER + ? `Bearer ${process.env.OMNIROUTE_TEST_BEARER}` + : ""; const COOKIE = - "auth_token=eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkIjp0cnVlLCJleHAiOjE3ODYwMDc2Mzl9.YjGPcmh50QvtfnRJPXhsillOlJ3HKiCHRPX7kaWe5Y0"; + process.env.OMNIROUTE_TEST_COOKIE || ""; const MODEL = "gemini/gemma-4-26b-a4b-it"; diff --git a/tests/boundary/openclaw-omniroute-tool-boundary.live.test.ts b/tests/boundary/openclaw-omniroute-tool-boundary.live.test.ts index dcc65c684b..744ec4a09e 100644 --- a/tests/boundary/openclaw-omniroute-tool-boundary.live.test.ts +++ b/tests/boundary/openclaw-omniroute-tool-boundary.live.test.ts @@ -6,19 +6,21 @@ * that tool call arguments (especially multiline content like file writes) * survive the round-trip without corruption. * - * These tests call the LIVE OmniRoute API at omniroute.vhost2.harre.dynv6.net. + * These tests call the LIVE OmniRoute API at the configured OMNIROUTE_TEST_BASE instance. * Prerequisites: valid auth token (from INITIAL_PASSWORD) and access to the * remote OmniRoute instance. */ import test from "node:test"; import assert from "node:assert/strict"; -const BASE = "https://omniroute.vhost2.harre.dynv6.net/v1"; -const AUTH = "Bearer sk-7b3a9f0879f9bfcf-4f8870-d0e71799"; +const BASE = process.env.OMNIROUTE_TEST_BASE || "http://localhost:20128/v1"; +const AUTH = process.env.OMNIROUTE_TEST_BEARER + ? `Bearer ${process.env.OMNIROUTE_TEST_BEARER}` + : ""; // Cookie obtained via INITIAL_PASSWORD login const COOKIE = - "auth_token=eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkIjp0cnVlLCJleHAiOjE3ODYwMDc2Mzl9.YjGPcmh50QvtfnRJPXhsillOlJ3HKiCHRPX7kaWe5Y0"; + process.env.OMNIROUTE_TEST_COOKIE || ""; // Only the tests that call the live remote OmniRoute API need this gate — the // pure parsing/stopReason-simulation tests at the bottom of the file run locally.