From f71da54d8f8b4040e0ac874f00c54a1de843af50 Mon Sep 17 00:00:00 2001 From: John Lin Date: Wed, 28 Jan 2026 10:13:09 +0800 Subject: [PATCH] security(ringcentral): remove sensitive data from logs and clean up schema - Remove message text from log output to prevent leaking sensitive content - Remove obsolete credentialsFile field from config schema - Add missing selfOnly and allowOtherChats fields to schema Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- extensions/ringcentral/src/config-schema.ts | 3 ++- extensions/ringcentral/src/monitor.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/ringcentral/src/config-schema.ts b/extensions/ringcentral/src/config-schema.ts index e37b9a3af..f7b37e0d7 100644 --- a/extensions/ringcentral/src/config-schema.ts +++ b/extensions/ringcentral/src/config-schema.ts @@ -27,7 +27,6 @@ const RingCentralAccountSchemaBase = z clientSecret: z.string().optional(), jwt: z.string().optional(), server: z.string().optional(), - credentialsFile: z.string().optional(), webhookPath: z.string().optional(), webhookVerificationToken: z.string().optional(), markdown: MarkdownConfigSchema, @@ -44,6 +43,8 @@ const RingCentralAccountSchemaBase = z blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(), allowBots: z.boolean().optional(), botExtensionId: z.string().optional(), + selfOnly: z.boolean().optional(), + allowOtherChats: z.boolean().optional(), }) .strict(); diff --git a/extensions/ringcentral/src/monitor.ts b/extensions/ringcentral/src/monitor.ts index 24bf6e6ae..e6c004959 100644 --- a/extensions/ringcentral/src/monitor.ts +++ b/extensions/ringcentral/src/monitor.ts @@ -199,7 +199,7 @@ async function processMessageWithPipeline(params: { // This is because the bot uses the JWT user's identity, so we're essentially // having a conversation with ourselves (the AI assistant) const selfOnly = account.config.selfOnly !== false; // default true - runtime.log?.(`[${account.accountId}] Processing message: senderId=${senderId}, ownerId=${ownerId}, selfOnly=${selfOnly}, chatId=${chatId}, text=${rawBody.slice(0, 50)}`); + runtime.log?.(`[${account.accountId}] Processing message: senderId=${senderId}, ownerId=${ownerId}, selfOnly=${selfOnly}, chatId=${chatId}`); if (selfOnly && ownerId) { if (senderId !== ownerId) {