Repository navigation
fix(plugins): reject unverifiable pinned npm installs - #136725
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 2, 2026, 7:31 PM ET / 23:31 UTC. ClawSweeper reviewWhat this changesThe PR aborts a pinned npm plugin install before npm runs when registry metadata lacks the integrity value needed to validate its expected artifact pin. Merge readiness⛔ Blocked before merge - 1 item remains Keep open. This is a focused, correct repair for a documented pinned-install verification bypass; it is not already on current main. The only material merge consideration is the intentional fail-closed behavior for registries that omit integrity metadata. Priority: P2 Review scores
Verification
How this fits togetherPlugin onboarding and management resolve npm metadata before installing an external plugin into OpenClaw’s managed npm root. The integrity gate decides whether a catalog pin can be verified before installation and capability review proceed. flowchart LR
A[Plugin install request] --> B[npm registry metadata]
B --> C[Integrity gate]
C -->|pin verified| D[Managed npm install]
C -->|pin missing or different| E[Visible abort]
D --> F[Installed plugin]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -44, Tests +93. Total +49 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared pre-install gate: permit unpinned installs, but reject a pinned registry install when its required integrity proof is absent. Do we have a high-confidence way to reproduce the issue? Yes, source evidence is high-confidence: npm can omit an unavailable requested view field, OpenClaw accepts that metadata, and current main then proceeds without comparing the expected pin. The PR’s loopback-registry test exercises this path, but it was not run in this read-only review. Is this the best way to solve the issue? Yes. Enforcing the invariant at the shared pre-install integrity owner is the narrowest maintainable repair; downstream lockfile verification cannot validate an expected pin when the registry resolution supplied no integrity. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2b08972def7e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
* refs/remotes/origin/main: fix(plugins): reject unverifiable pinned npm installs (#136725) improve(ui): lift sidebar section headers on hover and mark online owners (#136985) test(cron): reuse isolated run suite hooks (#137341) test(channels): reuse shared indexed call guards (#137350) fix(ui): sidebar header controls read misaligned after the + button lost its border (#137317) fix(qa-channel): preserve conversation kind for implicit actions (#137343) fix: target the source checkout in Control UI repair commands (#137354) chore: reduce CI job count and database test overhead (#137352) fix(ios): preserve chat live edge across keyboard transitions (#136660) refactor(control-ui): consolidate mention inbox requests (#137375) fix(openai): preserve ChatGPT HTTP status for retry pacing (#137146) fix(mcp): hide policy-denied plugin tools from ACP sessions [AI] (#136546) test(queue): reuse shared deferred fixtures (#137338) fix(gateway): repair the Gateway E2E shard (browser suite project, skill resource argv, Codex diagnostic) (#137358)
Summary
Make pinned npm plugin installs stop when package metadata cannot provide the integrity value needed to validate the pin.
Changes
Validation
node scripts/run-vitest.mjs run src/infra/npm-integrity.test.ts --reporter=dotnode scripts/run-vitest.mjs run src/plugins/install.npm-spec.test.ts --reporter=dotnode scripts/run-vitest.mjs run src/plugins/install.npm-spec.e2e.test.ts -t 'rejects a trusted pin when a real registry omits dist.integrity' --reporter=dotnode scripts/check-changed.mjs -- src/infra/npm-integrity.ts src/infra/npm-integrity.test.ts src/plugins/install.npm-spec.test.ts src/plugins/install.npm-spec.e2e.test.ts src/plugins/test-helpers/npm-registry-fixtures.tsNotes