Skip to content

fix(auth): prevent credentials from reaching untrusted origins - #128

Open
dwaxe wants to merge 1 commit into
stablyai:mainfrom
dwaxe:dwaxe/validate-slack-workspace-origins
Open

fix(auth): prevent credentials from reaching untrusted origins#128
dwaxe wants to merge 1 commit into
stablyai:mainfrom
dwaxe:dwaxe/validate-slack-workspace-origins

Conversation

@dwaxe

@dwaxe dwaxe commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Problem

Browser auth sends a token and cookie to the configured workspace URL. An arbitrary URL can receive them. The old shared cookie also cannot be safely reused between commercial Slack and GovSlack.

Fix

  • Accept only HTTPS workspace URLs under slack.com or slack-gov.com.
  • Check the destination again before browser requests and reject redirects.
  • Route an explicitly configured GovSlack workspace to GovSlack endpoints.
  • Store browser cookies per workspace.
  • Reject malformed credential files without overwriting them.
  • Validate all imported workspace URLs before saving any.

Users relying on the old shared Keychain cookie must re-import browser or Desktop auth once. Automatic GovSlack browser/Desktop import and GovSlack permalink parsing are not included.

@dwaxe
dwaxe force-pushed the dwaxe/validate-slack-workspace-origins branch from be8d072 to 9f157bb Compare August 5, 2026 08:50
@dwaxe dwaxe changed the title fix(auth): validate Slack workspace origins fix(auth): restrict credentials to Slack domains Aug 5, 2026
Browser auth sends a token and cookie to the configured workspace URL.
Accept only Slack and GovSlack HTTPS URLs, recheck them before requests,
reject redirects, and store cookies per workspace.
@dwaxe
dwaxe force-pushed the dwaxe/validate-slack-workspace-origins branch from 9f157bb to e9897b8 Compare August 5, 2026 12:00
@dwaxe dwaxe changed the title fix(auth): restrict credentials to Slack domains fix(auth): prevent credentials from reaching untrusted origins Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant