Skip to content

fix(claws): bind security review to artifacts and isolate status reads - #166801

Closed
Patrick-Erichsen wants to merge 4 commits into
codex/claw-1093-publish-15-installed-approvalfrom
codex/claw-1093-publish-16-security-status
Closed

Patrick-Erichsen wants to merge 4 commits into
codex/claw-1093-publish-15-installed-approvalfrom
codex/claw-1093-publish-16-security-status

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Publication Refresh: October 7

Layer 16/16. Previous: #166800 | Final layer. Published checkpoint: 9e653a8ed286.

Full stack tip: #166801. Earlier local-ClawHub lifecycle evidence remains in #163307, tied to its recorded revision.

Automated branch repair is intentionally not enabled independently on these dependent branches: the inspected repair executor defaults to rebasing onto main, without a coordinated restack. The stack owner must reconcile the base and propagate any repairs before requesting merge readiness.

What Problem This Solves

A clean component scan could override an aggregate ClawHub warning, security review could refer to different artifact bytes, and concurrent status reads could invalidate each other's plugin records.

User Impact

Claw and managed-plugin installs honor the full registry verdict and exact selected artifact. Malicious or mismatched content stops before persistence; review-required content needs the appropriate acknowledgement. Concurrent status requests complete independently.

Why This Change Was Made

Bind security evidence to package identity, version, artifact kind, SHA-256, and npm integrity; require trust for Claw-managed official plugins; and give each status read its own plugin cache.

Evidence

  • Fresh before/after regression: copied the committed status tests into the parent dc3d05c5aaea. Two concurrency cases failed with PLUGIN_CACHE_FACT_INVALIDATED; the same three tests passed at 9e653a8ed286.
  • At 9e653a8ed286, 100 focused backend tests passed on October 7 in 64.75 seconds, including aggregate malicious/review verdicts, exact artifact mismatch, managed plugin trust, final grant rechecks, manifest disclosure, and Remove authority.
  • Combined-stack browser checks: 13/13 passed in 28.51 seconds. git diff --check passed for the full stack.
  • The unchanged tip previously passed pnpm check:changed; this is not a claim of CI success on the current main merge result.

Stack

This is the final follow-up layer after the existing draft stack ending at #163307. The publication preserves the 12 existing PRs and adds four layers for 45 previously local commits. None of these PRs is a standalone public launch.

Publication Scope

Related: #163946. This is a draft layer in the Claws Labs stack. The stack retains its previously tested base and currently conflicts with newer main; this publication does not resolve that drift or authorize a release. Production ClawHub support, the compatible published Lobster artifact, official catalog security review, and RFC acceptance remain release gates. The local-source CLI and official-only launch scope are unchanged.

@clawsweeper

clawsweeper Bot commented Oct 7, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts size: L labels Oct 7, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 7, 2026
@clawsweeper

clawsweeper Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed October 7, 2026, 7:27 PM ET / 23:27 UTC.

ClawSweeper review

What this changes

The branch makes Claw installs honor aggregate registry verdicts and exact artifact identity, checks official managed-plugin trust, and isolates concurrent installed-status reads.

Merge readiness

⛔ Blocked before merge - 4 items remain

This layer contains distinct hardening that current main does not provide and belongs to an active implementation stack. No definite introduced bug was found, but the changed trust boundary lacks sufficient runtime evidence for merge readiness.

Priority: P2
Reviewed head: 9e653a8ed286bdab0d7c81c3b4c1f2043a49a589

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation and focused regressions are useful, but real evidence for the changed authority boundary remains a merge gate.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: Authority-chain proof required: the changed trust owner authorizes artifact persistence and managed plugin installation, but current-head evidence uses mocked registry/download clients. Show an accepted exact release and rejection of mismatched bytes, missing Review acknowledgement, and a verdict revoked after planning before final installed effects. Older inspected lifecycle screenshots remain valid for their recorded revision. No stored schema or record-shape change is introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Authority-chain proof required: the changed trust owner authorizes artifact persistence and managed plugin installation, but current-head evidence uses mocked registry/download clients. Show an accepted exact release and rejection of mismatched bytes, missing Review acknowledgement, and a verdict revoked after planning before final installed effects. Older inspected lifecycle screenshots remain valid for their recorded revision. No stored schema or record-shape change is introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 12 items Pinned introduction boundary: Reviewed the merge-base-to-head delta from 28da785 to 9e653a8. The verified test merge targets the preceding stack layer, not fetched main. The checkout remained clean, and the introduced diff passed whitespace inspection.
Aggregate verdict enforcement: The shared trust owner now evaluates the aggregate verdict before accepting clean component metadata. Blocked and malicious verdicts are terminal; unknown or review verdicts cannot become clean.
Selected artifact binding: Claw source resolution supplies the selected digest and npm integrity to the security check. The trust owner rejects a different artifact kind, digest, integrity, or supplied npm shasum before source download and persistence.
Findings None None.
Security None None.

How this fits together

Claws are versioned agent packages whose installation can add plugins and other managed resources. Registry security metadata and operator consent feed the installation owners; Gateway status reads report the resulting installed resources.

flowchart TD
  A[Selected registry release] --> B[Artifact and verdict checks]
  B --> C{Blocked or needs review?}
  C -->|Blocked| D[Visible refusal]
  C -->|Review| E[Operator acknowledgement]
  C -->|Clean| F[Managed installation]
  E --> F
  F --> G[Installed resource records]
  G --> H[Independent status reads]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Authority-chain proof required: the changed trust owner authorizes artifact persistence and managed plugin installation, but current-head evidence uses mocked registry/download clients. Show an accepted exact release and rejection of mismatched bytes, missing Review acknowledgement, and a verdict revoked after planning before final installed effects. Older inspected lifecycle screenshots remain valid for their recorded revision. No stored schema or record-shape change is introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Real transport evidence has not established that an authorized exact release succeeds while a mismatched artifact, unacknowledged Review outcome, or verdict revoked after planning is rejected before installed artifact/config effects.
  • Resolve merge risk (P1) - The dependent stack still needs owner-coordinated reconciliation with current main and satisfaction of its recorded prerequisite gates; the supplied test merge validates only the preceding stack-layer base.
  • Complete next step (P2) - Have the stack owner reconcile the dependent branches with current main and satisfy the recorded prerequisite gates before requesting merge readiness.
Agent review details

Security

None.

PR surface

Source +91, Tests +667, Docs +3, Other +2. Total +763 across 27 files.

View PR surface stats
Area Files Added Removed Net
Source 10 143 52 +91
Tests 14 724 57 +667
Docs 2 9 6 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 27 878 115 +763

Review metrics

Metric Value Why it matters
Production and regression growth production +142/-51; tests and test support +724/-58 Production growth implements artifact and verdict enforcement while the larger regression delta replaces cache-clearing mocks and covers managed trust failures.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #163946
Summary: This PR is a candidate for the security and status portion of the canonical Claws Labs launch, rather than a duplicate of the earlier stack layers.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Prove the changed trust boundary (recommended)
    Provide redacted production-path evidence using real registry transport that shows accepted installation and rejection of mismatched, unacknowledged, and revoked release authority before final effects.

Technical review

Best possible solution:

Keep one shared artifact-trust owner, preserve direct-install policy, and use independently scoped status reads within the coordinated Claws stack.

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

Yes, source establishes the aggregate-verdict defect: current main can classify clean component trust as clean without consulting a malicious aggregate verdict. The reported status race has focused parent/head regression evidence, but was not executed in this review.

Is this the best way to solve the issue?

Yes, extending the existing trust owner and replacing shared invalidation with scoped cache ownership is a focused solution; final-effect runtime evidence is still needed.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 40d735e451b1.

Labels

Label changes:

  • add P2: This is bounded trust and concurrency hardening in an experimental implementation stack, without evidence of an urgent shipped regression.
  • add merge-risk: 🚨 security-boundary: Registry trust now governs additional managed installation effects, and real rejection evidence for forbidden or stale release authority remains incomplete.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Authority-chain proof required: the changed trust owner authorizes artifact persistence and managed plugin installation, but current-head evidence uses mocked registry/download clients. Show an accepted exact release and rejection of mismatched bytes, missing Review acknowledgement, and a verdict revoked after planning before final installed effects. Older inspected lifecycle screenshots remain valid for their recorded revision. No stored schema or record-shape change is introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This is bounded trust and concurrency hardening in an experimental implementation stack, without evidence of an urgent shipped regression.
  • merge-risk: 🚨 security-boundary: Registry trust now governs additional managed installation effects, and real rejection evidence for forbidden or stale release authority remains incomplete.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Authority-chain proof required: the changed trust owner authorizes artifact persistence and managed plugin installation, but current-head evidence uses mocked registry/download clients. Show an accepted exact release and rejection of mismatched bytes, missing Review acknowledgement, and a verdict revoked after planning before final installed effects. Older inspected lifecycle screenshots remain valid for their recorded revision. No stored schema or record-shape change is introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Pinned introduction boundary: Reviewed the merge-base-to-head delta from 28da785 to 9e653a8. The verified test merge targets the preceding stack layer, not fetched main. The checkout remained clean, and the introduced diff passed whitespace inspection. (9e653a8ed286)
  • Aggregate verdict enforcement: The shared trust owner now evaluates the aggregate verdict before accepting clean component metadata. Blocked and malicious verdicts are terminal; unknown or review verdicts cannot become clean. (src/infra/clawhub-install-trust.ts:127, 9e653a8ed286)
  • Selected artifact binding: Claw source resolution supplies the selected digest and npm integrity to the security check. The trust owner rejects a different artifact kind, digest, integrity, or supplied npm shasum before source download and persistence. (src/infra/clawhub-install-trust.ts:331, 9e653a8ed286)
  • Managed plugin trust and consent: Claw-managed installs propagate requireClawHubTrust through the existing management owner. Direct official plugin installation retains its existing exemption; managed installs compare the returned warning with reviewed consent and retain the existing artifact, grant, and live-owner checks. (src/plugins/clawhub.ts:962, 9e653a8ed286)
  • Status isolation: Each status operation creates and disposes its own plugin cache instead of clearing shared pending facts. The added regressions exercise concurrent reads, removal-side cache clearing, and a changed installed version on the next request. (src/claws/gateway-status-worker.ts:37, 9e653a8ed286)
  • Current main still lacks the central fix: Fetched main still passes only component trust into assessClawHubTrust; it does not evaluate the aggregate security verdict there. This establishes continuing value without inferring a revert from endpoint drift. (src/infra/clawhub-install-trust.ts, 40d735e451b1)

Likely related people:

  • Patrick-Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • jacobtomlinson: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add final-effect evidence using real registry transport for an allowed exact release, mismatched artifact, unacknowledged Review outcome, and revocation after planning; redact credentials and private endpoints.
  • Coordinate stack reconciliation and preserve its recorded prerequisite gates; update the PR body with proof to trigger re-review, or ask a maintainer for @clawsweeper re-review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Closing as superseded: #171623 replaced the Claws plan/review/update/remove lifecycle with a one-way Add operation, and main no longer has the lifecycle modules this layer changes. Any hardening here that still matters should be redone against the new Add flow.

Closed by Roboclaw at the author's request after an audit of his open PRs. The branch is kept, so this can be reopened if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants