Repository navigation
improve: warn before non-ClawHub plugin installs - #102197
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 14, 2026, 8:23 AM ET / 12:23 UTC. Summary PR surface: Source +338, Tests +922, Docs +38, Other 0. Total +1298 across 42 files. Reproducibility: not applicable. This PR introduces a new install-consent and trusted-source policy rather than repairing behavior already defined as broken. Review metrics: 3 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Retain the centralized classifier and pre-side-effect gates, but merge only after a plugin-install/security owner approves the trust taxonomy and flag semantics, the branch is refreshed onto current main, and the Codex-specific guidance gate is satisfied. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR introduces a new install-consent and trusted-source policy rather than repairing behavior already defined as broken. Is this the best way to solve the issue? Unclear pending owner intent: centralized classification and pre-side-effect rejection are maintainable, but the permanent trust taxonomy and reuse of AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 244401317507. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +338, Tests +922, Docs +38, Other 0. Total +1298 across 42 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (36 earlier review cycles; latest 8 shown)
|
…rusted-installs # Conflicts: # docs/cli/crestodian.md # src/agents/tools/crestodian-tool.test.ts # src/agents/tools/crestodian-tool.ts # src/crestodian/operations.test.ts # src/crestodian/operations.ts
…rusted-installs # Conflicts: # src/agents/tools/crestodian-tool.ts # src/cli/hooks-cli.test.ts # src/plugins/bundled-sources.ts
This reverts commit 01853df.
|
Merged via squash.
Thanks @jesse-merhi! |
What Problem This Solves
Installing arbitrary executable plugin code from npm, git, local paths, archives, npm-pack tarballs, or marketplace sources could proceed without an explicit source warning. Trusted OpenClaw-controlled sources and existing update flows should remain frictionless.
Why This Change Was Made
The acknowledgement gate applies only to direct first installs from arbitrary executable sources. Trust comes from OpenClaw-owned facts: ClawHub resolution, bundled plugin metadata (ID, local path, and npm package), and official catalog ID/package mappings. It is never inferred from a package-name prefix alone.
Provider selection and repair, doctor repair, setup/onboarding, updates, post-update convergence, macOS Codex onboarding, and other owner-controlled install paths remain trusted flows and do not receive this gate.
Crestodian follows an intentionally narrower rule: it can install only ClawHub, bundled, or official-catalog plugins. It refuses arbitrary executable sources before creating an approval proposal or invoking the installer and directs the operator to
openclaw plugins install <spec>in a trusted shell.User Impact
--force.--forceconfirms the source and keeps its existing overwrite meaning. With--link, it confirms the source without changing link/install mode.--forcedoes not bypasssecurity.installPolicyor the remaining install safety checks.npm:@openclaw/discord.--force, keep the provenance warning visible, and still pass through the normal installer policy and security checks.--forceso readers see the warning;--forceappears only where unattended or explicit confirmation behavior is being documented.What Changed
--force, while a forced retry uses the existing source-specific installers and metadata records. Crestodian remains trusted-source-only.Net diff against the PR base: 42 files, 2,068 additions, 770 deletions. Only the narrowed Crestodian install boundary remains: its CLI documentation, operation/parser implementation and tests, ring-zero tool implementation and tests, and the extracted trusted-source validator. The earlier broad Crestodian rewrite is no longer part of this PR's net diff.
Evidence
Behavioral coverage includes trusted ClawHub, bundled ID/path/npm, and official ID/package installs alongside arbitrary npm, npm-pack, path, archive, git, marketplace, and package-name collision cases. Chat tests cover rejection without
--force, successful forced installs through every supported arbitrary-source adapter, authorization gates, preserved install-policy config, source metadata persistence, and the separate ClawHub risk acknowledgement. Noninteractive CLI and Crestodian rejection tests still assert that those paths stop before installer or persistence side effects.Terminal Screenshots
Screenshots are full-width rather than placed in a table so command output remains readable. Capture 6 was produced on the pre-merge chat implementation and rechecked against exact current head
181fabb4b2e19c30cb5ea6c4e8191667b3cab569; the merge and subsequent module extraction did not change its decisions. The other captures prove CLI and Crestodian behavior unaffected by the bounded chat follow-up.1. Interactive arbitrary-source warning
A direct interactive install from an arbitrary local path displays the source warning and asks for confirmation before executing plugin code.
What this shows: The exact source and trust warning are visible before the user chooses whether to continue.
State: Isolated terminal install fixture; full-width crop preserves the warning and prompt.
2. Noninteractive arbitrary-source rejection
The same arbitrary install is rejected without a TTY and points to the shorter
--forceconfirmation flag.What this shows: A noninteractive arbitrary local install stops and gives the exact
--forcerecovery command.State: Exact head
a9699683d900, isolated state directory on Blacksmith Testboxtbx_01kxfc7ebma8fnmky5fvsqr4b4; full-width terminal transcript crop.3. Force-confirmed install
An arbitrary local-path install succeeds when
--forceis supplied.What this shows: The warning remains visible, then the reviewed plugin installs successfully under the shorter flag.
State: Exact head
a9699683d900, isolated state directory on Blacksmith Testboxtbx_01kxfc7ebma8fnmky5fvsqr4b4; full-width terminal transcript crop.4. Trusted bundled install
Bundled
@openclaw/discordinstalls without a warning or confirmation flag.What this shows: OpenClaw-owned bundled package metadata bypasses the extra provenance prompt.
State: Isolated terminal install fixture; full-width crop preserves the complete command result.
5. Existing tracked plugin update
An already-tracked local-path plugin update remains frictionless and does not ask for confirmation again.
What this shows: A tracked update follows the existing update path without a new first-install warning.
State: Isolated state directory with an existing install record; full-width terminal crop.
6. Chat install trust boundary
The real chat command handler blocks an arbitrary npm package without acknowledgement, installs the same package when the user appends
--force, and still installs an OpenClaw-trusted package without extra friction.What this shows: Without
--force, the arbitrary package is refused before installer side effects and the reply gives the exact retry. With--force, the same source installs in replacement mode while remaining classified as third-party and keeping the warning visible. The OpenClaw-trusted package still installs without the flag.State: Captured from head
96e4ab2e9a4on Blacksmith Testboxtbx_01kxff43r02jnzz9r2qsmqpxt5using realhandlePluginsCommandreplies; rechecked on exact current head181fabb4b2e1by the 28-test chat install shard. The full-width crop keeps all three decisions readable.7. Crestodian trusted-only boundary
The parser blocks an arbitrary npm package before proposal or installer execution and accepts the bundled Discord package as a typed plugin install.
What this shows: Crestodian remains a trusted-source-only surface rather than an approval path for arbitrary executable code.
State: Exact behavior from the narrowed Crestodian boundary; full-width terminal test crop.
Verification
tbx_01kxfattj7jd8yr0pnf83j3k3m: 382 focused tests passed across four Vitest shards, covering CLI, deprecated hooks, chat installs, and Docker/release scripts.tbx_01kxfc7ebma8fnmky5fvsqr4b4: actual CLI help exposes one--force; an arbitrary install rejects without it and succeeds with it. The remaining database, sidecar, import-cycle, webhook, and pairing guards passed after the first long-running lease completed.tbx_01kxff43r02jnzz9r2qsmqpxt5on head96e4ab2e9a4: 34 focused chat install/management tests passed; the three-case real-handler proof harness passed; core and core-testtsgo, targetedoxlint, and the 699-file Markdown lint passed.tbx_01kxfmvybjyc351g83ybvkjgqkon the pre-merge feature tree: 129 focused tests passed across chat installs, Crestodian operations/tooling, and the deprecated hooks alias. The changed-file gate passed conflict markers, the TypeScript LOC ratchet, formatting, SDK/package guards, and all five typecheck lanes before the Testbox's own temporary Node binary disappeared mid-lint.tbx_01kxfnznqpheqsmd310hx28498: exact changed-TypeScript lint passed across 22 files with zero warnings and zero errors after the expired runner was replaced.tbx_01kxgqrd66gy7ajcmdv8hdqwpgon exact current head181fabb4b2e1: 314 focused tests passed across CLI install planning/behavior, chat installs, Crestodian operations/tooling, and the deprecated hooks alias; the exact unused-export gate also passed.git diff --checkand targetedoxfmtpassed..agents/skills/autoreview/scripts/autoreview --mode uncommitted --engine codex --model gpt-5.6-sol --thinking codex=high --stream-engine-outputcompleted on the final extraction with no accepted or actionable findings (0.99 confidence). The whole merged PR tree had already completed the same Codex-high review loop cleanly. No Claude reviewer and noxhighreasoning were used.tbx_01kxab98a25wmqv7qknqz0hvg4passed 94 tests across its operation and ring-zero tool shards.No graphical product UI changed; the requested visual proof is terminal-only.