Repository navigation
Proposal: an install-gate hook so plugins can vet a package before it installs #12999
gabrielbav
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
The plugin manager has no extension point that runs before an installation changes the profile.
plugin-manager/operation,install-stateand friends announce progress, but nothing can stop or pause an install. Third-party plugins, skills and subagent bundles run with access to the shell, files and credentials, so a community plugin that wants to check a package first (for prompt injection, credential theft, exfiltration, vulnerable dependencies, a license, an org policy…) currently has no way to do it.Proposal: a small, generic hook in the plugin manager
DSH ships no policy. It only lets plugins register gates:
plugin_managertool. The strictest ruling wins.blockrefuses the install (gate-blocked).reviewasks the person, then retries with an acknowledgement digest (gate-review/gateAcknowledged):plugins.install.gateslot the gate fills;gate-mismatch).requireInstallGate: true: refuses installs while no gate is running.dsh plugin addrefuses too, because the CLI runs no gates.InstallGateReportholds the level, the gate's own localized reasons, findings, a digest, and an optional score, checks and metrics. That's enough for a scanner, and a simple allow-list can return just a level and a reason.With no gate registered, behaviour is exactly as today.
Other things people could build on it
The point is that this isn't one plugin's feature. Any of these become small community plugins, and several can run together:
Working implementation
gabrielbav/deepseek-harness@feat/install-gate(diff againstmaster). It's one commit touching the plugin manager, the Plugins page install dialog, the approval card (displayDescription,ApprovalService.policyOf) and the CLI. Docs are updated in English and Chinese, with tests for multiple gates, a crashing gate, review/acknowledge, tamper rollback, a missing gate, and a Full-access session.I know external PRs aren't accepted right now, so I'm sharing it here in case the team wants to adopt the idea or the code. Happy to adjust the design to whatever fits the project. If you'd like DSH to have this extension point, please upvote 🙏
All reactions