Repository navigation
fix(install-gate): triage the marketplace a claude plugin install adds - #634
Merged
Merged
Conversation
kit gate-bash let 'claude plugin install <p> --marketplace <repo>' and 'claude plugin marketplace add <repo>' through silently (exit 0) while it gated 'npx skills add'. A plugin's hooks module runs inside the agent: it can drop prompts, submit text as the user and send billed model requests. Adding a marketplace is now triaged like skills add: a GitHub repo becomes a github: ref, a local path is skipped, any other source is unverifiable (blocked). Installing from an already-added marketplace is not re-gated. ownerRepoArg moves to src/install-gate-repos.ts with the new matcher, re-exported unchanged; install-gate.ts shrinks under its frozen size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
CHANGELOG: kept this PR's Security entry and main's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
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.
Found while researching the
cache-thermoClaude Code mod (sandstream/kit-research#108).Problem
Measured on
main(1353deb) by feedingkit gate-bashthe PreToolUse payload:npm install left-padclaude plugin install cache-thermo --marketplace stilero/mods-marketplaceA Claude Code plugin's hooks module runs inside the agent. The mod examined in #108 drops prompts, resubmits text with
asUser: trueand sends billed$.model.forkrequests. That is more authority than most npm packages, yet the gate coverednpx skills addand notclaude plugin ….Change
src/install-gate-repos.ts(new) holdsclaudePluginInstall, wired intoscanSegment. Adding a marketplace is the trust decision, so that is what is triaged:claude plugin marketplace add <src>,claude plugin install <p> --marketplace <src>(also--marketplace=,plugins)<src>in any spelling →github:owner/repotriage ref…/marketplace.jsonURLunverifiable→ blockedclaude plugin install <p>@<marketplace>list,validate,remove,--plugin-dir/plugin installtyped inside Claude Code is a slash command and never reaches a Bash hook. The CHANGELOG says it is not covered.install-gate.tsis frozen at 1339 lines, soownerRepoArgmoved to the new module, where the skills and plugin paths share it. It is re-exported unchanged, andinstall-gate.tsdrops to 1287 lines.Verified
src/install-gate-repos.test.tsruns throughparseInstallCommand, the gate's own entry:--marketplace=form;&&and insidesh -c;kit gate-bashafter the change:--marketplace stilero/mods-marketplaceinstall is now exit 2, blocked pending repo triage (here the triage hit a 403 because this session cannot reach the GitHub API);cache-thermo@mods-marketplaceis still exit 0.npm test(7168 tests, 0 fail), eslint (no new findings), prettier,adr check, andkit standards --enforcewith the pinned tools.Generated by Claude Code