Repository navigation
fix(plugins): validate marketplace plugin names before path joins - #221
Merged
Merged
Conversation
The exported marketplace install and uninstall functions joined raw plugin names onto the plugins directory; uninstall with a path-shaped name removed a directory outside it. Make the existing private plugin_install_dir helper return Result and reject empty, all-dot or all-space names, separators, colon and NUL before joining. Install validates non-URL input before the registry lookup and the final entry before creating directories or downloading; uninstall validates before touching the filesystem. Public signatures and ordinary names are unchanged. Coven-Harness: Claude Code / claude-opus-5-5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 15, 2026
This branch was successfully deployed
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.
Summary
The exported marketplace
installanduninstallfunctions now reject path-shaped plugin names before joining them onto the plugins directory.Context
crates/plugins/src/marketplace.rs.Changes
plugin_install_dirhelper returnsResultand rejects empty, all-dot or all-space names,/,\,:and NUL before joining.installvalidates non-URL input before the registry lookup, and validates the final entry before creating directories or downloading.uninstallvalidates before any filesystem access.Surface: production +8 net lines, tests +63; no dependency or lock change.
Validation
uninstallremoved an owned temp directory marker, and invalid pure names were accepted. No HOME, env or network writes.cargo test --locked -p claurst-plugins: 18 passed, 0 failed.cargo fmt --all -- --check,cargo check --workspace --locked,cargo clippy --workspace --all-targets --locked -- -D warnings: pass on this branch (current main).git diff --check: clean.cargo test --workspace: hosted Rust CI.PR Readiness
docs/plugins.mdalready distinguishesnamefrommarketplace_id.