← 返回 Skills 市场
AgentMesh Governance
作者
imran-siddique
· GitHub ↗
· v1.0.0
805
总下载
0
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install agentmesh-governance
功能描述
AI agent governance, trust scoring, and policy enforcement powered by AgentMesh. Activate when: (1) user wants to enforce token limits, tool restrictions, or...
使用说明 (SKILL.md)
\r \r
AgentMesh Governance — Trust & Policy for OpenClaw Agents\r
\r Zero-trust governance layer for OpenClaw agents. Enforce policies, verify identities,\r score trust, and maintain tamper-evident audit logs — all from your agent's command line.\r \r
Setup\r
\r Install the AgentMesh governance CLI:\r \r
pip install agentmesh-governance\r
```\r
\r
> If `agentmesh-governance` is not yet on PyPI, install directly from source:\r
> ```bash\r
> pip install "agentmesh @ git+https://github.com/imran-siddique/agent-mesh.git"\r
> ```\r
\r
## Scripts\r
\r
All scripts are in `scripts/`. They wrap the governance engine and output JSON results.\r
\r
### Check Policy Compliance\r
\r
Evaluate an action against a governance policy before execution:\r
\r
```bash\r
scripts/check-policy.sh --action "web_search" --tokens 1500 --policy policy.yaml\r
```\r
\r
Returns JSON with `allowed: true/false`, any violations, and recommendations.\r
Use this **before** executing any tool call to enforce limits.\r
\r
### Get Trust Score\r
\r
Check an agent's current trust score (0.0 – 1.0):\r
\r
```bash\r
scripts/trust-score.sh --agent "research-agent"\r
```\r
\r
Returns the composite trust score with breakdown across 5 dimensions:\r
policy compliance, resource efficiency, output quality, security posture,\r
collaboration health.\r
\r
### Verify Agent Identity\r
\r
Verify an agent's Ed25519 cryptographic identity before trusting its output:\r
\r
```bash\r
scripts/verify-identity.sh --did "did:agentmesh:abc123" --message "hello" --signature "base64sig"\r
```\r
\r
Returns `verified: true/false`. Use when receiving data from another agent.\r
\r
### Record Interaction\r
\r
Update trust scores after collaborating with another agent:\r
\r
```bash\r
scripts/record-interaction.sh --agent "writer-agent" --outcome success\r
scripts/record-interaction.sh --agent "writer-agent" --outcome failure --severity 0.1\r
```\r
\r
Success adds +0.01 to trust score. Failure subtracts the severity value.\r
Agents dropping below the minimum threshold (default 0.5) are auto-blocked.\r
\r
### Audit Log\r
\r
View tamper-evident audit trail with Merkle chain verification:\r
\r
```bash\r
scripts/audit-log.sh --last 20\r
scripts/audit-log.sh --agent "research-agent" --verify\r
```\r
\r
The `--verify` flag checks Merkle chain integrity — any tampering is detected.\r
\r
### Generate Identity\r
\r
Create a new Ed25519 cryptographic identity (DID) for your agent:\r
\r
```bash\r
scripts/generate-identity.sh --name "my-agent" --capabilities "search,summarize,write"\r
```\r
\r
Returns your agent's DID, public key, and capability manifest.\r
\r
## Policy File Format\r
\r
Create a `policy.yaml` to define governance rules:\r
\r
```yaml\r
name: production-policy\r
max_tokens: 4096\r
max_tool_calls: 10\r
allowed_tools:\r
- web_search\r
- file_read\r
- summarize\r
blocked_tools:\r
- shell_exec\r
- file_delete\r
blocked_patterns:\r
- "rm -rf"\r
- "DROP TABLE"\r
- "BEGIN CERTIFICATE"\r
confidence_threshold: 0.7\r
require_human_approval: false\r
```\r
\r
## When to Use This Skill\r
\r
- **Before tool execution**: Run `check-policy.sh` to enforce limits\r
- **Before trusting another agent's output**: Run `verify-identity.sh`\r
- **After collaboration**: Run `record-interaction.sh` to update trust\r
- **Before delegation**: Check `trust-score.sh` — don't delegate to agents below 0.5\r
- **For compliance**: Run `audit-log.sh --verify` to prove execution integrity\r
- **On setup**: Run `generate-identity.sh` to create your agent's DID\r
\r
## What It Enforces\r
\r
| Policy | Description |\r
|--------|-------------|\r
| Token limits | Cap per-action and per-session token usage |\r
| Tool allowlists | Only explicitly permitted tools can execute |\r
| Tool blocklists | Dangerous tools are blocked regardless |\r
| Content patterns | Block regex patterns (secrets, destructive commands, PII) |\r
| Trust thresholds | Minimum trust score required for delegation |\r
| Human approval | Gate critical actions behind human confirmation |\r
\r
## Architecture\r
\r
This skill bridges the OpenClaw agent runtime with the [AgentMesh](https://github.com/imran-siddique/agent-mesh)\r
governance engine:\r
\r
```\r
OpenClaw Agent → SKILL.md scripts → AgentMesh Engine\r
├── GovernancePolicy (enforcement)\r
├── TrustEngine (5-dimension scoring)\r
├── AgentIdentity (Ed25519 DIDs)\r
└── MerkleAuditChain (tamper-evident logs)\r
```\r
\r
Part of the [Agent Ecosystem](https://imran-siddique.github.io):\r
[AgentMesh](https://github.com/imran-siddique/agent-mesh) ·\r
[Agent OS](https://github.com/imran-siddique/agent-os) ·\r
[Agent SRE](https://github.com/imran-siddique/agent-sre)\r
安全使用建议
This skill appears to implement the claimed governance functions and the included scripts match the description. Before installing or running it: (1) review the upstream 'agentmesh' package source if you plan to pip install it — installing packages runs remote code; (2) avoid passing untrusted or unsanitized input to the scripts because they interpolate shell args directly into python -c string literals (quotes or special characters could break the Python code or be exploited); (3) note that generate-identity.sh does not emit or save a private key despite its warning — verify key handling if you need persistent key material; (4) run the scripts in a sandboxed environment or container the first time, and audit the referenced GitHub repo and package code if you intend to rely on persistent trust/identity functionality.
功能分析
Type: OpenClaw Skill
Name: agentmesh-governance
Version: 1.0.0
The skill is classified as suspicious due to a critical Python code injection vulnerability present in all shell scripts (`scripts/*.sh`). User-controlled arguments (e.g., `--agent`, `--action`, `--policy`) are directly interpolated into the `python3 -c "..."` command strings without proper sanitization. This allows an attacker, or a malicious prompt to the AI agent, to inject arbitrary Python code and achieve Remote Code Execution (RCE). While the stated purpose of the skill is governance and security, this severe vulnerability allows for malicious exploitation, fitting the definition of a flaw that *allows* attacks rather than intentional malware.
能力评估
Purpose & Capability
Name, description, and shipped scripts align with governance, trust scoring, identity verification, and audit logging. Requiring python3/pip is reasonable for the provided Python-based scripts. No unrelated env vars, binaries, or config paths are requested.
Instruction Scope
Runtime instructions are scoped to running the included scripts and (optionally) a backing 'agentmesh' Python package. However, the scripts embed user-supplied shell variables directly into python -c string literals (e.g., '$ACTION', '$DID', '$MESSAGE'), which can break or allow code injection if arguments contain unescaped quotes or malicious payloads. Also, generate-identity.sh warns to 'Store your private key securely' but the script does not expose or export the private key — this is confusing and could lead users to believe a private key was produced and saved when it was not.
Install Mechanism
No install spec is included (instruction-only), which is low risk. SKILL.md suggests 'pip install agentmesh' or installing from a GitHub repo via pip (git+https://github.com/imran-siddique/agent-mesh.git). Installing an external Python package from PyPI or a git repo will execute third-party code on the host — a normal pattern but a supply-chain risk that users should audit first. The GitHub URL itself is a common host, not an obscure or shortened URL.
Credentials
The skill requests no credentials or special config paths. The operations performed (reading a local policy.yaml, returning JSON results) are proportionate to the governance use-case. There are no hidden environment variable accesses in the scripts.
Persistence & Privilege
The skill does not request permanent/always presence and does not modify other skills or global agent config. It runs as on-demand scripts and optionally delegates to an external Python package for persistent functionality; this is consistent with the described behavior.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install agentmesh-governance - 安装完成后,直接呼叫该 Skill 的名称或使用
/agentmesh-governance触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of agentmesh-governance for OpenClaw agents.
- Provides command-line scripts to enforce policies, check trust scores, verify identities (Ed25519 DIDs), and maintain tamper-evident Merkle chain audit logs.
- Supports policy enforcement for token limits, tool allow/blocklists, content patterns, trust thresholds, and optional human approval.
- Enables agent trust scoring across five dimensions and automated blocking of low-trust agents.
- CLI tools for generating agent identities, updating trust after collaboration, and verifying audit log integrity.
- Designed for seamless integration with AgentMesh, supporting enterprise compliance and governance needs.
元数据
常见问题
AgentMesh Governance 是什么?
AI agent governance, trust scoring, and policy enforcement powered by AgentMesh. Activate when: (1) user wants to enforce token limits, tool restrictions, or... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 805 次。
如何安装 AgentMesh Governance?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install agentmesh-governance」即可一键安装,无需额外配置。
AgentMesh Governance 是免费的吗?
是的,AgentMesh Governance 完全免费(开源免费),可自由下载、安装和使用。
AgentMesh Governance 支持哪些平台?
AgentMesh Governance 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 AgentMesh Governance?
由 imran-siddique(@imran-siddique)开发并维护,当前版本 v1.0.0。
推荐 Skills