feat(security): queue Endor reachability scans for plugins - #3742
jesse-merhi wants to merge 11 commits into
Conversation
|
🦞👀 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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 2:26 AM ET / 06:26 UTC (Revision 6). ClawSweeper reviewWhat this changesAdds background Endor dependency scans for plugin releases, with saved reachability findings in audit pages, APIs, and report downloads. Merge readiness✅ Ready for maintainer review Keep open: the requested capability is absent from current main, and this maintainer-authored PR remains useful. No blocking findings were identified. Priority: P2 Review scores
Verification
How this fits togetherClawHub’s security worker processes published plugin artifacts and rescan requests. It stores scanner results for audit displays while the primary ClawScan verdict controls moderation. flowchart TD
A[Plugin publication or rescan] --> B[Existing scan queue]
B --> C[Worker claims release lease]
C --> D[Primary ClawScan review]
C --> E[Optional Endor Docker scan]
D --> F[Validate lease and save results]
E --> F
F --> G[Audit page and report download]
F --> H[Primary verdict moderation]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain one scan queue and primary moderation authority, using the documented backend-first rollout and enabling Endor only with the compatible released adapter and pinned image. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this adds a scanner capability, with supplied real-run and fixture evidence covering its behavior. Is this the best way to solve the issue? Yes: extending the existing worker and lease contract is the narrowest suitable approach; synchronous scans would delay requests, while a generic scanner-storage migration would expand scope unnecessarily. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ff6c118c132a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Plugin publication and rescan requests enqueue Endor analysis in the existing security worker. The audit page reads the saved result, so a scan that takes about a minute does not hold the request open. The companion ClawScan adapter is PR #55.
Behavior
FINDING_TAGS_REACHABLE_FUNCTION, with a bounded summary and full count. Include that summary in the audit ZIP and retain the complete scanner report in private storage.raw: nullretain their actual scanner error.Proof
openclaw-nfr.clawhubcompleted in 54.439 seconds through the current helper using the3026ed5Endor image (npm 11.19.1), pinned Endor 1.7.1115 and unchanged91b1ebascanner binary: 12 raw findings, one exact reachable-function finding. Original files were unchanged, the temporary scanner key was revoked, and no owned container remained.endor.json.Local validation on
7eceb87c: 7,186 tests passed, plus static checks. All 38 worker tests, including the rendered timeout count, and TypeScript checks passed. Earlier type/build and schema/CLI/admin package checks remain applicable to unchanged sources and dependencies. Node 24.18.1 and Bun 1.4.2 were used. Native review of the current full PR and independent review of the changed worker paths are complete with no remaining actionable findings; independent evidence for the other 34 unchanged paths is retained. Earlier hosted CI applies to the previous remote head only.Rollout and limits
Endor remains disabled until the additive backend is deployed and the worker has a released ClawScan adapter, digest-pinned image and scoped credentials. Stop Endor by disabling the worker flag while retaining the additive schema and handlers. Old schemas reject stored Endor fields. Later completed scans replace the combined report; this does not add report history.
Scans use Endor dry-run mode. Reports live in ClawHub and do not populate Endor's project dashboard. The adapter rejects target
.npmrcfiles; private-registry configuration is unsupported. A report uploaded during hard deletion can remain unattached in private storage. When the primary scanner and Endor cleanup fail together, the recorded primary failure can hide the secondary cleanup detail; the job still fails and retries. These minor lifecycle/diagnostic limits remain documented.Branch coverage is 78.56% (2,675/3,405), below AGENTS' documented 80% target while passing the configured 70% threshold. The baseline control emitted 78.18%, but that control command failed on an existing socket error. The missing coverage in changed files predates this PR; the new Endor branches are covered. Jesse approved an exception for this existing coverage gap on 2026-09-21; the configured threshold remains unchanged.
Change Breakdown