You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Channel-privacy check fails open on getChannelInfo null (pre-existing) #3003
All seven channel-setting PUT endpoints in `server/src/routes/admin/settings.ts` guard the is-private requirement like:
```ts
if (isSlackConfigured()) {
const channelInfo = await getChannelInfo(channel_id);
if (channelInfo && !channelInfo.is_private) { reject }
}
```
When `getChannelInfo` returns `null` (bot missing from channel, Slack API throttled, 5xx, wrong scopes), the `channelInfo && ...` short-circuit skips the check and the write is accepted.
For the private-required endpoints (billing/escalation/admin/prospect/error/editorial) this is caught downstream by `sendChannelMessage(..., { requirePrivate: true })` at post time — review/sensitive content cannot leak to a public channel.
For the announcement endpoint (inverted, rejects private), the fail-open direction is the opposite: a `null` lets through a private channel id, producing a configuration state that looks valid but silently misroutes.
Proposed
Treat `null` from `getChannelInfo` as reject-with-explanation, not accept, across all seven endpoints. Preserve the local-dev "no bot token" escape hatch by only failing closed when `isSlackConfigured()` is true.
Scope
Pre-existing across all seven endpoints; out of scope for #3000.
Classification: Bug Bucket(s): admin / ops tools, security-sensitive (no security-sensitive label exists in repo — noted) Status: ready-for-human
What the experts said:
security-reviewer: Downstream requirePrivate: true gate fully mitigates exposure on six private-required endpoints; announcement endpoint has no downstream gate, so a null return silently accepts a private channel ID and misroutes member-facing posts. Fix is sound — fail-closed on null with a "couldn't verify (retry)" vs. "confirmed public (pick another channel)" distinction in the error message. No specialist review needed before shipping.
My take: Real exposure risk is low — these are admin-only endpoints and the downstream safety net covers 6 of 7 channels. The security reviewer cleared the approach for immediate execution. Flagging because the bucket requires a human gate, not because the change is uncertain.
@bokelley, your call: approve a draft PR (7 fail-closed changes + improved null error messages) or handle directly.
Activity
harden(admin-channel-ui): expert-review follow-ups
bokelley commentedon Apr 24, 2026
Triage
Classification: Bug
Bucket(s): admin / ops tools, security-sensitive (no
security-sensitivelabel exists in repo — noted)Status: ready-for-human
What the experts said:
requirePrivate: truegate fully mitigates exposure on six private-required endpoints; announcement endpoint has no downstream gate, so a null return silently accepts a private channel ID and misroutes member-facing posts. Fix is sound — fail-closed on null with a "couldn't verify (retry)" vs. "confirmed public (pick another channel)" distinction in the error message. No specialist review needed before shipping.My take: Real exposure risk is low — these are admin-only endpoints and the downstream safety net covers 6 of 7 channels. The security reviewer cleared the approach for immediate execution. Flagging because the bucket requires a human gate, not because the change is uncertain.
@bokelley, your call: approve a draft PR (7 fail-closed changes + improved null error messages) or handle directly.
Triaged by Claude Code. Session: https://claude.ai/code/cse_016DwcMx1RDQ8HWxp2jKAQTF
Generated by Claude Code
feat(admin): UI for editorial + announcement channel settings (#3000)
harden(admin-channel-privacy): DX + testing review follow-ups
fix(admin): fail-closed on write-time channel privacy check (#3003) (#…
feat(admin-announcements): final polish + ops runbook (#3047)