Conversation
|
Automated review 🤖 Summary of Changes Key Changes & Positives
Potential Issues & Recommendations
Language/Framework Checks
Security & Privacy
Approval Recommendation
|
There was a problem hiding this comment.
Pull request overview
This PR fixes secret handling in the MCP service by adding support for prefixed secret names. The service can now look up secrets using both unprefixed (e.g., api_key) and prefixed (e.g., serverName.api_key) formats, with unprefixed names taking precedence when both exist.
Changes:
- Added fallback logic to check for server-prefixed secret names when unprefixed secrets are not found
- Bumped version from 1.10.1 to 1.10.2
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/services/mcp.ts | Added prefixed secret name lookup as fallback when unprefixed secret is not found |
| package.json | Version bump to 1.10.2 for patch release |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const prefixedName = `${serverName}.${name}` | ||
| if (allSecrets[name] !== undefined) { | ||
| scopedSecrets[name] = allSecrets[name] | ||
| } else if (allSecrets[prefixedName] !== undefined) { | ||
| scopedSecrets[name] = allSecrets[prefixedName] |
There was a problem hiding this comment.
The new prefixed secret name fallback logic lacks test coverage. Consider adding tests to verify:
- Secrets can be retrieved using the unprefixed name (e.g., "api_key")
- Secrets can be retrieved using the prefixed name (e.g., "serverName.api_key") when unprefixed doesn't exist
- Unprefixed secrets take precedence when both prefixed and unprefixed versions exist
- The correct secret value is passed to the tool in each scenario
No description provided.