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 pull request fixes a bug in secret deletion validation and adds scoped secret injection for improved security. The changes ensure that the secretValue parameter is no longer required when deleting secrets, and that servers only receive secrets they explicitly declare rather than all available secrets.
Changes:
- Fixed validation logic in
updateSecretto makesecretValueoptional for delete operations - Implemented scoped secret injection so servers only receive declared secrets
- Added backward compatibility for servers without declared secret names
- Bumped version to 1.10.1
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/services/secrets.ts | Fixed validation to allow secret deletion without requiring secretValue parameter |
| src/services/mcp.ts | Added scoped secret injection logic that filters secrets based on server's declared secretNames |
| package.json | Version bump from 1.10.0 to 1.10.1 for patch release |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| args = { ...args, ...scopedSecrets } | ||
| log({ | ||
| level: 'info', | ||
| msg: `Scoped secrets applied to tool call - ${serverName}:${methodName} - ${Object.keys(scopedSecrets).join(', ')}` | ||
| }) |
There was a problem hiding this comment.
When a server declares secretNames but none of the declared secrets exist in the user's secrets store, scopedSecrets will be an empty object, and no log message indicates this scenario. This could make it difficult to debug why a server isn't receiving expected secrets. Consider adding a debug or info log message when a server declares secrets but none are found, to help with troubleshooting.
| args = { ...args, ...scopedSecrets } | |
| log({ | |
| level: 'info', | |
| msg: `Scoped secrets applied to tool call - ${serverName}:${methodName} - ${Object.keys(scopedSecrets).join(', ')}` | |
| }) | |
| const scopedSecretKeys = Object.keys(scopedSecrets) | |
| if (scopedSecretKeys.length > 0) { | |
| args = { ...args, ...scopedSecrets } | |
| log({ | |
| level: 'info', | |
| msg: `Scoped secrets applied to tool call - ${serverName}:${methodName} - ${scopedSecretKeys.join(', ')}` | |
| }) | |
| } else { | |
| // Server declared secrets, but none were found in the user's secrets store. | |
| log({ | |
| level: 'info', | |
| msg: `Server ${serverName} declares secrets (${serverSecretNames.join(', ')}) but none were found in secrets store for user ${username}` | |
| }) | |
| } |
No description provided.