Skip to content

Conversation

@Rajesh-Sangepu
Copy link

This PR addresses a Semgrep SAST finding where the launchpad GraphQL WebSocket connection was hardcoded to use ws://. This bypassed the existing protocol logic that correctly upgrades connections to wss:// when the application is served over HTTPS.

Details

Affected File: packages/frontend-shared/src/graphql/urqlClient.ts

Issue: Insecure WebSocket (detect-insecure-websocket)

Location: ~Line 239

Fix

The hardcoded ws:// URL has been replaced with the dynamically derived protocol already used elsewhere in the file. This ensures the WebSocket connection uses wss:// for HTTPS deployments while retaining ws:// for HTTP/local development.

  • ? ws://${window.location.host}/__launchpad/graphql-ws
  • ? ${protocol}//${window.location.host}/__launchpad/graphql-ws

Outcome

Secure WebSocket (wss://) is used automatically over HTTPS

Behavior is consistent across launchpad and non-launchpad targets

Resolves the reported SAST finding with a minimal, targeted change

root and others added 2 commits January 22, 2026 08:05
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ root
❌ Rajesh-Sangepu


root seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@cypress-app-bot
Copy link
Collaborator

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.

3 participants