Plugin help runs binaries the run policy denies
- Status: Done
- Kind: Bug
- Authors: jp
- Date: 2026-09-28
- Implements: 072
- Label: client=cli
- Label: domain=plugins
- Label: package=jp_cli
- Label: type=bug
jp -h and jp <plugin> -h execute plugin binaries without checking plugins.command.<name>.run, a pinned checksum, or $PATH approval.
Why
print_plugin_help_section(crates/jp_cli/src/lib.rs) callsdescribe_pluginon everyjp-*binarydiscover_pluginsfinds.describe_plugin(crates/jp_cli/src/cmd/plugin/dispatch.rs) spawns the binary directly.run_externalanswers a barejp <plugin> --helpthroughshow_plugin_helpbeforeresolve_plugin_binaryruns, where the policy, checksum, and approval checks live.
RFD 077 says the run policy applies at every execution point, and RFD 072 now states that admission precedes every spawn, describe included.
Scope
Any jp-* executable on $PATH plus jp -h. A binary set to run = "deny", or an unapproved ask binary, executes, and the user sees only a help listing: it can do anything before it reads its first protocol message.
Fix
- Root help: describe only admitted plugins; list any other by its file name without running it. No prompts from root help.
jp <plugin> -h: go throughresolve_plugin_binaryfirst, prompting where the policy isask.
Verifying
- A
jp-*test binary that writes a marker file when run, withrun = "deny":jp -hlists it and the marker is absent. - The same binary under
askwith no approval:jp <plugin> -hnon-interactively fails with the approval error and the marker is absent.
Comments
- From: jp
- Date: 2026-09-28T20:16:24Z
Partly fixed by RFD 072 Phase 5 (manifest routing):
jp -hnow reads plugin manifests from the binaries and spawns nothing (cmd/plugin/help.rs).jp <plugin> -hroutes first and runs the same admission as a normal run (admitindispatch.rs: deny, pinned checksum,$PATHrun policy) before sendingdescribe.
Left for RFD 072 Phase 6: the admission order RFD 077 now describes (ask default for every plugin, registry-checksum vouching), and the marker-file tests under "Verifying" — no test yet proves an unapproved binary is not executed by jp <plugin> -h.
- From: jp
- Date: 2026-09-28T21:03:39Z
Fixed by RFD 072 Phase 6.
jp -hreads manifests from the binaries (and, for a binary without one, what its approval recorded) and spawns nothing, whatever therunpolicy says.jp <plugin> -hgoes through admission (admission::admit, in RFD 077's order: deny, pinned checksum,allow, then registry checksum or approval underask) beforedescribeis sent.
dispatch::tests::plugin_help_does_not_run_an_unapproved_binary is the "Verifying" check: a script that writes a marker when run, invoked as jp titles -h without a terminal, is refused with the approval error and the marker is absent; once approved, it answers. The test fails if describe is moved ahead of admission.