Skip to content

Commit 35100cf

Browse files
committed
fix(linux): keep --key-hex values out of spawn trace logs
1 parent 07c450e commit 35100cf

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎lib/common/child-process.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,14 @@ export class ChildProcess extends EventEmitter implements IChildProcess {
300300

301301
private getArgumentsAsQuotedString(args: string[]): string {
302302
return (
303-
args && args.length && args.map((argument) => `"${argument}"`).join(" ")
303+
args &&
304+
args.length &&
305+
args
306+
// source protection keys stay out of the logs
307+
.map((argument, i) =>
308+
args[i - 1] === "--key-hex" ? '"<redacted>"' : `"${argument}"`,
309+
)
310+
.join(" ")
304311
);
305312
}
306313
}

0 commit comments

Comments
 (0)