mirror of
https://github.com/rookiestar28/ComfyUI-OpenClaw.git
synced 2026-08-14 08:52:45 +00:00
3.5 KiB
3.5 KiB
Threat Model & Trust Boundaries
This document outlines the security assumptions and trust boundaries for ComfyUI-OpenClaw. Operators should use this to understand the risks of deployment.
Trust Boundaries
1. The "Admin" Boundary
- Who: The person running ComfyUI (you).
- Access: Full filesystem access, process execution, and secret management.
- Mechanism: OS-level permissions +
OPENCLAW_CONNECTOR_ADMIN_TOKEN(if remote). - Risk: If compromised, attacker owns the machine.
2. The "Observability" Boundary
- Who: Monitoring tools or trusted dashboards.
- Access: Read-only logs (
/openclaw/logs/tail), config (/openclaw/config), health. - Mechanism:
OPENCLAW_OBSERVABILITY_TOKEN. - Redaction: Logs/Config are redacted by default to prevent secret leakage.
- Reasoning/internal-content posture: provider reasoning / thinking traces and explicitly marked internal maintenance/helper prompt content are stripped by default from operator-visible assist responses, event streams, trace responses, callback payloads, connector trace replies, and audit event payload/meta fields. Privileged reasoning reveal is local-debug only, admin-gated, auditable, and fail-closed outside permissive local posture; internal maintenance/helper prompt content has no public or debug reveal path.
3. The "Connector" Boundary (ChatOps)
- Who: Chat users (Telegram/Discord/LINE).
- Access:
- User:
submit_job(via Allowlisted templates),query_status. - Admin (Chat):
approve_request,cancel_job,trace.
- User:
- Mechanism: Chat platform auth + OpenClaw User Allowlist (or
require_approvalpolicy). - Risk: Spam/DoS (mitigated by Budgets + Rate Limits), or Prompt Injection (mitigated by Template Constraints).
Attack Surfaces
Inbound (Server)
- HTTP API:
/openclaw/*,/moltbot/*.- Mitigation: Loopback-only by default. Token auth for remote admin/observability.
- Shared listener surface (OpenClaw + ComfyUI):
- Risk: protecting
/openclaw/*alone may still leave ComfyUI-native routes reachable when public proxy policy is broad. - Mitigation: enforce reverse-proxy path allowlist + network ACL; in public profile set
OPENCLAW_PUBLIC_SHARED_SURFACE_BOUNDARY_ACK=1only after those controls are verified.
- Risk: protecting
- Webhooks:
/openclaw/webhook/*.- Mitigation: Signature verification (HMAC) + Replay protection + Auth Token.
Outbound (Client)
- LLM Requests:
POSTtobase_url.- Risk: SSRF (Server-Side Request Forgery) to internal network.
- Mitigation: Known-host allowlist by default. Custom URLs need explicit opt-in + DNS validation.
- Callback Delivery:
POSTresults to webhook targets.- Risk: SSRF / Information Leakage.
- Mitigation: DNS-safe validation (no private IPs) + operator-payload redaction, including reasoning/internal-content stripping by default.
- Image Fetching:
image_urlinputs.- Mitigation: SafeIO module (size limits, no file://).
Assumptions
- Transport Security: We assume HTTPS (TLS) is provided by a reverse proxy or tunnel (Tailscale/Cloudflare). OpenClaw serves HTTP.
- Local Host Security: We assume the host machine is not already compromised.
- Secret Integrity: Secrets in
os.environor.envare secure from non-admin users.
"Red Lines" (Do Not Cross)
- Never expose the raw ComfyUI port (8188) to the public internet.
- Never run OpenClaw as
root/ Administrator. - Never disable
OPENCLAW_CONNECTOR_ADMIN_TOKENon a publicly accessible instance.