T05 · Unauthorized Access and Privilege Escalation
- Location
src/channel.ts:122- Finding
Configured inbound access policies are not enforced
- Content
View full analysis
{ const msg = normalizeZulipEvent(event, ownUserId); // Intercept /meta commands before AI dispatch const stripped = msg.text.replace(/<[^>]*>/g, "").trim(); if (stripped.startsWith("/meta ") || stripped === "/meta") { const streamId = event.message.stream_id; const topicName = event.message.subject; if (streamId != null && topicName) { const response = handleMetaCommand( metadataStore, { streamId, topicName }, stripped, ); const target = buildInboundTarget(msg, accountId); await sendMessageZulip(target, response, { accountId }); } return; } const target = buildInboundTarget(msg, accountId); ctx.log?.info?.(`zulip: inbound from ${msg.senderEmail} → ${target}`); if (ctx.channelRuntime) { const runtime = ctx.channelRuntime as unknown as { reply: { finalizeInboundContext: (p: Record) => unknown; dispatchReplyWithBufferedBlockDispatcher: (p: Record) => Promise; }; }; const ctxPayload = runtime.reply.finalizeInboundContext({ Body: msg.text, BodyForAgent: msg.text, RawBody: msg.text, CommandBody: msg.text, From: msg.senderEmail, To: `zulip:${accountId}`, SessionKey: target, AccountId: accountId, ChatType: msg ...[truncated 2551 chars]- Remediation
View remediation
