mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 18:18:21 +00:00
fix(logging): redact browser debug endpoint (#1622)
* fix(logging): redact browser debug endpoint * fix(logging): redact prompt argv values
This commit is contained in:
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]']);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user