Repository navigation
fix(plugins): enforce activation before shipped imports - #59136
Conversation
🔒 Aisle Security AnalysisWe found 1 potential security issue(s) in this PR:
1. 🟠 Scoped plugin loading can be bypassed via manifest channel ID matching
Description
The new helper
This weakens the scoping boundary:
Vulnerable code: return params.manifestChannels.some((channelId) => scopedIds.has(channelId));Impact depends on the trust model for plugins and who controls the scoped channel/plugin selection, but in common setups where:
this becomes an authorization/scoping bypass leading to unintended code execution (loading extra plugins not explicitly selected by plugin ID). RecommendationTreat If channel-based setup loading is desired, introduce an explicit, separate option (e.g. Example fix (plugin-id-only scoping): function matchesScopedPluginRequest(params: {
onlyPluginIdSet: ReadonlySet<string> | null;
pluginId: string;
}): boolean {
const scopedIds = params.onlyPluginIdSet;
return !scopedIds || scopedIds.has(params.pluginId);
}If you must support channel scoping, ensure it is safe by:
Analyzed PR: #59136 at commit Last updated on: 2026-04-01T17:34:31Z |
Greptile SummaryThis PR tightens two plugin-loading behaviors: it gates Key changes:
Confidence Score: 5/5Safe to merge — logic is correct, all callers that need scoped setup-only loading already pass No P0 or P1 issues found. The No files require special attention. Reviews (1): Last reviewed commit: "Merge branch 'main' into fix/plugin-acti..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35b0921479
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10e46997da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75e9a3ea47
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44f999afcd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
* fix(plugins): enforce activation before shipped imports * fix(plugins): remove more ambient bundled loads * fix(plugins): tighten scoped loader matching * fix(plugins): remove channel-id scoped loader matches * refactor(plugin-sdk): relocate ambient provider helpers * fix(plugin-sdk): preserve unicode ADC credential paths * fix(plugins): restore safe setup fallback
* fix(plugins): enforce activation before shipped imports * fix(plugins): remove more ambient bundled loads * fix(plugins): tighten scoped loader matching * fix(plugins): remove channel-id scoped loader matches * refactor(plugin-sdk): relocate ambient provider helpers * fix(plugin-sdk): preserve unicode ADC credential paths * fix(plugins): restore safe setup fallback
* fix(plugins): enforce activation before shipped imports * fix(plugins): remove more ambient bundled loads * fix(plugins): tighten scoped loader matching * fix(plugins): remove channel-id scoped loader matches * refactor(plugin-sdk): relocate ambient provider helpers * fix(plugin-sdk): preserve unicode ADC credential paths * fix(plugins): restore safe setup fallback
* fix(plugins): enforce activation before shipped imports * fix(plugins): remove more ambient bundled loads * fix(plugins): tighten scoped loader matching * fix(plugins): remove channel-id scoped loader matches * refactor(plugin-sdk): relocate ambient provider helpers * fix(plugin-sdk): preserve unicode ADC credential paths * fix(plugins): restore safe setup fallback
* fix(plugins): enforce activation before shipped imports * fix(plugins): remove more ambient bundled loads * fix(plugins): tighten scoped loader matching * fix(plugins): remove channel-id scoped loader matches * refactor(plugin-sdk): relocate ambient provider helpers * fix(plugin-sdk): preserve unicode ADC credential paths * fix(plugins): restore safe setup fallback
* fix(plugins): enforce activation before shipped imports * fix(plugins): remove more ambient bundled loads * fix(plugins): tighten scoped loader matching * fix(plugins): remove channel-id scoped loader matches * refactor(plugin-sdk): relocate ambient provider helpers * fix(plugin-sdk): preserve unicode ADC credential paths * fix(plugins): restore safe setup fallback
* fix(plugins): enforce activation before shipped imports * fix(plugins): remove more ambient bundled loads * fix(plugins): tighten scoped loader matching * fix(plugins): remove channel-id scoped loader matches * refactor(plugin-sdk): relocate ambient provider helpers * fix(plugin-sdk): preserve unicode ADC credential paths * fix(plugins): restore safe setup fallback
* fix(plugins): enforce activation before shipped imports * fix(plugins): remove more ambient bundled loads * fix(plugins): tighten scoped loader matching * fix(plugins): remove channel-id scoped loader matches * refactor(plugin-sdk): relocate ambient provider helpers * fix(plugin-sdk): preserve unicode ADC credential paths * fix(plugins): restore safe setup fallback
Summary
src/tts/tts.tsthrough the existing lazyspeech-runtimefacade instead of directly importingextensions/speech-core/runtime-api.jsTesting
pnpm test -- src/plugins/loader.test.ts src/tts/tts.test.tspnpm test -- src/commands/channel-setup/plugin-install.test.ts src/commands/channel-setup/discovery.test.tspnpm checkpnpm build