Repository navigation
fix(security): plugins that declare pnpm get Endor scans instead of failing - #4804
Conversation
endorctl's host-check demands the pnpm binary whenever package.json names pnpm in packageManager or a pnpm-workspace.yaml exists, even next to an npm lockfile. The scanner image only runs npm and Yarn, so these releases failed with "Cannot access the pnpm command" and an unhelpful "request a rescan". The disposable scan copy now drops a pnpm packageManager value and any pnpm-workspace.yaml. Neither changes what npm resolves, and a root pnpm-lock.yaml is still skipped before normalization.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Codex review: needs maintainer review before merge. What this changesThis PR removes pnpm selection metadata from disposable scan copies so plugins without a root pnpm lockfile can receive Endor scans through npm. Example: Scan @arloraccoon/openclaw-vaultwarden-plugin@0.1.4, which declares pnpm without shipping its lockfile.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review No findings. This maintainer-authored PR fixes a current scanner failure absent from main, and the supplied real Endor logs establish successful completion. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe security worker copies published plugin artifacts into a disposable workspace, runs the isolated Endor scanner, and saves advisory release results separately from moderation. flowchart LR
A[Published plugin artifact] --> B[Security worker]
B --> C[Disposable normalized copy]
C --> D[Isolated Endor scanner]
D --> E[Advisory release result]
E --> F[Security audit page]
Technical reviewBest possible solution: Land the focused normalization change through the existing scanner owner while preserving root-lockfile skipping, artifact integrity and report-only results. Do we have a high-confidence way to reproduce the issue? Current main preserves the metadata implicated by the supplied real Endor host-check failures; the contributor supplies concrete affected releases and before/after output, though this read-only review ran no target code. Is this the best way to solve the issue? Best-fix verdict: best. Extending disposable-copy normalization addresses the selector mismatch at its existing owner; skipping these packages would sacrifice coverage, adding pnpm would expand the isolation surface, and the supplied host-check experiment shows Endor's npm override does not bypass the failure. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a83aceea4249. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 16, 2026, 1:55 AM ET / 06:55 UTC (Revision 2). |
|
@clawsweeper re-review The PR body now includes a real Endor run with no stand-in API. The real worker code and the pinned Production image, scanning against the |
|
🦞👀 Re-review progress:
|
Problem: Endor can't scan code plugins whose
package.jsonsays"packageManager": "pnpm@…". The scanner image has no pnpm, so endorctl stops at its host check, and the release is saved asfailedwith "Request a rescan to try again". A rescan fails the same way. In the current Production backfill, that's 301 of the 303 releases that fail on pnpm, across 31 packages. None of them ship a pnpm lockfile.Fix: The worker already tidies a throwaway copy of the package before Endor sees it (for example, it renames
npm-shrinkwrap.json). Now it also removes the two things that make endorctl ask for pnpm: a pnpmpackageManagervalue andpnpm-workspace.yaml. npm reads neither, so dependency resolution doesn't change, and these plugins get scanned with npm. The published artifact, the scanner image and moderation are untouched. Packages with a realpnpm-lock.yamlare still saved asskipped.Proof
Real failing releases, real worker, Production scanner image, stand-in API
@arloraccoon/openclaw-vaultwarden-plugin@0.1.4pnpm
packageManager, no lockfileEndor exited 27openclaw-code-agent@6.0.4pnpm
packageManager+npm-shrinkwrap.jsonEndor exited 27@yuder-altcode/openclaw-plugin-izipay@0.1.0pnpm-workspace.yamlonlyEndor exited 27Before: main stops at the host check (vaultwarden 0.1.4; matches the Production error)
After: this PR scans the same release with npm
These runs used the pinned Production image (
ghcr.io/openclaw/clawhub-endor@sha256:3db43b8b…, endorctl v1.7.1115), its entrypoint, egress guard andscan.sh, and the worker's real container flags. To avoid using Endor credentials, a local stand-in for the Endor API ran inside the container. That stand-in can't answer Endor's package-metadata requests, so these runs still end in an error once dependencies are resolved. The real Endor run below covers the rest.Real Endor scan, no stand-in
Same worker code and the unmodified Production image, run against the real
openclaw-nfr.clawhubnamespace with a temporary Code Scanner key, which was then deleted:@arloraccoon/openclaw-vaultwarden-plugin@0.1.4failed: needs pnpmcompleted: 741 dependencies resolved with npm, 0 scan failures, 0 call graph errors, 0 reachable vulnerable functions@yuder-altcode/openclaw-plugin-izipay@0.1.0failed: needs pnpmfailed: in two runs, Endor timed out reading back the call graph it had just storedWhat makes endorctl ask for pnpm
The real endorctl host check, run on small test packages with no pnpm installed:
packageManager: "pnpm@…"packageManager: "pnpm@…"andpackage-lock.jsonpnpm-workspace.yamlpnpm-lock.yamlskipped)packageManager: "pnpm@…"withENDOR_JS_PACKAGE_MANAGER=npmsetpackageManagernaming npm or Yarn, apnpmfield,engines.pnpm, orpackageManager: "pnpm@…"only in a nested packageSo removing those two markers is enough. Marking these releases
skippedwould leave them unscanned. Adding pnpm to the image is bigger and security-sensitive, and it would give the same result here because these releases have no pnpm lockfile.Supporting checks and change details
Checks
bunx vitest run scripts/security/run-endor-plugin-scan.test.ts: 9/9 pass. The normalization test now also covers a pnpmpackageManagerandpnpm-workspace.yaml.bun run ci:static: passes.bunx tsc -p packages/schema/tsconfig.json --noEmitandbunx tsc -p packages/clawhub/tsconfig.json --noEmit: pass.VITE_CONVEX_URL=https://example.invalid bun run coverage: 13 failures, all timeouts in unrelated security-worker suites while local Docker proof runs were using the machine. All six of those files pass when rerun on their own.scripts/security/endor/fixtures/run.shwasn't run: the image, npm, Yarn,scan.shand the egress guard are unchanged.Edge cases handled
pnpm-workspace.yamlis removed too, and the tree walk lists entries after normalizing, so the removal can't break it.packageManagervalue ofpnpmorpnpm@…is removed. npm and Yarn values are kept.Related, not in this PR
The same backfill has 138 failures from publishers' broken dependencies (
ws@main, git URLs, npm 404s). A rescan can't fix those either, so their "Request a rescan" text is misleading too. Worth a separate change.Change breakdown
run-endor-plugin-scan.ts)specs/endor-plugin-scans.md)