Skip to content

fix(skills): keep installed verdicts scoped to publisher - #119672

Merged
steipete merged 3 commits into
mainfrom
steipete/elastic-perlman-ec17da
Aug 5, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/elastic-perlman-ec17da

Conversation

@steipete

@steipete steipete commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #117681
Related: openclaw/clawhub#3409

What Problem This Solves

Fixes an issue where Control UI could lose or misattribute the security verdict for an installed ClawHub skill when another publisher used the same slug and version. Installed provenance already recorded the trusted publisher, but the passive verdict path dropped that owner before batching and keyed UI state only by registry, slug, and version.

Why This Change Was Made

OpenClaw now carries the installed ownerHandle through target collection, the shared exact-skill verdict resolver, Gateway protocol projection, Control UI keys, and the installed-skill detail view. One canonical resolver is shared with install/update trust: it safely correlates batch responses by request identity, keeps owner-collision requests compatible with older registries by separating legacy-conflicting batches, uses the existing exact owner-qualified /verify fallback only for skill_not_found, preserves unauthenticated passive reads, and fails closed on publisher or exact-version mismatch.

The additive ClawHub API support landed first in openclaw/clawhub#3409 (f9ea25e14f14c05f9544d3878d1626d0dcec4b7a). Older/custom registries remain compatible through the exact /verify fallback. Passive reads still run only against the currently configured registry; unrelated installed registry records remain skipped.

This is independent of #117681: that PR preserves publisher identity during search/detail/install selection, while this PR preserves the installed publisher identity during later security-verdict reads.

User Impact

Operators see and evaluate the verdict for the exact installed publisher. The installed overview now renders the complete reference, such as @openclaw/[email protected], and a malformed, reordered, mismatched, or older-registry response cannot silently attach another publisher's clean verdict.

No config surface, protocol version, schema version, release, or changelog change is introduced. The Gateway field is optional for compatibility with older clients.

Evidence

  • Focused regression proof after rebasing onto current main at the time of implementation:
    • node scripts/run-vitest.mjs src/infra/clawhub-skill-security.test.ts src/infra/clawhub.test.ts src/skills/lifecycle/clawhub.test.ts src/gateway/server-methods/skills.clawhub.test.ts ui/src/lib/skills/index.test.ts ui/src/pages/skills/view.test.ts
    • 4 Vitest shards passed: 6 files, 273 tests.
    • Final helper-only rerun passed: 1 file, 3 tests.
  • Changed-lane proof:
    • The repository's changed-check delegated route was unavailable because the local Crabbox/Testbox broker was not authenticated.
    • Trusted-source fallback ran locally and passed formatting, conflict/env/max-lines guards, dependency/patch/boundary guards, dead-code export checks, UI i18n, tsgo:core, tsgo:core:test, tsgo:ui, targeted oxlint, native schema guard, database-first/storage/media/sidecar checks, import-cycle check, webhook body-order guard, and pairing auth guards.
  • Real UI proof from an isolated dev gateway and temporary workspace: the actual Skills detail dialog rendered @openclaw/[email protected] and issued the owner-qualified exact /verify compatibility request. A sanitized dialog-only screenshot contains no user session data and will be attached to the PR.
  • Codex autoreview (gpt-5.6-sol, high reasoning) on the final branch reported no accepted/actionable findings.
  • git diff --check passed.
  • ClawSweeper's exact-head review found that older-registry /verify fallbacks were serial. The follow-up commit bounds that path to six concurrent requests per batch and adds a regression proving eight fallbacks complete with exactly six in flight while preserving result order and identity checks.
  • Production/test delta after the bounded-fallback repair: production +385/-193 (net +192), tests +568/-34 (net +534). The production growth establishes one canonical security owner boundary, response-correlation contract, and explicit compatibility-path capacity limit while deleting the previous 170-line install-only fallback implementation.

AI-assisted: yes. I understand and can maintain this change.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Aug 5, 2026
@steipete
steipete marked this pull request as ready for review August 5, 2026 15:49
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

After-fix Control UI proof from an isolated dev gateway and temporary workspace. The actual installed-skill dialog renders the complete owner-qualified identity @openclaw/[email protected]; only the sanitized dialog is included.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 5, 2026, 5:29 PM ET / 21:29 UTC.

ClawSweeper review

What this changes

This PR preserves the installed ClawHub publisher through security-verdict lookup, Gateway projection, and Control UI cache/display keys to prevent same-slug publishers sharing a verdict.

Merge readiness

⚠️ Ready for maintainer review - 6 items remain

Keep open: the new older-registry fallback performs up to 100 owner-qualified verification requests serially, which can stall the passive verdict RPC for roughly 50 minutes at the default timeout. The protected maintainer/security labels and unavailable upstream API evidence also require human review before merge.

Priority: P2
Reviewed head: 31199c7245b101baea6b930ea6fcc607814e3192
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch has focused coverage and a coherent owner boundary, but the serial fallback defect and unverified external contract prevent a higher rating.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository state identifies a maintainer-authored PR, so the external-contributor proof gate does not apply; the claimed screenshot was not available to inspect and does not establish the external API contract.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository state identifies a maintainer-authored PR, so the external-contributor proof gate does not apply; the claimed screenshot was not available to inspect and does not establish the external API contract.
Evidence reviewed 5 items Current-main defect: Current target collection groups installed skills by registry, slug, and version, omitting the recorded publisher identity; the PR addresses the correct owner boundary.
Concrete branch finding: The exact resolver awaits legacy owner-qualified verification fallbacks in sequence; with a 100-item batch and 30-second request timeout, an older registry can leave the passive verdict RPC waiting about 50 minutes.
Shared owner-boundary path: The branch moves install/update trust onto the same exact resolver and validates publisher and version mismatches fail closed before projection.
Findings 1 actionable finding [P2] Bound legacy verification fallbacks
Security Needs attention Serial legacy security-verdict fallbacks: Sequential owner-qualified verification requests can make passive verdict retrieval unavailable for many timeout intervals on older registries.

How this fits together

Installed skills retain registry provenance, which the Gateway uses to fetch a security verdict and the Control UI uses to render trust status. This patch makes publisher identity part of that provenance-to-verdict correlation.

flowchart LR
A[Installed skill provenance] --> B[Verdict target collection]
B --> C[Exact registry resolver]
C --> D[Batch or verify request]
D --> E[Gateway verdict response]
E --> F[Control UI cache]
F --> G[Installed skill detail]
Loading

Decision needed

Question Recommendation
Can the maintainer verify the owner-qualified ClawHub batch-response contract and exact-head behavior after the bounded fallback repair? Repair and verify the boundary: Bound the fallback fan-out, add concurrency regression coverage, and inspect the exact owner-qualified registry response before merge.

Why: The change sits on a security decision boundary and relies on an external API change that was unavailable to this read-only review.

Before merge

  • Bound legacy verification fallbacks (P2) - An older registry can return skill_not_found for every owner-qualified batch item. This loop awaits each exact /verify fallback in sequence, so a 100-item batch at the 30-second default timeout can keep skills.securityVerdicts pending for about 50 minutes. Use bounded concurrency and add a regression proving multiple fallbacks are in flight.
  • Resolve security concern: Serial legacy security-verdict fallbacks - Sequential owner-qualified verification requests can make passive verdict retrieval unavailable for many timeout intervals on older registries.
  • Resolve merge risk (P2) - On older/custom registries, serial fallback verification can stall the passive security-verdict request for up to roughly 50 minutes, leaving the Control UI loading rather than delivering a verdict.
  • Resolve merge risk (P1) - The owner-qualified batch response contract from fix(api): resolve batch skill verdicts by publisher clawhub#3409 and the claimed exact-head UI proof were unavailable for independent inspection.
  • Complete next step (P2) - The serial fallback loop has a narrow mechanical repair and focused regression path, while final external-contract review remains human-owned.

Findings

  • [P2] Bound legacy verification fallbacks — src/infra/clawhub-skill-security.ts:314-323
  • [medium] Serial legacy security-verdict fallbacks — src/infra/clawhub-skill-security.ts:314
Agent review details

Security

Needs attention: Publisher validation remains fail-closed, but the new fallback path can create an availability failure in the security-verdict decision flow.

PR surface

Source +188, Tests +453. Total +641 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 8 377 189 +188
Tests 6 487 34 +453
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 864 223 +641

Review metrics

Metric Value Why it matters
Production versus test delta production +377/-189; tests +487/-34 The added shared resolver is justified by a security ownership boundary, but its fallback behavior needs bounded-concurrency proof before merge.

Merge-risk options

Maintainer options:

  1. Bound legacy fallback concurrency (recommended)
    Replace sequential verification fallbacks with a bounded fan-out and prove multiple fallbacks can proceed without weakening identity validation.
  2. Pause pending contract proof
    Do not merge until the owner-qualified registry response and after-fix behavior can be independently inspected.

Technical review

Best possible solution:

Use bounded-concurrency legacy verification fallbacks while preserving target-indexed correlation and fail-closed publisher/version checks, then attach inspectable exact-head registry-response evidence.

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

Yes, from source: make a 100-target owner-qualified batch receive skill_not_found responses from an older registry; the resolver then awaits each 30-second fallback serially.

Is this the best way to solve the issue?

No: the canonical resolver is the right owner boundary, but its legacy fallback needs bounded concurrency before it is a safe implementation.

Full review comments:

  • [P2] Bound legacy verification fallbacks — src/infra/clawhub-skill-security.ts:314-323
    An older registry can return skill_not_found for every owner-qualified batch item. This loop awaits each exact /verify fallback in sequence, so a 100-item batch at the 30-second default timeout can keep skills.securityVerdicts pending for about 50 minutes. Use bounded concurrency and add a regression proving multiple fallbacks are in flight.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7b8bba26c953.

Labels

Label changes:

  • add merge-risk: 🚨 availability: Sequential fallback requests can hold a verdict RPC for many timeout intervals on a compatible older registry.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Repository state identifies a maintainer-authored PR, so the external-contributor proof gate does not apply; the claimed screenshot was not available to inspect and does not establish the external API contract.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: The defect can block passive skill-verdict refreshes on older registries but has a bounded, non-default blast radius.
  • merge-risk: 🚨 security-boundary: The PR changes publisher identity validation used to display installed-skill security verdicts.
  • merge-risk: 🚨 availability: Sequential fallback requests can hold a verdict RPC for many timeout intervals on a compatible older registry.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Repository state identifies a maintainer-authored PR, so the external-contributor proof gate does not apply; the claimed screenshot was not available to inspect and does not establish the external API contract.

Evidence

Security concerns:

  • [medium] Serial legacy security-verdict fallbacks — src/infra/clawhub-skill-security.ts:314
    Sequential owner-qualified verification requests can make passive verdict retrieval unavailable for many timeout intervals on older registries.
    Confidence: 0.94

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/infra/clawhub-skill-security.test.ts src/infra/clawhub.test.ts src/skills/lifecycle/clawhub.test.ts src/gateway/server-methods/skills.clawhub.test.ts ui/src/lib/skills/index.test.ts ui/src/pages/skills/view.test.ts.
  • [P1] git diff --check.

What I checked:

  • Current-main defect: Current target collection groups installed skills by registry, slug, and version, omitting the recorded publisher identity; the PR addresses the correct owner boundary. (src/skills/security/clawhub-verdicts.ts:118, 7b8bba26c953)
  • Concrete branch finding: The exact resolver awaits legacy owner-qualified verification fallbacks in sequence; with a 100-item batch and 30-second request timeout, an older registry can leave the passive verdict RPC waiting about 50 minutes. (src/infra/clawhub-skill-security.ts:314, 31199c7245b1)
  • Shared owner-boundary path: The branch moves install/update trust onto the same exact resolver and validates publisher and version mismatches fail closed before projection. (src/infra/clawhub-install-trust.ts:768, 31199c7245b1)
  • History routing: The existing publisher-omitting collector is attributed to this commit; shallow history makes the original feature trail incomplete. (src/skills/security/clawhub-verdicts.ts:130, 5cd2c5b07bf2)
  • External-contract gap: The claimed ClawHub API change and attached UI artifact could not be inspected because GitHub DNS/API access was unavailable; the local checkout contains no ClawHub source.

Likely related people:

  • steipete: Recent merged and current work spans the ClawHub skills, Gateway, and Control UI identity path. (role: recent area contributor; confidence: high; commits: 171a385, 0790d9f593ad; files: src/infra/clawhub-install-trust.ts, src/skills/security/clawhub-verdicts.ts, ui/src/lib/skills/index.ts)
  • ragesaq: Blame attributes the current publisher-omitting verdict collection to this commit, though the available history is shallow. (role: current-path contributor; confidence: low; commits: 5cd2c5b07bf2; files: src/skills/security/clawhub-verdicts.ts)

Rank-up moves

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

  • Bound the legacy fallback concurrency and add a regression test.
  • Provide inspectable exact-head owner-qualified registry response evidence.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-05T16:05:15.939Z sha 3e2ac90 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the steipete/elastic-perlman-ec17da branch from 3e2ac90 to 31199c7 Compare August 5, 2026 21:21
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 5, 2026
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof is complete for head 590c08465d3c7542e15a55c9ad36e4e389ede83e.

  • ClawHub owner-qualified batch support landed first in fix(api): resolve batch skill verdicts by publisher clawhub#3409 at f9ea25e14f14c05f9544d3878d1626d0dcec4b7a.
  • The ClawSweeper exact-head artifact for run 31049449083 reports patch is correct, security cleared, no review findings, and confirms the prior serial-fallback finding is fixed with p-limit(6) plus concurrency regression coverage. The durable comment did not update, so this artifact is the current exact-head review evidence.
  • The remaining artifact rank-up move asked for inspectable compatibility behavior. A real isolated Gateway/UI fixture exercised the older-registry exact /verify fallback and rendered the complete installed identity @openclaw/[email protected]; the observed 404 produced an unavailable verdict rather than a misattributed verdict. The PR body also links the merged upstream contract and the ClawHub PR's real HTTP proof.
  • Focused tests passed: 6 files / 273 tests, plus the bounded-fallback test file with 4 tests.
  • Local dead-code, core/core-test/UI tsgo, targeted oxlint, formatting, i18n, architecture, storage, cycle, and auth guards passed.
  • Exact-head hosted CI is green: run 31049301566.
  • Final Codex autoreview reported no accepted/actionable findings.

No known proof gaps remain for this bug-fix scope.

@steipete
steipete merged commit ad80956 into main Aug 5, 2026
129 checks passed
@steipete
steipete deleted the steipete/elastic-perlman-ec17da branch August 5, 2026 21:58
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged behavior proof: actual Control UI dialog from an isolated gateway/workspace. It shows the full installed identity @openclaw/[email protected] and the fail-closed owner-qualified /verify result.
openclaw-owner-qualified-verdict

vincentkoc added a commit to VACInc/openclaw that referenced this pull request Aug 5, 2026
…cope

* origin/main:
  perf(agents): isolate concurrency benchmark workers (openclaw#119749)
  fix(diagnostics): preserve OTEL startup failure (openclaw#119747)
  fix(agents): seed fresh session identity before transcript append (openclaw#119473)
  fix: steering reaches active runs across agent harnesses (openclaw#119594)
  fix(cli): report accurate filtered node totals (openclaw#119744)
  fix(skills): keep installed verdicts scoped to publisher (openclaw#119672)
  fix(diagnostics): honor signal-specific OTLP protocols (openclaw#119708)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
…9672)

* fix(skills): preserve owner-qualified security verdicts

* fix(skills): keep verdict helper internal

* fix(skills): bound legacy verdict fallbacks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant