Skip to content

feat: audit shipped Templates with AIG MCP - #155

Merged
roboclaw-bot merged 4 commits into
mainfrom
openclaw/template-aig-mcp-audit
Nov 10, 2026
Merged

roboclaw-bot merged 4 commits into
mainfrom
openclaw/template-aig-mcp-audit

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Contributor

Summary

  • What changed: Add the separate clawhub-template profile, canonical package.json.openclaw.template detection (including nested CLAW.md), and a Template-aware AIG MCP audit of the complete shipped package. Retain bundled/vendored, compiled and hidden content without resolving external dependencies or fetching their ClawHub audits.
  • Why: Templates compose agent instructions, bootstrap, profiles, automations, workspace files, skills and plugins; auditing only one component misses shipped behavior. Existing skill/plugin profiles and publication verdict policy remain unchanged.

Scope

  • CLI behavior
  • Scanner adapter
  • Judge/profile/benchmark behavior
  • ClawHub profile proposal at proposals/<GHSA-ID>/clawscan.yml
  • Docs only
  • Release/CI/repo automation

Security / Trust Impact

  • No security/trust impact
  • Security/trust impact explained

AIG MCP is the sole whole-artifact scanner. Its SARIF remains raw evidence, not a severity-to-malicious publication policy. The profile reuses the exact existing evidence-only judge/overview commands and schemas; the judge receives no artifact and performs no second whole-artifact review. Existing staging bounds, unsafe-entry checks, isolated execution, credential scoping and incomplete/provider/iteration failure protections remain in place.

Templates retain every shipped file, including node_modules; existing plugin staging exclusions are unchanged. External source/download/execution instructions are inspected as untrusted evidence, never executed or fetched. Production dispatch uses the qualified host Go binary and unchanged immutable scanner-tools runtime; no image rebuild, release tag or npm publication is required by this change. The source/runtime consumer contract is documented in docs/template-audit.md.

A test-only follow-up drains captured CLI stdout concurrently to avoid an observed pre-existing benchmark-test deadlock when JSON exceeded the pipe buffer; a large-write regression covers it.

Verification

  • go test -count=1 ./... (also bounded with -timeout=90s)
  • go vet ./...
  • go run ./cmd/clawscan --help
  • Focused scanner/benchmark/manual proof: benign mixed Template; shipped malicious bootstrap, automation and download-instruction fixtures; external ClawHub reference without recursive scanning; byte-exact staging; compatibility/failure and evidence-only judge wiring tests.
  • For ClawHub profile proposals: I opened the sensitive report through GitHub private vulnerability reporting, and this PR contains only proposals/<GHSA-ID>/clawscan.yml
  • For ClawHub profile proposals: I did not edit official bundled profile files under internal/profiles/
  • Docs site proof (make docs-site) or N/A: nine pages built, including the Template contract.

Full committed-branch autoreview at dc76ccb2c9c972a837f807406d3dc583beb56839: GPT-6.1 Sol, high reasoning, Standard service, P0–P3, scoped-clean with no actionable findings. Review JSON SHA-256: 21389538a63fcb7e4ffad4cef65f88c83c35a158ccb5d1cee83bf1879f49f3f8.

Actual local OCI proof used rootless Podman/crun and the approved image ghcr.io/openclaw/clawscan-runtime@sha256:d494938b84a9f0da40504f611eec472d4637c755b5cef87b123daf8a2014545c: all 28 patched AIG runtime tests passed. The final-head binary plus real patched AIG scanner read all 12 distinct shipped fixture files through 14 scripted loopback-provider requests, with zero unexpected connections and unchanged original bytes. The harness ran network-disabled, read-only with bounded temporary storage; --sandbox off was used only inside that isolated container. This is runtime mechanics evidence, not a production Docker qualification or model detection-quality claim.

Notes

Not a GHSA profile proposal; the two proposal-specific checks above are N/A. No real-provider credentials, live-model quality evaluation, production deployment, image publication, release tag or npm publication was used/performed. ClawHub integration/rollout is separate from this upstream PR and must bind its installed host binary to the merged reviewed source.

Requested by and co-authored with @Patrick-Erichsen. Implemented and verified by RoboClaw.

Work sessions

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

Worked on by

roboclaw-bot and others added 4 commits November 10, 2026 04:33
Add a separate clawhub-template profile with canonical package selector dispatch, complete shipped-artifact staging, and a Template-aware static audit prompt. Reuse evidence-only publication adjudication without changing severity policy or existing skill/plugin profiles.

Co-authored-by: Patrick-Erichsen <20157849+Patrick-Erichsen@users.noreply.github.com>
Document that ClawHub runs the qualified host Go binary and dispatches scanner and judge commands into the immutable tools image. The Template profile does not require rebuilding the unchanged scanner runtime tree.

Co-authored-by: Patrick-Erichsen <20157849+Patrick-Erichsen@users.noreply.github.com>
Avoid deadlocking benchmark JSON assertions when output exceeds the pipe buffer. Add a large-write regression without changing product behavior.

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: 67d19fbf-3a4b-4ba0-975c-f156ce1b3827
@clawsweeper

clawsweeper Bot commented Nov 10, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

@roboclaw-bot
roboclaw-bot merged commit 56bf1d9 into main Nov 10, 2026
9 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/template-aig-mcp-audit branch November 10, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant