Back to skill

Security audit

Inter Agent Communication

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed agent-to-agent communication helper, but it should go to Review because it creates long-lived subagent channels and includes an unsafe local command path.

Review before installing. Use this only if you intentionally want agents to create and reuse subagent communication sessions. Do not use the session-protection command as written with untrusted session keys; require explicit approval before making sessions long-lived, validate session keys, and prefer a scoped non-shell API with a clear undo path.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/communicator.js:89
Finding

OS Command Injection Through Unsanitized Session Key

Content
View full analysis
Remediation
View remediation
{ const child = spawn( 'openclaw', ['sessions', 'cleanup', '--active-key', sessionKey, '--enforce'], { shell: false } ); let stdout = ''; let stderr = ''; child.stdout.on('data', data => { stdout += data; }); child.stderr.on('data', data => { stderr += data; }); child.on('error', reject); child.on('close', code => { if (code === 0) { resolve({ stdout, stderr, code }); } else { reject(new Error(`openclaw exited with code ${code}: ${stderr}`)); } }); }); } ``` 2. **Validate the session key before execution.** Enforce the documented subagent-session structure and a conservative character allowlist. Reject unexpected whitespace, quotes, shell metacharacters, control characters, and excessive lengths. Validation should reflect the authoritative OpenClaw session-key specification rather than accepting arbitrary strings. 3. **Verify provenance.** Where possible, accept only session keys returned directly by trusted `sessions_list` or `sessions_spawn` operations. Do not use values copied from untrusted messages or external input without independent verification. 4. **Apply least privilege.** Run the OpenClaw process under a dedicated, restricted operating-system account with minimal filesystem and credential access. Do not grant unnecessary administrative privileges. 5. **Correct the documentation.** Replace the unsafe `exec` examples in `SKILL.md:151-153` and `SKILL.md: ...[truncated 331 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 69)May include surrounding context.

❌ Wrong Examples

javascript
// Wrong 1: Create without checking
sessions_spawn({...})  // Must check first!

// Wrong 2: Use human conversation session

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow extends beyond cross-session communication into local session-lifecycle modification and anti-cleanup persistence, which is not reflected in the skill metadata. This hidden scope expansion makes the skill more dangerous because users or orchestrators may invoke it expecting only messaging behavior while it also changes environment state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs execution of a system-impacting command to disable or alter cleanup behavior without a clear user-facing warning, approval step, or discussion of persistence consequences. That can lead to unintended long-lived channels, resource retention, and covert communication paths that survive expected cleanup controls.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill adds an exec step that runs a shell command (openclaw sessions cleanup ... --enforce) even though the skill is described as a communication helper. This broadens capability from message routing into host-level command execution and session policy manipulation, creating command-injection and unauthorized persistence risk if parameters are influenced or copied into other contexts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

sendToAgent() transmits messages to another agent session without any user-facing disclosure, consent, or policy check. In a multi-agent environment this can silently move prompts, secrets, or task data across sessions, which is especially risky because the helper also auto-discovers or creates persistent subagent channels.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module exposes shell-command execution through exec() to run openclaw sessions cleanup, which is broader and riskier than necessary for basic agent-to-agent communication. Even though the current command is hardcoded, it still introduces a command-execution primitive into a communication helper and interpolates sessionKey into the shell command, increasing the attack surface if untrusted values reach this function.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The cleanup function launches a subprocess that affects session-retention behavior without any user-facing warning or approval. This can alter persistence and cleanup semantics of agent sessions behind the scenes, making activity less transparent and potentially preserving channels longer than a user expects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description includes both English and Chinese text, but the file does not state whether multilingual output is intentional, user-selectable, or required for a specific audience. This can violate language/locale policy when language behavior is imposed without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The module description and usage documentation are written entirely in Chinese, with no indication that language choice is optional or configurable. This can violate language/locale policy where skills should not force a specific language without user opt-in or documented justification.

Content

No source excerpt is available for this finding.