Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

test: align security hardening log helper checks

R.D.30a64b0dd3ec
diff --git a/tests/integration/security-hardening.test.mjs b/tests/integration/security-hardening.test.mjs
index dd49da6ad5..5a1febb037 100644
--- a/tests/integration/security-hardening.test.mjs
+++ b/tests/integration/security-hardening.test.mjs
@@ -161,7 +161,17 @@ test("callLogs.ts wires no-log and PII sanitization before persistence", () => {
);
assert.ok(content.includes('from "../piiSanitizer"'), "callLogs.ts should import piiSanitizer");
assert.ok(content.includes("isNoLog("), "callLogs.ts should check no-log policy");
- assert.ok(content.includes("sanitizePayloadPII"), "callLogs.ts should sanitize PII recursively");
+
+ const payloadHelperContent = readIfExists("src/lib/logPayloads.ts");
+ assert.ok(payloadHelperContent, "src/lib/logPayloads.ts should exist");
+ assert.ok(
+ content.includes("protectPayloadForLog") && content.includes('from "../logPayloads"'),
+ "callLogs.ts should route payload protection through shared log helpers"
+ );
+ assert.ok(
+ payloadHelperContent.includes("export function sanitizePayloadPII"),
+ "logPayloads.ts should keep recursive PII sanitization logic"
+ );
});
test("API key update route and DB layer wire persisted no-log controls", () => {