Plugins: require explicit trust for workspace-discovered plugins#44174
Plugins: require explicit trust for workspace-discovered plugins#44174vincentkoc merged 6 commits intomainfrom
Conversation
Greptile SummaryThis PR hardens workspace plugin trust by requiring an explicit opt-in before plugins discovered under Key changes:
Minor observation: The Confidence Score: 4/5
Last reviewed commit: cbc38be |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0734a42c0
ℹ️ 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: 623decefd3
ℹ️ 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".
| if (origin === "workspace" && !explicitlyAllowed && entry?.enabled !== true) { | ||
| return { enabled: false, reason: "workspace plugin (disabled by default)" }; |
There was a problem hiding this comment.
Allow bundled fallback when workspace plugin is untrusted
This new workspace-default-disable branch turns untrusted workspace plugins into disabled records, but the loader still marks their IDs as seen (src/plugins/loader.ts:704-709), so later bundled candidates with the same ID are dropped as overridden by workspace plugin. Because discovery processes workspace before bundled (src/plugins/discovery.ts:689-710), a cloned repo can now disable built-in plugins (for example, telegram) just by shipping an untrusted .openclaw/extensions/<id> folder, leaving no plugin loaded for that ID; disabled workspace candidates should not shadow lower-precedence origins.
Useful? React with 👍 / 👎.
…nclaw#44174) * Plugins: disable implicit workspace plugin auto-load * Tests: cover workspace plugin trust gating * Changelog: note workspace plugin trust hardening * Plugins: keep workspace trust gate ahead of memory slot defaults * Tests: cover workspace memory-slot trust bypass
What is a "cloned repository" in your definition? .openclaw is the primary user-installation location. If the .openclaw folder is somehow put onto a system without the user's approval or trust, requiring a config ey from the config file that is also inside .openclaw is useless. Can we please stop securing the software against the owning user? Edit: And now I actually forgot to write what I followed the link in the changelog for...: This should be marked as BREAKING in the changelog. |
…nclaw#44174) * Plugins: disable implicit workspace plugin auto-load * Tests: cover workspace plugin trust gating * Changelog: note workspace plugin trust hardening * Plugins: keep workspace trust gate ahead of memory slot defaults * Tests: cover workspace memory-slot trust bypass
Summary
.openclaw/extensions, so cloned repositories could execute plugin code without an explicit trust decision.plugins.allowor a per-plugin enable entry.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Workspace-discovered plugins under
.openclaw/extensionsno longer auto-load by default. Operators must explicitly trust them withplugins.allowor an explicit plugin entry.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) YesYes/No) YesYes, explain risk + mitigation: the change reduces implicit command/data access by requiring an explicit trust decision before workspace plugin code can execute.Repro + Verification
Environment
plugins.allowSteps
.openclaw/extensions/<id>/openclaw.plugin.jsonandindex.tswith a side effect inregister().loadOpenClawPlugins({ workspaceDir, config: {} }).Expected
Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
plugins.allow.Review Conversations
Compatibility / Migration
Yes/No) NoYes/No) NoYes/No) Maybeplugins.allowor explicitly enable them inplugins.entries.Failure Recovery (if this breaks)
src/plugins/config-state.tsRisks and Mitigations