feat(plugin): implement configurable plugin trust store#289
Open
whitezaddy wants to merge 2 commits into
Open
Conversation
|
@whitezaddy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Description
Brief description of what this PR does and why.
Closes #255
Summary
This PR enhances the plugin trust model by integrating the local CLI configuration (
~/.starforge/config.toml) into the plugin source verification process. Previously, plugin trust was evaluated against a hardcoded list of domains. With these changes, organizations and developers can configure their own trusted internal sources (or restrict public ones) via theplugin_trust.trusted_sourcesconfig, making plugin installations safer and more flexible in shared environments.Additionally, this PR cleans up several compiler warnings, unused imports, and type discrepancies across the workspace to ensure a pristine build state.
Changes
src/commands/plugin.rs):install,load,update, andverifycommand handlers to retrieve the localConfigand evaluate plugin trust usingregistry::classify_source_with_config.plugin installto dynamically iterate and display the user's actual configured trusted sources.plugin verifyto prompt the user to check their CLI config when a source is untrusted.PLUGIN_TRUST.md):~/.starforge/config.toml.TemplateEntry.TemplateCommands::Installnaming conflicts by correctly defining theImportcommand variant.wallets_to_exportduring JSON backup generation.commandsvector through the registry duringplugin update.mem,iterations,parallelism) and unused imports in the tests directory.Note: Make sure all tests pass locally before submitting:
cargo test cargo fmt --all cargo clippy -- -D warnings