Skip to content

fix(security): accept completed SkillSpector findings exits - #4499

Merged
Patrick-Erichsen merged 2 commits into
mainfrom
openclaw/retained-upload-047-rca
Nov 9, 2026
Merged

Patrick-Erichsen merged 2 commits into
mainfrom
openclaw/retained-upload-047-rca

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator

Summary

  • Fix the typed-worker compatibility mismatch behind retained yamyeed/office-collaboration-radar@0.4.7: native SkillSpector completed successfully with exit 1 for findings and retained exit status 1 stderr, but ClawHub required exit 0 and empty diagnostics.
  • Admit only completed findings exits with real execution provenance, valid nonempty native issues, explicit successful execution and successful complete accounting. Check count/range consistency locally without changing legacy complete/partial contracts. Preserve original reports, process diagnostics, required scanners and independent judge authority.
  • Add subprocess-level benign/suspicious/malicious regressions and 21 fail-closed controls; document the contract.

Relates to #4492. No production retry, deployment, merge, rescan, policy bypass or scanner-owner change. The incident remains open; merge and recovery remain on hold.

Root cause and retained identity

Read-only inspection verified 25 retained files / 151,464 bytes. Attempt, pending version and pending-publication inventories match; every retained storage size/SHA-256 matches. Recomputed fingerprint: fa3193b1258c79cbcd76d62488fe7ca90f4d7ce973333b726c2d60b57707930e. Parent/owner remain active; public latest remains 0.4.5.

All three preserved native runs completed successfully: outer exit 0, AIG completed, SkillSpector completed exit 1 with successful complete accounting, independent judge benign. ClawHub rejected every projection with ClawScan scanner skillspector did not complete with execution provenance. Three operational failures exhausted retries before normalized reports or finalization were stored. Private immutable execution receipts exist despite publisher-visible Scan results not found. No raw private report or source is attached.

The rejecting predicate was introduced in #4411 and is present in the recorded worker revision. #4351 concerns advisory Inspector state; #4468 recovers expired finalizing leases. This attempt never reached finalizing, so neither is its applicable recovery path.

Comparable before/after proof

Evidence Before After
Worker subprocess fixture: completed SkillSpector exit 1 plus native stderr All 3 benign/suspicious/malicious cases fail with the exact production error Benign and suspicious preserve verdicts; malicious remains blocked
Three unchanged retained native captures through the real worker subprocess/result boundary Same rejection on all 3 All 3 clean/benign, completed SkillSpector, clean AIG
Negative controls Existing scanner/judge gates Crash exits, unknown process errors, unsuccessful/incomplete evidence, malformed native issues including masking aliases, impossible accounting, imported report, missing AIG and failed judge remain failed

This is synthetic/captured native-output replay, not new scanner/provider execution or production recovery. Raw captures remain private in the isolated workspace. This nonvisual worker change uses paired executable output rather than screenshots. Proof was presented before publication.

Recovery hold

The supported exact-attempt maintenance:retryFailedPublishAttemptChecksInternal dry run returned eligible: true, requeued: false, previous failure count 3 after validating identity, ownership/moderation, expiry and pending target. Inspection only; no retry was applied.

The audited one-artifact retry must wait for authorized fixed-worker activation and fresh eligibility checks. requiredScannerSource binds the native ClawScan pin, not the ClawHub consumer revision. This fix does not change that pin: the existing production owner must also ensure older queued/in-flight consumers cannot claim the retry. Recovery must pass normal secret/scanner/judge/finalization gates. On uncertain outcome, reconcile the same attempt/target/audit before any further write. Do not import a historical benign report as publication authorization.

Validation

Tested commit: 91972ed90f5e1fd4c267f7fff09d9b8f8c24d2c0.

  • Red: bunx vitest run scripts/security/clawscan-decisions.test.ts -t "completed SkillSpector findings exits" — 3 failed before the fix with the production error.
  • Final green: bunx --package bun@1.4.4 bun x vitest run scripts/security/clawscan-decisions.test.ts — 93 passed, including 21 fail-closed controls.
  • Review regressions: same test file with -t "malformed native issues with findings alias|impossible accounting" — 2 failed before repairs; both pass in the final suite.
  • Private unchanged-capture replay: bun .artifacts/4492/replay-retained.ts — 3/3 pass through the repaired worker boundary.
  • bunx --package bun@1.4.4 bun run ci:static — pass (existing audit advisories remain warnings).
  • bunx --package bun@1.4.4 bun run ci:types-build — pass.
  • Exact installed Bun 1.4.4: bun run ci:unit --maxWorkers=2 — 673 files / 9,356 tests passed, 1 file / 5 tests skipped, 407.42s. Coverage gates pass: 89.66% statements / 83.61% branches / 91.05% functions / 92.11% lines. No coverage/timeout thresholds changed.

The initial shared dependency symlink caused unrelated package-resolution errors; only this worktree received its own frozen-lockfile install, with no lockfile/shared-install changes. An earlier concurrent full run had native Bun ENOEXEC and timing failures; the complete final rerun using the installed pinned executable with no competing bunx/build jobs passed every previously failing leaf.

Canonical autoreview CLI failed authentication before yielding a review. Equivalent independent read-only review found two P2 issues (alias masking and impossible accounting); both were reproduced red and fixed. Follow-up independent review found no remaining P0–P3 findings. No credentials or review configuration changed.

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clawhub Ready Ready Preview Nov 9, 2026 10:03pm UTC

Request Review

@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR accepts completed SkillSpector exit-1 findings reports with validated execution and accounting while preserving independent judge decisions.

Example: SkillSpector completes with exit 1, retained stderr, valid findings and complete accounting, followed by a benign judge verdict.

  • Before: The worker rejects the result with “ClawScan scanner skillspector did not complete with execution provenance”.
  • After: The worker preserves the benign verdict and reports a clean check; a malicious judge verdict still blocks.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with useful subprocess regressions and no identified blocking defect; observable evidence remains at the synthetic worker boundary and recovery is outside scope.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored consumer repair is outside the ordinary contributor proof gate; inspectable tests exercise the real worker with synthetic output, while the described private retained-capture replay is not independently inspectable.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: A successfully scanned upload can exhaust publication retries without producing publisher-visible scan results.
Reason: The maintainer-authored repair aligns the consumer with the pinned producer and preserves existing risk policy; incident recovery remains explicitly separate.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: current main still rejects valid completed SkillSpector findings exits, and the scoped repair has no identified blocking defect; the explicit merge hold remains in force.

Priority: P2
Reviewed head: 086739e68ea995e4f5dc2fdd43ac4733def1943e

Before merge

  • Await maintainer action - The responsible maintainer must explicitly release the recorded merge hold before this PR lands.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not expose an inspectable shipped-worker trace of the retained-capture replay; paired base-failure and repaired-success results are reported in the PR body.
Agent review details

How this fits together

The shared typed-result validator receives native ClawScan artifacts from publication and background workers and produces retained scanner evidence and judge verdicts for existing publication gates.

flowchart LR
  A[Retained artifact] --> B[Native ClawScan]
  B --> C[SkillSpector and AIG evidence]
  C --> D[Independent judge]
  D --> E[Shared typed validator]
  E --> F[Worker check result]
  F --> G[Existing publication gates]
Loading

Technical review

Best possible solution:

Land the bounded shared-validator repair after the recorded hold is released, keeping exact-attempt recovery subject to separate authorization and normal publication checks.

Do we have a high-confidence way to reproduce the issue?

Current main deterministically rejects completed SkillSpector exit-1 artifacts, and the pinned producer source confirms that such artifacts can represent successful findings runs; execution was not repeated during this read-only review.

Is this the best way to solve the issue?

This is the best fix location: both consumers share the rejecting validator, while changing producer exit semantics or adding retry logic would leave the consumer contract mismatch unresolved.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9e51f498708c.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Preflight source

Source 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

Metric Value Why it matters
Scoped change size Production +76/-4; tests +110; specification +9 The added validation and subprocess controls serve the narrowly expanded findings-exit contract without introducing another worker or recovery path.

Labels

Label changes:

  • add P2: A concrete publisher update is blocked by the consumer mismatch, while the previous public version remains available and no broad outage is established.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

Label justifications:

  • P2: A concrete publisher update is blocked by the consumer mismatch, while the previous public version remains available and no broad outage is established.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 9, 2026, 5:14 PM ET / 22:14 UTC.

@Patrick-Erichsen
Patrick-Erichsen merged commit 6d837ea into main Nov 9, 2026
73 of 75 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the openclaw/retained-upload-047-rca branch November 9, 2026 22:36

This branch was successfully deployed

1 active deployment
Preview – clawhub — 086739e6 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant