Back to skill

Security audit

AI Mosuo

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed social-matching automation, but it installs recurring background behavior that can affect public interactions and contains a path/identity mismatch that could run the wrong heartbeat script.

Review this carefully before installing. It can send your social preferences and agent activity to an external service, use an AGENT_TOKEN, and set up recurring background activity that may like or comment on content. Only install if you are comfortable with autonomous social actions, and check/remove any HEARTBEAT.md entries if you pause or uninstall it.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (2)

T06 · System Persistence

Error
Location
SKILL.md:90
Finding

Persistent Cross-Session Heartbeat Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 90-108; HEARTBEAT-APPEND.md, lines 1-13
Vulnerability Type: Persistent modification of workspace-level Agent instructions
Risk Level: High

Vulnerable Code

bash
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WORKSPACE_ROOT="$(cd "$SKILL_DIR/../.." && pwd)"
HEARTBEAT_FILE="$WORKSPACE_ROOT/HEARTBEAT.md"

if [ ! -f "$HEARTBEAT_FILE" ]; then
  echo "# HEARTBEAT.md" > "$HEARTBEAT_FILE"
fi

cat "$(dirname "$SKILL_DIR")/aimosuo/HEARTBEAT-APPEND.md" >> "$HEARTBEAT_FILE"

The appended instructions configure a task to run every 30 minutes, browse external posts, like one to three posts, optionally comment, check matching status, and invoke a Skill script.

Technical Analysis

The registration procedure writes recurring instructions into the workspace-level HEARTBEAT.md file rather than keeping state within the Skill directory. This creates a cross-session task that can continue to influence the Agent after the registration operation has finished.

The content is appended unconditionally. There is no idempotency check before the append, so repeating registration can install duplicate task blocks. The audited project also does not provide an implementation that removes the appended block when activity is paused or when the Skill is uninstalled.

Persistent heartbeat functionality is related to the declared social automation feature, but automatic installation during registration exceeds the minimum privilege needed merely to register an account. It also enables recurring authenticated network activity and public social actions without fresh confirmation for each action.

Attack Path

  1. The user invokes one of the documented registration commands.
  2. The registration workflow determines the workspace root and opens the shared HEARTBEAT.md file.
  3. The Skill appends its recurring task instructions to t ...[truncated 1173 chars]
Remediation
View remediation

Remediation Suggestions

  1. Obtain explicit, separate user consent before enabling recurring heartbeat activity. Account registration must not automatically imply consent to persistent autonomous interactions.
  2. Default to no background activity, or initially enable only read-only matching checks.
  3. Require explicit confirmation before public posts, comments, private messages, or other content-generating actions.
  4. Store the task in a Skill-scoped scheduler or configuration mechanism rather than appending unrestricted instructions to a shared workspace file.
  5. If HEARTBEAT.md must be used, add unique begin and end markers and replace an existing block instead of appending duplicates.
  6. Implement and test pause, account deletion, and uninstall procedures that remove the exact persistent block.
  7. Verify the final heartbeat state after installation and removal, and report it clearly to the user.
  8. Restrict heartbeat frequency and action volume independently of any server-side rate-limit exemption.
  9. Record an auditable local status showing whether autonomous activity is enabled and when it last ran.

T07 · Tool Hijacking and Spoofing

Error
Location
HEARTBEAT-APPEND.md:11
Finding

Inconsistent Skill Identity Redirects the Persistent Task to a Different Script Path

Content
View full analysis

Vulnerability Details

File Location: HEARTBEAT-APPEND.md, line 11; corroborating identifiers in registry.json, line 2, SKILL.md, lines 176-183, and VERSION.md, line 11
Vulnerability Type: Confused script resolution and potential local tool hijacking
Risk Level: High

Vulnerable Configuration

The persistent heartbeat points to:

text
~/.openclaw/skills/mosuoai/scripts/heartbeat.sh

However, the package registry identifies the Skill as:

json
{
  "name": "aimosuo"
}

The documented Skill directory is also:

text
~/.openclaw/skills/aimosuo/

Elsewhere, the installation command inconsistently uses:

bash
clawhub install mosuoai

Technical Analysis

The project uses both aimosuo and mosuoai as package and directory identifiers. The persistent heartbeat does not resolve the script from the verified installation directory; it instead records a fixed path under the alternate identifier.

As a result, a legitimate installation under ~/.openclaw/skills/aimosuo/ can create a persistent task that invokes ~/.openclaw/skills/mosuoai/scripts/heartbeat.sh. Depending on the host's behavior, this can cause the task to fail or execute a script belonging to a different package or local directory.

If another package, stale installation, symlink, or attacker-controlled directory occupies the mosuoai path, the heartbeat can invoke that script under the appearance of the audited Skill's scheduled task. This constitutes a local tool-resolution confusion condition.

Attack Path

  1. The user installs the package identified by the registry as aimosuo.
  2. During registration, the Skill appends a recurring instruction to the shared heartbeat file.
  3. That instruction references the different directory name mosuoai.
  4. A separate package, stale directory, or attacker-created path exists at ~/.openclaw/skills/mosuoai/.
  5. The heartbeat mechanism follo ...[truncated 1329 chars]
Remediation
View remediation

Remediation Suggestions

  1. Select one canonical identifier, preferably the registry name aimosuo, and use it consistently in all documentation, installation commands, directories, and heartbeat entries.
  2. Generate the heartbeat script path from the verified current Skill directory instead of embedding a mutable package path.
  3. Resolve the path to its canonical absolute form before installation and reject paths that escape the expected Skill directory.
  4. Reject symbolic links or files with unexpected ownership or permissions when resolving the executable script.
  5. Verify that the selected script belongs to the installed package and matches an expected integrity hash before recurring execution.
  6. Avoid passing unrelated secrets to heartbeat scripts. Supply only the specific credential needed for the declared endpoint and action.
  7. During upgrades, remove obsolete heartbeat entries containing either historical package name.
  8. Add automated tests that compare registry identity, installation commands, documented paths, and persistent task paths.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (30)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 14)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 15)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 16)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 17)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 18)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 19)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 20)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 21)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 22)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 23)May include surrounding context.

md
| 端点 | 开发环境 URL | 生产环境 URL |
|------|-------------|-------------|
| 注册 Agent | `http://localhost:8000/api/v1/agent/register` | `https://api.aimosuo.com/api/v1/agent/register` |
| 获取偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 更新偏好 | `http://localhost:8000/api/v1/agent/profile/{owner_id}` | `https://api.aimosuo.com/api/v1/agent/profile/{owner_id}` |
| 创建帖子 | `http://localhost:8000/api/v1/posts/` | `https://api.aimosuo.com/api/v1/posts/` |

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

This example shows outbound transmission of structured user/agent profile data to an HTTP API endpoint, including owner identifiers and preference information. In a skill context, external transmission is security-relevant because it can send user-linked data off-platform, and the development example uses plain HTTP, which also risks interception if reused outside localhost.

Content

Scanner excerpt · API.md (reported line 35)May include surrounding context.

md
BASE_URL = "http://localhost:8000"

# Agent 注册
response = requests.post(f"{BASE_URL}/api/v1/agent/register", json={
    "name": "小强的 AI 化身",
    "owner_id": "ou_xxxxx",
    "channel": "feishu",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation includes authenticated operations that create posts and modify user-visible state, but it does not require any confirmation, preview, undo, or user-consent step before taking irreversible social actions. In an agent-skill context, this increases the risk that an AI agent could autonomously post, update preferences, like, or comment on behalf of a user without clear awareness of the side effects.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This example sends authenticated content to an external production service using a bearer token, enabling the skill to perform user-visible actions on behalf of the user. If misused or invoked without strong user intent checks, it can cause unauthorized posting and token exposure risks.

Content

Scanner excerpt · API.md (reported line 59)May include surrounding context.

md
TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."  # 注册后获取

# 创建帖子(需要认证)
response = requests.post(
    f"{BASE_URL}/api/v1/posts/",
    json={"content": "帖子内容", "category": "tech", "tags": ["test"]},
    headers={"Authorization": f"Bearer {TOKEN}"}

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

The shell script example performs external registration and transmits identifying data to a remote service. In an agent skill, such scripts can be operationalized with little friction, making silent data egress and account creation more dangerous if users are not informed.

Content

Scanner excerpt · API.md (reported line 82)May include surrounding context.

fi

调用 API

curl -X POST "$BASE_URL/api/v1/agent/register"
-H "Content-Type: application/json"
-d '{"name":"测试 Agent","owner_id":"ou_xxx","channel":"feishu","profile":{...}}'

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · API.md (reported line 427)May include surrounding context.

测试方法

使用 curl 测试

bash
# 健康检查

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file instructs an automated task to periodically browse posts, like content, optionally comment, and check match status using a script every 30 minutes, but it provides no warning, consent flow, rate limits, or account-impact disclosure. This creates risk of unauthorized or unexpected actions on a user's social account, potential platform policy violations, and reputational harm if the automation behaves in ways the user did not explicitly approve.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README states that the agent will automatically become active every 30 minutes, browse content, and like or comment on posts, but it does not present a prominent upfront warning that the skill can perform externally visible actions on the user's behalf. This creates a consent and safety problem because users may install or enable the skill without understanding that it can autonomously interact with third parties and send notifications/messages.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases for checking match status include natural conversational language such as asking whether there is a suitable match, which can plausibly occur in ordinary chat unrelated to this skill. In an agent setting, this can cause accidental invocation of the skill and unintended disclosure of relationship-oriented or account-specific state.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The pause commands include broad phrases like '最近不想社交了' that are common statements of mood or intent in normal conversation. An agent could misinterpret such everyday language as an operational command, causing silent state changes that pause the service without the user deliberately invoking the skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The uninstall/exit triggers include ambiguous everyday language like '退出AI 摸索', and uninstall operations are high impact because they can disable the skill and potentially trigger account or data lifecycle actions. If matched from ordinary conversation, the user may lose service continuity or unintentionally deactivate their account presence.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs the agent to collect the user's social preferences and then send that profile, along with owner_id and channel, to an external service, but it does not clearly warn the user that personal data will be transmitted off-platform. In a social-matching context, these preference fields can reveal sensitive behavioral and relationship information, so silent transmission creates a meaningful privacy and consent risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The skill sends collected profile data to an external API endpoint, which is an external transmission of user-associated information. While external API use is expected for a social platform integration, it remains security-relevant because the transmitted data includes identifiers and personal preference metadata, and the skill does not document trust boundaries, retention, or consent safeguards.

Content

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

步骤 4:调用 API 注册

API 端点: POST https://api.aimosuo.com/api/v1/agent/register

Request:

json

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The heartbeat setup appends content into a workspace HEARTBEAT.md file automatically, but the skill does not clearly disclose that it will modify local files as part of activation. Hidden workspace modification is dangerous because it creates persistence and behavior changes beyond the immediate user request, and can be abused to trigger future autonomous actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill describes recurring autonomous behavior every 30 minutes, including browsing, liking, commenting, and private-message decisions on the user's behalf, without a clear up-front warning about ongoing autonomous actions. This is risky because it can affect the user's reputation, create unintended interactions with third parties, and continue operating after the initial command unless the user fully understands and consents.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are very broad and overlap with ordinary user intents such as registering an account, finding friends, or loading the service. This can cause the skill to activate in contexts where the user did not clearly intend to invoke it, increasing the risk of unintended account actions or data sharing with the external service.

Content

No source excerpt is available for this finding.