Skip to content

Fix channels#60

Merged
khaliqgant merged 3 commits intomainfrom
fix-channels
Mar 7, 2026
Merged

Fix channels#60
khaliqgant merged 3 commits intomainfrom
fix-channels

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

// Log Relaycast workspace key so users can view messages at relaycast.dev
const startupConfig = resolveRelaycastConfig();
if (startupConfig?.apiKey) {
console.log(`[dashboard] Relaycast workspace key: ${startupConfig.apiKey}`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Workspace API key logged in plaintext to stdout

The new code logs the Relaycast workspace API key (apiKey) in plaintext to stdout at server startup (proxy-server.ts:388) and when bootstrapping from the broker (proxy-server.ts:576). The previous code at the bootstrap site only logged a generic message ('[dashboard] Relaycast workspace key bootstrapped from broker') without revealing the key value. The apiKey is a secret credential used as a Bearer token for API authentication (see packages/dashboard-server/src/relaycast-provider-helpers.ts:251'Authorization': \Bearer ${config.apiKey}``). Logging it to stdout means it will appear in log aggregation systems (CloudWatch, Datadog, etc.), CI output, and process manager logs, exposing the credential to anyone with log access.

Prompt for agents
In packages/dashboard-server/src/proxy-server.ts, there are two locations that log the API key in plaintext:

1. Line 388: console.log(`[dashboard] Relaycast workspace key: ${startupConfig.apiKey}`);
2. Line 576: console.log(`[dashboard] Relaycast workspace key: ${key}`);

Replace the plaintext key with a masked version (e.g., showing only the last 4 characters) to avoid leaking credentials in logs. For example:

const masked = key.length > 4 ? '***' + key.slice(-4) : '****';
console.log(`[dashboard] Relaycast workspace key: ${masked}`);

Apply this change at both line 388 (using startupConfig.apiKey) and line 576 (using key).
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

if (key) {
setRelayApiKey(key);
console.log('[dashboard] Relaycast workspace key bootstrapped from broker');
console.log(`[dashboard] Relaycast workspace key: ${key}`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Workspace API key logged in plaintext during broker bootstrap

Same issue as at startup: the bootstrapped workspace key is logged in plaintext at proxy-server.ts:576. The old code at this location logged '[dashboard] Relaycast workspace key bootstrapped from broker' without the key value. The new code exposes the full credential in logs via console.log(\[dashboard] Relaycast workspace key: ${key}`)`.

Suggested change
console.log(`[dashboard] Relaycast workspace key: ${key}`);
console.log(`[dashboard] Relaycast workspace key: ${key.length > 4 ? '***' + key.slice(-4) : '****'}`);
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@khaliqgant khaliqgant merged commit cf91156 into main Mar 7, 2026
1 check passed
@khaliqgant khaliqgant deleted the fix-channels branch March 7, 2026 01:30
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