Skip to content

Commit 96a9412

Browse files
committed
fix(security): remove args from setConfigValue log to prevent secrets leakage
Logging JSON.stringify(args) could expose config values (API keys, paths, secrets) in server-side logs that may be exfiltrated or accessed by unauthorized parties. Only the callerOrigin is now logged. Addresses coderabbitai review comment on PR #399. https://claude.ai/code/session_01UesrAy2NYmCpw7rqX71V5X
1 parent 3eaa516 commit 96a9412

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tools/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export async function getConfig() {
164164
* reach security-critical keys regardless of what it sends in the arguments.
165165
*/
166166
export async function setConfigValue(args: unknown, callerOrigin: 'mcp' | 'ui' = 'mcp') {
167-
console.error(`setConfigValue called with args: ${JSON.stringify(args)}, callerOrigin: ${callerOrigin}`);
167+
console.error(`setConfigValue called with callerOrigin: ${callerOrigin}`);
168168
try {
169169
const parsed = SetConfigValueArgsSchema.safeParse(args);
170170
if (!parsed.success) {

0 commit comments

Comments
 (0)