fix: redact structured transport auth, not just credential headers

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9xMqWcQBvJwrvMb5Tw3nH
This commit is contained in:
Ruben Fiszel
2026-09-01 09:33:24 +00:00
co-authored by Claude Opus 5
parent f8d691e714
commit d0ec550730
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -442,7 +442,11 @@ export function main() {
let job = bun_job(
r#"
export function main() {
const config: any = { url: "/x", headers: { Authorization: "Bearer sentinel-tkn" } };
const config: any = {
url: "/x",
headers: { Authorization: "Bearer sentinel-tkn" },
auth: { username: "svc", password: "sentinel-tkn" },
};
const request: any = { path: "/x", _header: "GET /x HTTP/1.1\r\nAuthorization: Bearer sentinel-tkn\r\n\r\n" };
const response: any = { status: 401, config, request };
request.res = response;
+1 -1
View File
@@ -91,7 +91,7 @@ pub const DEV_CONF_NSJAIL: &str = "";
/// Comment-free on purpose: it is written into each job's wrapper source.
pub const JS_ERROR_SERIALIZER: &str = r#"
const wmErrOwnKeys = ['line', 'name', 'stack', 'column', 'message', 'sourceURL', 'originalLine', 'originalColumn'];
const wmErrSecretKeys = /^(authorization|proxy-authorization|cookie|set-cookie|x-api-key|api[-_]?key|_header)$/i;
const wmErrSecretKeys = /^(authorization|proxy-authorization|cookie|set-cookie|x-api-key|api[-_]?key|auth|passphrase|_header)$/i;
const wmErrMaxExtra = 100000;
function wmErrString(v) {