openclaw - ✅(Solved) Fix Architecture audit: concrete agchk scan leads for OpenClaw [1 pull requests, 1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#71947Fetched 2026-04-27 05:36:59
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
commented ×1cross-referenced ×1renamed ×1

I ran a community architecture health check against openclaw/openclaw using agchk from huangrichao2020/agchk@8c3a97f after the fast file-walker optimization landed on main.

Important framing: this is an architecture and maintainability audit, not a security vulnerability report. The 100/100 score below is agchk's maturity signal for visible agent-runtime primitives, not a claim that the repo has no issues. The useful part is the concrete audit leads and false-positive calibration notes.

Root Cause

agchk also classified OpenClaw as 人工智能时代 (100/100), mainly because it detects mature agent-runtime primitives: tool/syscall boundaries, memory lifecycle governance, multilingual retrieval, RAG governance, daemon lifecycle safety, plugin sandbox policy, remote tool boundaries, traces/evals, stateful recovery, and LLM CLI worker patterns.

Fix Action

Fix / Workaround

3. Slash-command dispatch is split across local queueing and gateway RPC

ui/src/ui/app-chat.ts has a client-side command queue/dispatch path:

  • queued local command dispatch: ui/src/ui/app-chat.ts:278-307
  • direct command dispatch: ui/src/ui/app-chat.ts:360-379
  • command switch and gateway execution handoff: ui/src/ui/app-chat.ts:410-450

PR fix notes

PR #71949: docs: add agchk community audit link

Description (problem / solution / changelog)

Summary

  • Problem: README has a Community section, but no small place to point users at external agent-architecture audit tooling.
  • Why it matters: agchk now has a reproducible OpenClaw scan in #71947, so the README link is tied to concrete audit output instead of a generic external-resource listing.
  • What changed: Added a tiny Community ecosystem subsection linking to agchk and the OpenClaw scan result.
  • What did NOT change (scope boundary): No runtime code, docs site navigation, ClawHub behavior, security model, or official endorsement language changed.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #N/A
  • Related #71947
  • This PR fixes a bug or regression

Root Cause (if applicable)

N/A

Regression Test Plan (if applicable)

N/A

User-visible / Behavior Changes

README now mentions agchk as optional community architecture audit tooling and links to #71947 for an example OpenClaw scan.

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local checkout
  • Model/provider: N/A
  • Integration/channel (if any): N/A
  • Relevant config (redacted): N/A

Steps

  1. Read the root README Community section.
  2. Confirm the new agchk entry links to the reproducible audit issue.
  3. Run docs-only changed checks.

Expected

  • README includes a concise community ecosystem link.
  • The link points at agchk and #71947.
  • Docs-only changed checks pass.

Actual

  • README includes the new community ecosystem link.
  • #71947 contains an agchk scan using huangrichao2020/agchk@8c3a97f against openclaw/openclaw@42f87c07.
  • #71947 now frames the score as an agchk maturity signal rather than a claim that the repo has no issues. It includes manually triaged leads around a tracked root-level repair script, browser evaluate trust boundaries, slash-command dispatch policy, and test-fixture secret false positives.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)
  • Docs check: pnpm check:changed

Human Verification (required)

  • Verified scenarios: pnpm check:changed passed and selected the docs-only lane.
  • Edge cases checked: Confirmed this PR touches only README.md.
  • What you did not verify: Full pnpm check / pnpm test, because this is a README-only docs change.

AI-assisted: yes. I understand this PR only adds a README community link and does not change OpenClaw behavior.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: Maintainers may prefer not to list external tooling in the root README.
    • Mitigation: The wording says optional community tooling and links to a concrete OpenClaw audit issue for context.

Changed files

  • README.md (modified, +4/-0)

Code Example

git clone --depth 1 https://github.com/openclaw/openclaw.git /tmp/openclaw-agchk-audit
git clone https://github.com/huangrichao2020/agchk.git /tmp/agchk-main
cd /tmp/agchk-main
uv run agchk /tmp/openclaw-agchk-audit \
  --profile personal \
  -o /tmp/agchk-openclaw-output/audit_results.json \
  -r /tmp/agchk-openclaw-output/audit_report.md
RAW_BUFFERClick to expand / collapse

Summary

I ran a community architecture health check against openclaw/openclaw using agchk from huangrichao2020/agchk@8c3a97f after the fast file-walker optimization landed on main.

Important framing: this is an architecture and maintainability audit, not a security vulnerability report. The 100/100 score below is agchk's maturity signal for visible agent-runtime primitives, not a claim that the repo has no issues. The useful part is the concrete audit leads and false-positive calibration notes.

Reproduction

git clone --depth 1 https://github.com/openclaw/openclaw.git /tmp/openclaw-agchk-audit
git clone https://github.com/huangrichao2020/agchk.git /tmp/agchk-main
cd /tmp/agchk-main
uv run agchk /tmp/openclaw-agchk-audit \
  --profile personal \
  -o /tmp/agchk-openclaw-output/audit_results.json \
  -r /tmp/agchk-openclaw-output/audit_report.md

Scan metadata:

  • agchk source: huangrichao2020/agchk@8c3a97f
  • OpenClaw source scanned: openclaw/openclaw@42f87c07
  • Profile: personal_development
  • Scanner count: 27
  • Reported scan duration: 386.72s
  • Wall time on my local Mac: 491.17s

Raw severity summary:

SeverityCount
critical15
high8
medium54
low261

agchk also classified OpenClaw as 人工智能时代 (100/100), mainly because it detects mature agent-runtime primitives: tool/syscall boundaries, memory lifecycle governance, multilingual retrieval, RAG governance, daemon lifecycle safety, plugin sandbox policy, remote tool boundaries, traces/evals, stateful recovery, and LLM CLI worker patterns.

Manually triaged audit leads

These are the parts that looked concrete enough to be useful after spot-checking the scan output.

1. Tracked root-level one-off repair script

fix2.py is tracked at the repo root and directly rewrites src/infra/heartbeat-runner.ts with a string replacement:

  • fix2.py:60-82
  • fix2.py:84

That looks like a temporary migration/repair script that may have accidentally stayed in the root source tree. If it is still needed, it may belong under a documented scripts/migrations path with an idempotency check. If not, it looks removable.

2. Browser evaluate path uses dynamic function reconstruction

The browser interaction path reconstructs functions with new Function(...) and then evaluates fnBody in the browser context:

  • extensions/browser/src/browser/pw-tools-core.interactions.ts:856-864
  • extensions/browser/src/browser/pw-tools-core.interactions.ts:896-904

This may be intentional for a browser automation tool, and I am not claiming it is a vulnerability. The audit question is narrower: is the trust boundary for fnBody documented and tested, especially for remote/browser-control use cases? If this input can come from an untrusted or remotely-triggered source, the path deserves an explicit policy/test around allowed callers and target origin constraints.

3. Slash-command dispatch is split across local queueing and gateway RPC

ui/src/ui/app-chat.ts has a client-side command queue/dispatch path:

  • queued local command dispatch: ui/src/ui/app-chat.ts:278-307
  • direct command dispatch: ui/src/ui/app-chat.ts:360-379
  • command switch and gateway execution handoff: ui/src/ui/app-chat.ts:410-450

This may already be protected by server-side method scopes. The useful review question is whether the client-visible command catalog, queueing behavior, and gateway method-scope enforcement are covered by one canonical policy contract, particularly for commands such as /kill, /redirect, /model, and /compact.

4. Secret findings mostly look like test fixtures

The critical bucket is dominated by fake tokens in tests, for example:

  • src/infra/push-apns.store.test.ts:28
  • src/config/redact-snapshot.test.ts:563-564
  • src/agents/openclaw-tools.sessions.test.ts:687

That does not look like a production credential leak. It is still useful as an audit-tool calibration point: either agchk should down-rank obvious *.test.ts fixtures by default, or OpenClaw can add explicit fixture/allowlist markers where it wants scanners to understand the intent.

Why I am opening this

I am also opening a tiny docs PR to list agchk as an optional community architecture audit tool in the README ecosystem/community area. Linking it to this issue gives maintainers a concrete OpenClaw scan result and a few manually triaged leads instead of a generic external-tool listing.

If this is not the right place for community audit results, feel free to close it. The main intent is to make the result reproducible, useful, and honest about both findings and false positives.

extent analysis

TL;DR

Review and address the manually triaged audit leads to improve OpenClaw's architecture and maintainability.

Guidance

  • Review the fix2.py script and determine if it's still needed; if not, remove it or move it to a documented scripts/migrations path.
  • Verify that the trust boundary for fnBody in extensions/browser/src/browser/pw-tools-core.interactions.ts is documented and tested, especially for remote/browser-control use cases.
  • Examine the client-visible command catalog, queueing behavior, and gateway method-scope enforcement in ui/src/ui/app-chat.ts to ensure they are covered by a canonical policy contract.
  • Calibrate agchk to down-rank obvious test fixtures or add explicit fixture/allowlist markers to reduce false positives.

Example

No code snippet is provided as the issue is focused on audit leads and process improvements rather than specific code changes.

Notes

The provided issue is an architecture and maintainability audit, not a security vulnerability report. The agchk tool's findings should be reviewed and addressed to improve OpenClaw's overall quality and security posture.

Recommendation

Apply workaround: Review and address the manually triaged audit leads to improve OpenClaw's architecture and maintainability, as these leads provide concrete areas for improvement and calibration of the agchk tool.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix Architecture audit: concrete agchk scan leads for OpenClaw [1 pull requests, 1 comments, 1 participants]