-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix: warnings and errors for unresolved MCP secrets #8656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
✅ Review Complete Code Review Summary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 3 files
Prompt for AI agents (all 2 issues)
Understand the root cause of the following 2 issues and fix them.
<file name="core/context/mcp/MCPConnection.ts">
<violation number="1" location="core/context/mcp/MCPConnection.ts:172">
decodeSecretLocation expects a colon-delimited secret location (e.g. "user:slug/secret"), but this passes plain secret keys like "OPENAI_API_KEY". When unresolved secrets are present, decodeSecretLocation throws and connectClient crashes instead of collecting the warning.</violation>
</file>
<file name="extensions/cli/src/services/MCPService.ts">
<violation number="1" location="extensions/cli/src/services/MCPService.ts:257">
decodeSecretLocation is being invoked on every template variable, so any non-secret placeholder (e.g. ${{ inputs.* }}) makes rest undefined inside decodeSecretLocation and causes connectServer to throw before establishing the connection.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
|
|
||
| try { | ||
| if (unrendered.length > 0) { | ||
| const message = `${serverConfig.name} MCP Server has unresolved secrets: ${unrendered.join(", ")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems duplicate but the message is different enough for CLI since process.env is supported that I decided to leave them separate.
…allin/error-untemplated-mcp-secrets
Summary by cubic
Detect unresolved MCP secrets and surface clear errors in extensions; in headless CLI, throw an error to prevent misconfigured runs. Secret checks are now done at connection time for more accurate feedback.
Bug Fixes
Refactors
Written for commit 0b011ea. Summary will update automatically on new commits.