Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cloud/src/bridge/BridgeOrchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class BridgeOrchestrator {

if (!instance) {
try {
console.log(`[BridgeOrchestrator#connectOrDisconnect] Connecting...`)
console.log(`[BridgeOrchestrator#connectOrDisconnect] Connecting to ${options.socketBridgeUrl}...`)
Copy link
Contributor

Choose a reason for hiding this comment

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

P1: Logging the full socketBridgeUrl can leak sensitive information (query params like token/key, or basic-auth). Also handle undefined gracefully. Suggest redacting and adding a fallback.

Suggested change
console.log(`[BridgeOrchestrator#connectOrDisconnect] Connecting to ${options.socketBridgeUrl}...`)
console.log(`[BridgeOrchestrator#connectOrDisconnect] Connecting to ${(() => { try { const u = new URL(options.socketBridgeUrl ?? ''); u.username = ''; u.password = ''; return u.origin + u.pathname + (u.search ? '?…redacted…' : '') + u.hash; } catch { return options.socketBridgeUrl ?? '(unknown)'; } })()}...`)

Copy link
Contributor

Choose a reason for hiding this comment

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

P3: The log tag uses "connectOrDisconnect" but this is inside connect(). Consider harmonizing the tag to reduce confusion (follow-up change OK).

// Populate telemetry properties before registering the instance.
await options.provider.getTelemetryProperties()

Expand Down
Loading