feat: Remove paths from plugin packages#7580
Merged
JohnMcLear merged 1 commit intodevelopfrom Apr 22, 2026
Merged
Conversation
Review Summary by QodoSanitize plugin packages by removing path information
WalkthroughsDescription• Sanitize plugin packages before sending to client • Remove sensitive path information from plugin data • Keep only name and version in plugin package metadata Diagramflowchart LR
A["plugins.plugins object"] -- "iterate and extract" --> B["package data"]
B -- "filter to name, version" --> C["pluginsSanitized"]
C -- "send to client" --> D["ClientReady message"]
File Changes1. src/node/handler/PadMessageHandler.ts
|
Code Review by Qodo
1. pluginsSanitized mutates plugins.plugins
|
Comment on lines
+1071
to
+1075
| let pluginsSanitized: any = plugins.plugins | ||
| Object.keys(plugins.plugins).forEach(function(element) { | ||
| const p: any = plugins.plugins[element].package | ||
| pluginsSanitized[element].package = {name: p.name, version: p.version}; | ||
| }); |
There was a problem hiding this comment.
1. pluginssanitized mutates plugins.plugins 📘 Rule violation ☼ Reliability
The new sanitization logic assigns pluginsSanitized to plugins.plugins and then overwrites each plugin's package, permanently removing fields like realPath/path from the shared plugin registry. This creates a breaking behavior change because other server code expects plugin.package.realPath to exist (e.g., to serve plugin static assets).
Agent Prompt
## Issue description
`pluginsSanitized` is currently just a reference to `plugins.plugins`, so overwriting `pluginsSanitized[element].package` mutates the global plugin registry and removes `realPath`/`path`. This can break other server code paths that rely on `plugin.package.realPath`.
## Issue Context
The intent is to sanitize what is sent to the client, not to modify the server-side plugin definitions.
## Fix Focus Areas
- src/node/handler/PadMessageHandler.ts[1071-1075]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Member
|
Is there a better way to type that? I always try to avoid any. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will remove realPath and path from plugin package before sending it to the client