Repository navigation
fix(server): plugin host routes require an authenticated admin session - #33
Merged
Merged
Conversation
/api/m3-plugins/* had no authentication. POST /install clones a git URL and starts its sidecar process, so anyone who could reach the server port (LAN, tailnet or tunnel) could run code on the host. Every plugin route now authenticates like the other media routes and requires environment:maintain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
/api/m3-plugins/*had no authentication.POST /api/m3-plugins/installclones a git URL and starts the plugin's sidecar, so anyone who could reach the server port (LAN, tailnet or tunnel) could run code on the host. Found while reviewing #29, which would have added a default-on plugin with adocker runendpoint behind the same routes.Every plugin route now authenticates through
authenticateMediaRequest, the same cookie-or-ticket check the device hub and preview tunnel use, and requiresenvironment:maintain. The web plugin host fetches same-origin, so local browser and desktop sessions keep working.m3PluginRoute.test.tscovers 401 without credentials, 403 without the scope, and 200 with it. The first two fail on main.vp run check:changed: format, lint, knip, graphql and tests pass. Typecheck reports the same 4 errors main already has, all in files this PR doesn't touch (IssueService.test.ts,ProviderSessionManager.ts,antigravityUsageLimits*.ts).Claude Opus 5.5 via Claude Code.
🤖 Generated with Claude Code