Claw_Guard collects security events inside OpenClaw. Claw_Guard_Server can evaluate those events synchronously and can also receive them asynchronously for audit or offline analysis.
- Protocol: HTTP/1.1 + JSON
- Encoding: UTF-8
- Content-Type:
application/json - Default endpoint:
https://api.clawguard.cc - Auth: optional
Authorization: Bearer <apiKey> - Default timeout:
2000ms - Versioning: URL prefix
/v1
Compatibility rules:
- the server should ignore unknown fields
- existing fields should only be extended, not renamed in place
Claw_Guardmay keep richer internal mode semantics and translate them into the current wiremodevalues for server compatibility
Product language:
blockwarningpass
Wire format:
blockwarnallow
Mapping:
block-> high-risk action, block inenforcewarn-> continue but audit and warnallow-> continue normally
Plugin compatibility note:
- internal plugin modes are
enforce,standard, andignore - wire
modestays compatible with the current server contract - plugin mapping:
- internal
enforce-> wireenforce - internal
standard-> wireenforce - internal
ignore-> wireaudit
- internal
{
"ts": "2026-03-14T05:30:00.000Z",
"pluginId": "claw-guard",
"mode": "enforce",
"event": {
"kind": "command",
"source": "before_tool_call",
"instruction": "openclaw plugins install ./evil-plugin",
"labels": ["install_operation", "plugin_install", "command_execution"],
"toolName": "exec"
}
}Fields:
ts: ISO 8601 timestamppluginId: fixed asclaw-guardmode:enforceorauditevent.kind:command,file,url,tool_call, ormessageevent.source:before_tool_call,after_tool_call, ormessage_receivedevent.instruction: normalized text for policy evaluationevent.labels: plugin-side classification labelsevent.*Idsandevent.metadata: optional context only
{
"decision": "warn",
"risk": "medium",
"reasons": ["flagged:plugin_install"],
"policyTags": ["plugin_install"]
}Fields:
decision:allow,warn, orblockrisk:low,medium, orhighreasons: matched reasonspolicyTags: matched rule tags
Default no-hit response:
{
"decision": "allow",
"risk": "low",
"reasons": ["allow:default"],
"policyTags": []
}Purpose: upload a skill archive or installed skill directory hash for fast reputation lookup.
{
"ts": "2026-03-16T05:30:00.000Z",
"pluginId": "claw-guard",
"source": "before_tool_call",
"action": "skill_install",
"hashAlgorithm": "sha256",
"hash": "4d9f4c7c...",
"artifactType": "file",
"artifactPath": "/workspace/demo-skill.zip",
"artifactName": "demo-skill.zip",
"instruction": "openclaw skills install ./demo-skill.zip",
"labels": ["install_operation", "skill_install", "skill_hash_lookup"]
}Fields:
source:before_tool_call,after_tool_call, ormessage_receivedaction:skill_installorskill_downloadhashAlgorithm: currentlysha256hash: normalized artifact hashartifactType:fileordirectoryartifactPathandartifactName: optional operator contextinstruction: original install/download commandlabels: plugin-side classification labels
{
"decision": "block",
"risk": "high",
"reasons": ["blocked:skill_hash_match"],
"policyTags": ["skill_hash_match"],
"matched": true
}Default no-hit response:
{
"decision": "allow",
"risk": "low",
"reasons": ["allow:unknown_skill_hash"],
"policyTags": [],
"matched": false
}Purpose: upload the local skill safety verdict using the original skill-report hash API contract.
{
"uuid": "9d7f5fe4-5f11-40d8-8f50-29b4fbbcf67a",
"hash": "sha256:4d9f4c7c...",
"reportedStatus": "unsafe"
}Fields:
uuid: per-upload id generated by the pluginhash: canonical skill hash sent to the serverreportedStatus:safeorunsafe
{
"exist": false,
"hash": "sha256:4d9f4c7c...",
"reportId": 12,
"createdAt": "2026-03-18T08:00:01.000Z"
}Health check for operators and dashboard integrations.
Example response:
{
"ok": true,
"date": "2026-03-14T05:30:00.000Z",
"policy": {
"configPath": "/abs/path/config/policy.json",
"loadedAt": "2026-03-14T05:20:00.000Z",
"usingDefaultConfig": false
}
}Purpose: synchronous policy decision.
Request body: SecurityPolicyRequest
Success:
200 OKwithSecurityPolicyResponse
Failure body:
{
"error": "internal_error",
"detail": "Error: ..."
}Expected status codes:
200: decision returned401: auth failed404: route not found500: internal failure
Plugin-side handling:
block: block in pluginstandardandenforcewarn: warn in pluginstandard; block in pluginenforce; ignore in pluginignore- request failure:
- block if
mode=enforceandintel.failClosed=true - otherwise fallback to the local rule engine only
- block if
Purpose: asynchronous event upload.
Request body: SecurityPolicyRequest
Success:
202 Accepted
Example response:
{
"ok": true
}Purpose: synchronous skill artifact hash lookup.
Request body: SkillHashCheckRequest
Success:
200 OKwithSkillHashCheckResponse
Expected status codes:
200: hash verdict returned401: auth failed404: route not found500: internal failure
Plugin-side handling:
block: local path installs can be blocked before execution in pluginstandardandenforcewarn: continue but warn in pluginstandard; block in pluginenforce; ignore in pluginignore- post-download checks discovered only after the install completes should warn and audit immediately
Purpose: upload the agent-authored local skill review verdict using the original uuid/hash/reportedStatus JSON contract.
Request body: SkillReportUploadHashRequest
Success:
200 OKwithSkillReportUploadHashResponse
Plugin-side handling:
before_prompt_buildinjects a mandatory review contract and the localskill-reports/directory path- the agent must compute the skill hash first and then write one JSON record file per skill, named by the hash hex
after_tool_calluploads as soon as askill-reports/*.jsonfile is written successfully- if
upload-hashreturnsexist=false, the plugin immediately follows withPOST /v1/skill-report/upload-fileusing the original archive or a temporary zip created from the skill directory