Skip to content

🐛 Fix cross-workspace credential theft via preview endpoint#2430

Merged
baptisteArno merged 3 commits intomainfrom
baptisteArno/s3-domain-csp-check
Apr 7, 2026
Merged

🐛 Fix cross-workspace credential theft via preview endpoint#2430
baptisteArno merged 3 commits intomainfrom
baptisteArno/s3-domain-csp-check

Conversation

@baptisteArno
Copy link
Copy Markdown
Owner

Summary

  • Fixes GHSA-cq66-9cwr-x8jr — the previous fix for GHSA-4xc5-wfwc-jw47 was incomplete: the bot-engine runtime still allowed any authenticated user to exfiltrate credentials from any workspace via the preview endpoint by passing workspaceId: ""
  • Invert the falsy check in getCredentials() so that missing or empty workspaceId denies access instead of skipping validation
  • Add z.string().min(1) on the typebot schema's workspaceId to reject empty strings at the Zod validation layer
  • Tighten getGoogleSpreadsheet param type from string | undefined to string

Test plan

  • Typecheck passes on credentials, bot-engine, whatsapp
  • All tests pass (lint, bot-engine, whatsapp, results, lib, rich-text, emails, builder)
  • Verify that preview mode still works correctly with valid workspaceId
  • Verify that forged blocks, Google Sheets, and streaming endpoints still load credentials for legitimate users

🤖 Generated with Claude Code

…6-9cwr-x8jr)

Invert the falsy check in getCredentials to deny access when workspaceId
is empty or undefined, add min(1) validation on the typebot schema, and
tighten the getGoogleSpreadsheet type.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-actions[bot]
github-actions bot previously approved these changes Apr 7, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
builder-v2 Ready Ready Preview, Comment Apr 7, 2026 2:15pm
viewer-v2 Building Building Preview, Comment Apr 7, 2026 2:15pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
landing-page-v2 Ignored Ignored Preview Apr 7, 2026 2:15pm

Request Review

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-actions[bot]
github-actions bot previously approved these changes Apr 7, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed67419693

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@baptisteArno baptisteArno merged commit d6bcc26 into main Apr 7, 2026
9 checks passed
@baptisteArno baptisteArno deleted the baptisteArno/s3-domain-csp-check branch April 7, 2026 14:21
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