Repository navigation
feat(config): load a project's plugins only after it is trusted - #542
Merged
Merged
Conversation
A cloned repository could add commands the model can call (.whycodes/plugins.toml, .whycodes/plugins/*/plugin.json) and sign-in providers without the user agreeing to it. These files now join the project trust record next to the MCP and LSP servers: they are left out until `whycodes trust`, and a changed manifest asks again. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.
What
A cloned repository could add commands the model can call and sign-in providers without the user agreeing to it:
<project>/.whycodes/plugins.toml<project>/.whycodes/plugins/*/plugin.json(ormanifest.json), includingkind: "auth"pluginsThese files now join the project trust record that already covers the project's MCP and LSP servers. They are left out until
whycodes trust, and a changed manifest asks again. Global plugins are not affected.How
config::trustlists the plugin files next to the config servers (one line per file, canonical JSON), sowhycodes trustshows them and the store compares them.ToolExecutor::register_config_pluginsandlist_shell_pluginsdrop the project directory when it is not trusted.whycodes pluginsprints the same notice as the TUI andwhycodes serve.Behaviour change
A project that ships plugins needs one
whycodes trustafter upgrading. A project already trusted for its servers is asked again once, because the record now includes its plugin files.WHYCODES_TRUST_PROJECT=1still trusts everything.Not covered
skills/andagents/inside project plugin packages are prompt text, not programs, and still load.Tests
project_plugin_files_need_trust_too(config),project_plugins_wait_for_trust(tools),a_project_without_plugin_files_needs_no_trust(plugin)whycodes-config,whycodes-plugin,whycodes-toolshave no missed lines-D warnings, budget scripts: ok🤖 Generated with Claude Code