Skip to content

fix: Template security audits open exact-release details - #4549

Merged
roboclaw-bot merged 4 commits into
mainfrom
openclaw/template-security-audit-ui
Nov 13, 2026
Merged

roboclaw-bot merged 4 commits into
mainfrom
openclaw/template-security-audit-ui

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: Template security summaries cannot open their release audit, while the sidebar repeats declared-contents metadata.

User Impact

Users can open a canonical, version-pinned Template audit, inspect the stored findings and final verdict separately, and return to the Template. The redundant Declared contents block is removed; Current version, install readiness, manifest warnings, and dependency inventory remain intact. No rescan/export permissions are added.

Why This Change Was Made

Reuse the shared security summary, audit page, and finding components instead of a third Template-only audit UI. Detail and audit share the scoped/unscoped ownership lookup; the audit route is non-nested so historical deep links do not load or render the latest detail page. Stored MCP, supplemental/dynamic, and legacy findings retain their raw IDs, severity, evidence, and recorded provenance. Missing/pending/error reports never create clean scanner cards or skill-only checklists.

The public report projection records scanner version but not driver/profile identity. The page describes the current AIG MCP + evidence-only judge pipeline without relabeling every historical release as MCP.

Evidence

Review repair: exact-release audits now opt into error propagation in the existing package API helper. Genuine HTTP 404 remains missing, HTTP 429 retains rate-limit metadata, and server/network failures reach the existing retry UI. Legacy callers keep their null fallback. The new tests serve actual local HTTP failures and subsequent recovery through the real helper/loader; one low-level fetch rejection test checks error identity. No UI/copy changes or new media uploads; the existing browser proof is retained. Error/retry verification for this repair is transport integration testing, not a new browser screenshot.

  • Focused package API/Template/plugin regressions after the review repair: 159 passed, including 13 real-helper/API-boundary cases.
  • bun run ci:static: passed (existing dependency advisory warnings).
  • bun run ci:types-build, bun run ci:packages, bunx tsc -p convex/tsconfig.json --noEmit, and git diff --check: passed.
  • bun run ci:unit -- --maxWorkers=8: not green — 9,639 passed, 7 failed, 6 skipped. The seven failures are in untouched socket-path, scanner-source/Go, shell workflow-fixture, and Codex-selector tests; missing Go and host shell/tool selection remain local limitations. No claim that full coverage passed.
  • Independent AutoReview: GPT-6.1 Sol, high, Standard, P0–P3; scoped-clean with no accepted/actionable findings. Review was source-based; runtime validation is separate.
  • Real browser: actual local ClawHub at http://127.0.0.1:3662, baseline c3541607d9049b8524949304aa9b10432e3118c2 at port 3663, task-owned local Convex API/site at 3660/3661. Chromium, desktop 1440×1040 and mobile 390×844, dark theme; summary → exact release → back/reload and historical deep links passed, as did anonymous reads, wrong-owner not-found, one-main rendering, and raw MCP/supplemental finding display. Screenshots and a captioned recording are attached in the proof comment.
  • Fixture: guarded internal devTemplateAuditFixtures:seed, unscoped openclaw-music-manager under ameliomansour; latest 1.2.0 and historical 1.1.0. Scanner reports and judge verdicts are simulated local UI fixtures, not live scanner-quality evidence. No API interception or production backend. The fixture has no stored archive hash, so the audit truthfully shows “Not recorded.” The baseline-only Vite filesystem allowance permits the shared local dependency directory; product UI is unchanged.

No merge or deployment is included.

Requested by and co-authored with @Patrick-Erichsen.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 12, 2026 21:38
Remove redundant declared-contents sidebar metadata and reuse shared audit findings without inventing Template scanner coverage.

Co-authored-by: Patrick-Erichsen <20157849+Patrick-Erichsen@users.noreply.github.com>
Worked on by:
- @Patrick-Erichsen

Co-authored-by: Patrick-Erichsen <20157849+Patrick-Erichsen@users.noreply.github.com>
OpenClaw-Publication: a6da8fe5-77ea-4351-984c-8ddf93d33dac
@roboclaw-bot
roboclaw-bot requested a review from a team as a code owner November 12, 2026 21:39
@vercel

vercel Bot commented Nov 12, 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 13, 2026 4:12am UTC

Request Review

@clawsweeper

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

@roboclaw-bot

roboclaw-bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Real-browser proof — Template audits

Passing candidate: actual local ClawHub + task-owned local Convex, anonymous browser, dark theme. Desktop 1440×1040; mobile 390×844. No API interception or production backend.

Fixture limitation: Music Manager is an explicitly local, simulated fixture. Both the AIG MCP-shaped reports and evidence-judge verdicts are simulated; this proves UI behavior, not live scanner quality. The stored fixture has no archive hash, so “Not recorded” is intentional.

After — successful result

After: removed Declared contents block, retained Current version, linked audit

Before — expected limitation

Baseline has the redundant block and a non-clickable summary.

Before: redundant Declared contents block and static audit summary

Exact historical release and stored evidence

Historical v1.1.0: raw MCP and supplemental rule IDs, severity, evidence, final verdict and release identity

Mobile

Before After
Before mobile After mobile

Walkthrough

The recording opens the latest audit, returns to the Template, follows the historical v1.1.0 deep link, expands evidence, and reloads it. Captions are outside the unmodified product pixels; no speed changes or simulated clicks.

walkthrough.mp4

Validation and source

  • Summary → exact release → Back to Template → reload and historical deep links passed on desktop and mobile. Wrong-owner not-found, anonymous access, one main view, no fabricated absent SkillSpector panel or skill-only clean checklist, raw MCP/supplemental IDs and full source range were asserted. Browser page errors: zero.
  • Candidate source: 6346b12. Baseline: c354160. Ports: candidate 3662, baseline 3663, Convex API/site 3660/3661. The baseline-only Vite filesystem allowance serves shared local dependencies, not altered product UI.
  • Guarded internal fixture: devTemplateAuditFixtures:seed; unscoped openclaw-music-manager owned by ameliomansour, versions 1.2.0 / 1.1.0. Backend precompiled-2026-08-25-7cce8fb; verified CLI 1.44.0; Node 24.11.0. Owned services and private backend state were cleaned up.
  • 95 focused regressions passed. ci:static, ci:types-build, ci:packages and Convex TypeScript passed. Independent P0–P3 AutoReview: scoped-clean.
  • Full ci:unit remains not green: 9,626 passed, 7 failures in untouched host-sensitive socket/scanner-source/shell-workflow/Codex-selector tests, 6 skipped. Missing Go and shell/tool-selection behavior were not repaired by this UI PR.

No merge or manual deployment performed. Raw captures and logs remain local; no proof media or generated reports are committed.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug 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. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR links Template security summaries to release-pinned audit pages using the shared audit UI.

Example: Inspect Music Manager release 1.1.0 while its latest release is 1.2.0.

  • Before: The Template security summary is not clickable and has no dedicated audit route.
  • After: The historical audit URL displays version 1.1.0, its stored findings, and its final verdict.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful browser-proven work with passing hosted checks, held by one source-confirmed error-handling defect.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected screenshots from actual local ClawHub and Convex show the changed sidebar and historical 1.1.0 audit with stored findings and a separate judge verdict. Scanner data is explicitly simulated, which is appropriate for this UI change. The proof revision has the same tree as the reviewed head; the recording and mobile after-image could not be inspected because of reviewer-side retrieval limits.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Template visitors cannot open the stored audit behind the security summary or inspect a historical release's findings.
Reason: The maintainer-authored direction supplies a useful missing drill-down, reuses existing owners, and preserves install gates without adding permissions.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This PR addresses a real gap on main and has useful browser evidence, but one error-handling defect needs repair before merge.

Priority: P2
Reviewed head: 76765fdd81cacfe0c905d756bb42da3911330851

Before merge

  • Preserve release-fetch failures before classifying a release as missing (P2) - When package lookup succeeds but the exact-release request receives HTTP 429, HTTP 500, or a network error, fetchPackageVersion catches the error and returns null (src/lib/packageApi.ts:628–635). This branch then throws notFound(), so users see “Template or requested release not found” instead of the rate-limit message or retry control. The surrounding catch cannot recover the swallowed error, and the tests mock fetchPackageVersion directly. Add a strict error-preserving path in the existing package API owner, retain genuine 404 handling, and cover release-response failures through that real helper.

Findings

  • [P2] Preserve release-fetch failures before classifying a release as missing — src/routes/$owner/templates/$slug_/security-audit.tsx:36-43

Tests

  • Missing end-to-end proof: The supplied browser proof does not exercise a release-endpoint 429 or 500, and route tests replace the helper that swallows those errors.
Agent review details

How this fits together

Template routes resolve package ownership and fetch an exact release from the registry API, then pass its stored scanner reports and judge verdict to shared audit components.

flowchart LR
  A[Template summary] --> B[Version pinned audit route]
  B --> C[Shared package ownership lookup]
  C --> D[Exact release registry API]
  D --> E[Stored reports and verdict]
  E --> F[Shared security audit page]
Loading

Technical review

Best possible solution:

Keep the shared audit implementation and preserve release-fetch errors so only genuinely missing releases render not-found.

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

Main's static summary establishes the original navigation gap, and source tracing establishes that a successful package lookup followed by a release HTTP 429 or 500 renders not-found; no target code was executed.

Is this the best way to solve the issue?

The shared page and shared ownership lookup are the right fix location; a separate Template audit renderer would duplicate existing behavior, but the release fetch must expose errors to the new route.

Full review comments:

  • [P2] Preserve release-fetch failures before classifying a release as missing — src/routes/$owner/templates/$slug_/security-audit.tsx:36-43
    When package lookup succeeds but the exact-release request receives HTTP 429, HTTP 500, or a network error, fetchPackageVersion catches the error and returns null (src/lib/packageApi.ts:628–635). This branch then throws notFound(), so users see “Template or requested release not found” instead of the rate-limit message or retry control. The surrounding catch cannot recover the swallowed error, and the tests mock fetchPackageVersion directly. Add a strict error-preserving path in the existing package API owner, retain genuine 404 handling, and cover release-response failures through that real helper.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Template detail summary and declared contents changes intended behavior with a stated reason (4c99bb8: The Template detail layout supplied version/security metadata; the later release-evidence repair retained a static summary while preventing unsupported clean results.)
  • Shared security summary and audit rendering keeps the original intent (4e4d5c8: Consolidate security information into a shared sidebar summary and full audit experience while keeping incomplete scans visibly incomplete.)
  • Template package ownership resolution keeps the original intent (1c5fc5b: Provide a canonical family-correct detail route with owner validation; the extraction preserves that lookup for both detail and audit routes.)
  • Template scanner presentation keeps the original intent (2737c1b: Audit shipped Template artifacts through AIG MCP and an evidence-only judge while preserving security and installation gates.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • Verify a release HTTP 404 renders not-found, HTTP 429 renders rate limiting, and HTTP 500 or network failure renders the retry UI through the real package-fetch helper.
  • bun run test -- 'src/routes/$owner/templates/$slug_/-security-audit.test.tsx' 'src/routes/$owner/templates/-$slug.test.tsx'
  • bun run ci:static
  • bun run ci:unit
  • bun run ci:types-build

What I checked:

Likely related people:

  • Patrick Erichsen: Raw commit 6fe2dc0 adds src/components/TemplateDetailPage.tsx:25 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6fe2dc0c9503; files: src/components/TemplateDetailPage.tsx)

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
Change size +836/-98 across 17 files Includes +266/-7 test lines and a 196-line reusable local fixture supporting the new audit route.

Labels

Label changes:

  • add P2: Template audit navigation is a useful, bounded improvement; transient registry failures currently produce misleading not-found pages.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Template audit navigation is a useful, bounded improvement; transient registry failures currently produce misleading not-found pages.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 12, 2026, 4:53 PM ET / 21:53 UTC.

roboclaw-bot and others added 2 commits November 13, 2026 04:10
Opt exact-release audits into error propagation while preserving genuine 404 and legacy best-effort reads. Exercise the real API helper over local HTTP failure and recovery fixtures.

Co-authored-by: Patrick-Erichsen <20157849+Patrick-Erichsen@users.noreply.github.com>
Worked on by:
- @Patrick-Erichsen

Co-authored-by: Patrick-Erichsen <20157849+Patrick-Erichsen@users.noreply.github.com>
OpenClaw-Publication: 4bf89b22-1043-4f06-b4e5-a035c9877d6f
@roboclaw-bot
roboclaw-bot merged commit 8c0b93d into main Nov 13, 2026
40 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/template-security-audit-ui branch November 13, 2026 04:18

This branch was successfully deployed

1 active deployment
Preview – clawhub — 36bab658 Deployed Nov 13, 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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant