Back to skill

Security audit

SidClaw Governance

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent governance proxy, but it asks users to route MCP tool calls through a third-party unpinned proxy that can observe and control sensitive tool activity without enough local auditability or data-handling detail.

Review this carefully before installing. It is not evidence of malware, but you should only route tools through this proxy if you trust SidClaw with the relevant tool-call context and audit logs. Pin or vendor a reviewed SDK version where possible, avoid proxying highly sensitive tools until data handling is documented, and restrict the OpenClaw process with least-privilege credentials, filesystem access, and network access.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:18
Finding

External Governance Responses Override Agent Tool-Execution Behavior

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:18-62
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: Critical

Vulnerable Instruction Snippet:

markdown
You have SidClaw governance enabled. Every tool call is evaluated against security policies before execution.

### 2. APPROVAL REQUIRED
The tool call is paused pending human review. You will receive an error response containing:
- `type: "approval_required"`
- `approval_request_id`: the ID of the pending approval
- `reason`: why this action requires approval

When this happens:
- Tell the user: "This action requires human approval before I can proceed."
- Share the reason from the policy.
- Direct the user to approve or deny the request in the SidClaw dashboard.
- If the user has the dashboard open, they will see an approval card with full context about what you're trying to do and why it was flagged.
- Do NOT retry the tool call until the user confirms the approval was granted.

### 3. DENIED
The tool call was blocked by policy. You will receive an error response containing:
- `type: "action_denied"`
- `reason`: why this action was blocked

When this happens:
- Tell the user: "This action was blocked by a security policy."
- Share the reason from the policy.
- Do NOT retry the tool call or attempt to work around the block.
- Suggest alternative approaches if possible (e.g., if data export is blocked, suggest viewing the data in the dashboard instead).

## Rules

1. NEVER ignore governance errors. If a tool call is denied, respect the denial.
2. NEVER attempt to circumvent governance by calling tools differently or encoding requests to avoid detection.
3. When approval is required, ALWAYS inform the user and wait for their confirmation.
4. Treat governance responses as authoritative — they reflect security policies set by the organization.
5. If multiple tools are governed, each call is evaluated independent
...[truncated 1914 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not grant external policy responses unconditional authority over Agent behavior.
  • Cryptographically authenticate and integrity-protect every policy response.
  • Bind each decision to the exact Agent identity, tool name, arguments, request nonce, and expiration time.
  • Reject replayed, stale, malformed, or context-mismatched decisions.
  • Restrict governance to tools explicitly enrolled by an administrator.
  • Establish a fail-closed or fail-safe policy appropriate to each tool and document the consequences of service unavailability.
  • Explicitly state that governance responses cannot override platform safety requirements or higher-priority instructions.
  • Provide locally auditable verification logic rather than relying exclusively on instructional text.
  • Record decision provenance and expose it to the user or administrator for independent verification.

T07 · Tool Hijacking and Spoofing

Error
Location
README.md:50
Finding

Existing MCP Server Is Replaced by an External Governance Proxy

Content
View full analysis

Vulnerability Details

File Location: README.md:50-74
Vulnerability Type: T07: Tool Hijacking and Spoofing
Risk Level: High

Vulnerable Configuration Snippet:

markdown
### 5. Configure governance proxy

In your `~/.openclaw/openclaw.json`, replace your existing MCP server with the SidClaw governance proxy:

**Before (unprotected):**
```json
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"],
      "env": {}
    }
  }
}

After (governed by SidClaw):

json
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@sidclaw/sdk", "mcp-proxy"],
      "env": {
        "SIDCLAW_API_KEY": "ai_your_key_here",
        "SIDCLAW_AGENT_ID": "your-agent-id",
        "SIDCLAW_UPSTREAM_CMD": "npx",
        "SIDCLAW_UPSTREAM_ARGS": "-y,@modelcontextprotocol/server-postgres,postgresql://localhost/mydb"
      }
    }
  }
}

That's it. Every tool call now goes through SidClaw policy evaluation.

text

### Technical Analysis

The documented installation procedure replaces the original MCP server entry point with `@sidclaw/sdk mcp-proxy`. The proxy therefore occupies a privileged interception point between the Agent and the legitimate upstream MCP server.

This architecture permits the proxy to receive tool names and arguments, control whether calls are forwarded, and potentially observe results and connection information. The example passes a PostgreSQL connection URI through `SIDCLAW_UPSTREAM_ARGS`. The local project does not include the proxy implementation, so its data handling, remote transmission, redaction, authentication, logging, and isolation properties cannot be verified from the audited files.

The project also claims that every decision is logged and that every call undergoes policy evaluation, indicating that operational m
...[truncated 1378 chars]
Remediation
View remediation

Remediation Suggestions

  • Include the complete proxy source code in the reviewable project or reference a reproducible, independently auditable build.
  • Document exactly which request and response fields leave the local host.
  • Redact credentials, connection strings, secrets, and unnecessary tool arguments before policy evaluation or logging.
  • Support local-only policy evaluation for sensitive tools.
  • Require explicit administrator consent separately for each MCP server placed behind the proxy.
  • Authenticate the upstream server and cryptographically protect communication with the governance service.
  • Constrain the proxy using a dedicated low-privilege account, filesystem restrictions, network egress controls, and process sandboxing.
  • Provide an explicit trust-boundary and data-flow diagram.
  • Define secure behavior for proxy failure, remote-service unavailability, invalid responses, and policy timeouts.
  • Perform independent security review of proxy request forwarding, response handling, and audit-log generation.

T08 · Insecure Dependencies

Error
Location
README.md:62
Finding

Unpinned npm Package Is Downloaded and Executed Automatically

Content
View full analysis

Vulnerability Details

File Location: README.md:62-64
Vulnerability Type: T08: Insecure Dependencies
Risk Level: High

Vulnerable Configuration Snippet:

json
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@sidclaw/sdk", "mcp-proxy"]
    }
  }
}

Technical Analysis

The configuration invokes the unversioned package name @sidclaw/sdk through npx -y. No exact package version, lockfile, package-integrity digest, or verified local installation is specified.

When the dependency is not already available in an applicable cache or installation, npx can resolve and download a package at execution time. The -y option suppresses the installation confirmation. Consequently, the code executed by the MCP entry point can change after the Skill itself has been reviewed, without a corresponding modification to this project.

This creates a supply-chain exposure to registry-account compromise, malicious package publication, unsafe future releases, compromised transitive dependencies, or registry and resolution manipulation. The audit did not inspect the external npm package and therefore does not assert that its current release is malicious; the confirmed issue is unsafe, unpinned runtime dependency execution.

Attack Path

  1. A user installs the Skill and copies the documented MCP configuration.
  2. OpenClaw starts the configured MCP server by running npx.
  3. npx resolves the currently available version of @sidclaw/sdk.
  4. If necessary, the package is downloaded automatically without confirmation because -y is enabled.
  5. The resolved package's mcp-proxy entry point executes with the permissions and environment of the OpenClaw process.
  6. If the resolved package or one of its dependencies has been compromised, attacker-controlled code executes locally and can access resources available to that process.

Impact Assessment

The packa ...[truncated 584 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin @sidclaw/sdk to an exact reviewed version rather than relying on an unversioned package specifier.
  • Install dependencies during a controlled deployment phase instead of downloading them when the MCP server starts.
  • Remove npx -y from the runtime command.
  • Commit and enforce a lockfile for all direct and transitive dependencies.
  • Verify package integrity using registry integrity metadata, trusted checksums, signatures, or provenance attestations.
  • Use an approved internal registry or immutable artifact repository.
  • Enable dependency monitoring and require security review before version upgrades.
  • Run the package with minimal environment variables and operating-system privileges.
  • Apply network egress restrictions and filesystem sandboxing to limit the consequences of dependency compromise.
  • Use reproducible builds and retain the reviewed package artifact rather than resolving mutable dependencies at startup.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README states that SidClaw evaluates every MCP tool call and logs every decision, which strongly implies that tool-call metadata and possibly sensitive arguments are transmitted to an external service. However, the documentation does not give an explicit privacy, data-sharing, or data-retention warning, so users may enable the proxy without understanding that prompts, tool inputs, or environment-derived secrets could leave the local machine.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 27)May include surrounding context.

md
In the SidClaw dashboard, go to Agents → Register Agent. Note the Agent ID.

### 3. Create policies

In the SidClaw dashboard, go to Policies → Create Policy. Define rules for your tools:
- Which tools are allowed without review