Check ClawHub trust before plugin installs#81307
Conversation
|
Codex review: needs changes before merge. Summary Reproducibility: yes. source inspection gives a high-confidence path: run Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Land the trust gate after making Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence path: run Is this the best way to solve the issue? No: the trust-gate direction is sound, but the current update prompt handling is not the narrowest maintainable solution because Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 4a6e46152a55. |
There was a problem hiding this comment.
Pull request overview
This PR adds a ClawHub “exact release trust” gate ahead of ClawHub-backed plugin installs/updates, requiring explicit acknowledgement when ClawHub marks a release as risky, and wiring that acknowledgement through the CLI and update flows. It also introduces OpenGrep/Semgrep ignore configuration and (separately) makes substantial GitHub Actions workflow changes.
Changes:
- Add
fetchClawHubPackageSecurity+ install-time trust enforcement with risk warnings and acknowledgement (--acknowledge-clawhub-risk/ interactive prompt). - Thread risk-ack options through
plugins install,plugins update, andupdateNpmInstalledPlugins, with tests and docs updates. - Add
.semgrepignoreand a newopengrep-preciseworkflow; remove many existing GitHub Actions workflows.
Reviewed changes
Copilot reviewed 51 out of 53 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/plugins/clawhub.ts | Enforces exact-release ClawHub trust checks before download; adds risk acknowledgement flow + new error codes. |
| src/infra/clawhub.ts | Adds ClawHubPackageSecurity parsing + fetchClawHubPackageSecurity() API client. |
| src/plugins/update.ts | Forwards ClawHub risk acknowledgement options through dry-run and live update paths. |
| src/plugins/update.test.ts | Adds coverage to ensure ClawHub risk acknowledgement options are forwarded. |
| src/plugins/clawhub.test.ts | Adds tests for trust fetch, risky-release acknowledgement behavior, and security-unavailable failure. |
| src/cli/clawhub-risk-acknowledgement.ts | New helper to provide interactive prompt callback unless --acknowledge-clawhub-risk or non-TTY. |
| src/cli/plugins-install-command.ts | Wires CLI risk acknowledgement options into ClawHub install paths. |
| src/cli/plugins-update-command.ts | Wires CLI risk acknowledgement options into plugin update path. |
| src/cli/plugins-cli.ts | Adds --acknowledge-clawhub-risk flag and maps Commander option casing into downstream API shape. |
| src/cli/plugins-cli.install.test.ts | Ensures CLI install forwards --acknowledge-clawhub-risk to ClawHub installs. |
| src/cli/plugins-cli.update.test.ts | Ensures CLI update forwards --acknowledge-clawhub-risk to plugin updates. |
| docs/tools/plugin.md | Documents ClawHub trust gating and the acknowledgement flag. |
| docs/tools/clawhub.md | Documents trust checks + acknowledgement requirement for non-interactive automation. |
| docs/cli/plugins.md | Documents trust checks for install/update and --acknowledge-clawhub-risk. |
| CHANGELOG.md | Adds changelog entry for the new ClawHub trust gate and acknowledgement flag. |
| .semgrepignore | Adds centralized ignore globs for semgrep/opengrep scans (tests/fixtures/QA tooling). |
| .github/workflows/opengrep-precise.yml | Adds OpenGrep “precise” workflow that uploads SARIF. |
| package.json | Bumps pinned @anthropic-ai/sdk override. |
| pnpm-lock.yaml | Lockfile updates for @anthropic-ai/sdk and related transitive changes. |
| extensions/amazon-bedrock-mantle/package.json | Bumps @anthropic-ai/sdk dependency version. |
| .github/workflows/workflow-sanity.yml | Removed workflow. |
| .github/workflows/test-performance-agent.yml | Removed workflow. |
| .github/workflows/stale.yml | Removed workflow. |
| .github/workflows/sandbox-common-smoke.yml | Removed workflow. |
| .github/workflows/qa-live-transports-convex.yml | Removed workflow. |
| .github/workflows/plugin-npm-release.yml | Removed workflow. |
| .github/workflows/plugin-clawhub-release.yml | Removed workflow. |
| .github/workflows/parity-gate.yml | Removed workflow. |
| .github/workflows/package-acceptance.yml | Removed workflow. |
| .github/workflows/openclaw-scheduled-live-checks.yml | Removed workflow. |
| .github/workflows/openclaw-npm-release.yml | Removed workflow. |
| .github/workflows/openclaw-cross-os-release-checks-reusable.yml | Removed workflow. |
| .github/workflows/npm-telegram-beta-e2e.yml | Removed workflow. |
| .github/workflows/macos-release.yml | Removed workflow. |
| .github/workflows/install-smoke.yml | Removed workflow. |
| .github/workflows/full-release-validation.yml | Removed workflow. |
| .github/workflows/duplicate-after-merge.yml | Removed workflow. |
| .github/workflows/docs.yml | Removed workflow. |
| .github/workflows/docs-translate-trigger-release.yml | Removed workflow. |
| .github/workflows/docs-sync-publish.yml | Removed workflow. |
| .github/workflows/docs-agent.yml | Removed workflow. |
| .github/workflows/docker-release.yml | Removed workflow. |
| .github/workflows/control-ui-locale-refresh.yml | Removed workflow. |
| .github/workflows/codeql.yml | Removed workflow. |
| .github/workflows/ci-check-testbox.yml | Removed workflow. |
| .github/workflows/ci-build-artifacts-testbox.yml | Removed workflow. |
| .github/workflows/auto-response.yml | Removed workflow. |
| .github/dependabot.yml | Removed Dependabot config. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| name: OpenGrep — Precise | ||
|
|
||
| # Private fork test runner for the high-precision OpenGrep rulepack. | ||
| # Runs on demand and whenever this workflow or security/opengrep/precise.yml changes. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - .github/workflows/opengrep-precise.yml | ||
| - security/opengrep/precise.yml | ||
|
|
| export type PluginUpdateOptions = { | ||
| all?: boolean; | ||
| acknowledgeClawHubRisk?: boolean; | ||
| acknowledgeClawhubRisk?: boolean; | ||
| dryRun?: boolean; | ||
| dangerouslyForceUnsafeInstall?: boolean; | ||
| }; |
| "packageManager": "[email protected]", | ||
| "pnpm": { | ||
| "overrides": { | ||
| "@anthropic-ai/sdk": "0.91.0", | ||
| "@anthropic-ai/sdk": "0.91.1", | ||
| "hono": "4.12.14", | ||
| "@hono/node-server": "1.19.14", | ||
| "axios": "1.15.0", |
cfe678a to
86c2861
Compare
f7c8b6e to
2ba4a46
Compare
2ba4a46 to
273fd7c
Compare
|
Merged via squash.
Thanks @jesse-merhi! |
Merged via squash. Prepared head SHA: 273fd7c Co-authored-by: jesse-merhi <[email protected]> Co-authored-by: jesse-merhi <[email protected]> Reviewed-by: @jesse-merhi
…penclaw#81363) This reverts commit 87eb450.
Merged via squash. Prepared head SHA: 273fd7c Co-authored-by: jesse-merhi <[email protected]> Co-authored-by: jesse-merhi <[email protected]> Reviewed-by: @jesse-merhi
…penclaw#81363) This reverts commit ab2e7a1.
Merged via squash. Prepared head SHA: 273fd7c Co-authored-by: jesse-merhi <[email protected]> Co-authored-by: jesse-merhi <[email protected]> Reviewed-by: @jesse-merhi
…penclaw#81363) This reverts commit c454bf2.
Merged via squash. Prepared head SHA: 273fd7c Co-authored-by: jesse-merhi <[email protected]> Co-authored-by: jesse-merhi <[email protected]> Reviewed-by: @jesse-merhi
…penclaw#81363) This reverts commit 98ffb04.
Summary
--acknowledge-clawhub-riskfor reviewed automationplugins install,plugins update,openclaw update, onboarding installs, and repair/sync paths while keeping the local dangerous-code scanner intactVerification
pnpm test src/infra/clawhub.test.ts src/plugins/clawhub.test.ts src/plugins/update.test.ts src/cli/plugins-cli.install.test.ts src/cli/plugins-cli.update.test.ts src/cli/update-cli.test.ts src/commands/onboarding-plugin-install.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/auto-reply/reply/commands-plugins.install.test.tspnpm test src/cli/plugins-cli.install.test.ts src/cli/plugins-cli.update.test.ts src/cli/update-cli.test.tspnpm docs:check-mdxpnpm tsgo:core:testnode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/cli/clawhub-risk-acknowledgement.ts src/cli/plugins-cli.install.test.ts src/cli/plugins-cli.ts src/cli/plugins-cli.update.test.ts src/cli/plugins-install-command.ts src/cli/plugins-update-command.ts src/cli/update-cli.test.ts src/cli/update-cli.ts src/cli/update-cli/shared.ts src/cli/update-cli/update-command.ts src/commands/doctor/shared/missing-configured-plugin-install.ts src/commands/onboarding-plugin-install.test.ts src/commands/onboarding-plugin-install.ts src/infra/clawhub.test.ts src/infra/clawhub.ts src/plugins/clawhub.test.ts src/plugins/clawhub.ts src/plugins/update.test.ts src/plugins/update.ts src/auto-reply/reply/commands-plugins.install.test.tsgit diff --checkpnpm check:changedNote: attempted the documented Testbox warmup with
blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90, but GitHub returned 404 for that workflow onmain, so the changed gate was run locally.