fix(logging): redact browser debug endpoint (#1622)

* fix(logging): redact browser debug endpoint

* fix(logging): redact prompt argv values
This commit is contained in:
Kai (Tam Nhu) Tran authored and GitHub committed 2026-06-30 13:07:46 -04:00
1 parent a77096ed7c
commit 138ead0e1e
3 files changed
+38 -3

No files matched your search

@@ -136,4 +136,24 @@ describe('redactArgv', () => {
'[redacted]',
]);
});
it('redacts prompt values passed with -p and --prompt', () => {
expect(redactArgv(['glm', '-p', 'summarize secret account notes'])).toEqual([
'glm',
'-p',
'[redacted]',
]);
expect(redactArgv(['glm', '--prompt', 'summarize secret account notes'])).toEqual([
'glm',
'--prompt',
'[redacted]',
]);
});
it('redacts inline prompt and sensitive flag assignments', () => {
expect(
redactArgv(['glm', '--prompt=summarize secret account notes', '--api-key=plainsecret'])
).toEqual(['glm', '--prompt=[redacted]', '--api-key=[redacted]']);
});
});