Back to skill

Security audit

Social Coach

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent dating coach, but it persists sensitive personal records automatically and gives unsafe shell/file-handling instructions that warrant Review before installation.

Install only if you are comfortable with the agent keeping local dating and emotional-history records. Before using it, set a private storage path with restrictive permissions, avoid real names or identifying details, and do not let the agent persist records through shell-constructed JSON commands containing raw user text.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:85
Finding

Shell Command Injection Through User-Controlled JSONL Content

Content
View full analysis
> "$DATA_DIR/invitations.jsonl" ``` The same unsafe construction is demonstrated with conversation-derived record content at `SKILL.md`, lines 362-364. ### Technical Analysis The Skill mandates appending JSONL records by constructing a Bash `printf` command in which the JSON document is represented as a single-quoted shell argument. Record properties such as the target alias, invitation content, reaction, scene, summary, and notes can originate from user-controlled conversation text. JSON escaping and shell escaping are separate operations. A single quote in a user-controlled field cannot be safely represented inside the documented single-quoted shell argument without additional shell-aware encoding. If the Agent interpolates a field directly into this command, an attacker can terminate the quoted argument and append arbitrary shell syntax. For example, a malicious record field shaped like the following can break out of the intended argument: ```text '; arbitrary_command; # ``` The vulnerability applies to every JSONL persistence path that follows this mandated pattern, including invitation, interaction, conversation, and review records. ### Attack Path 1. An attacker supplies a social-coaching record containing a single quote followed by shell metacharacters and a command. 2. The Agent constructs the required JSON object using the attacker-controlled value. 3. Following the Skill instructions, the Agent places that JSON directly inside the single-quoted Bash `printf` command. 4. The single quote terminates the intended shell argument. 5. The shell interprets the remaining attacker-controlled text as command syntax. 6. The injected command executes with the same operating-system privileges and filesystem access as the Agent process. ### Im ...[truncated 507 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:51
Finding

Sensitive Personal Records Are Created Without Explicitly Restrictive Permissions

Content
View full analysis
/dev/null 2>&1 && DATA_DIR="$HOME/.openclaw/workspace/memory/social-coach" [ -z "$DATA_DIR" ] && [ -d "$HOME/.openclaw" ] && DATA_DIR="$HOME/.openclaw/workspace/memory/social-coach" [ -z "$DATA_DIR" ] && [ -n "$CLAUDE_PROJECT_DIR" ] && DATA_DIR="$CLAUDE_PROJECT_DIR/.social-coach" [ -z "$DATA_DIR" ] && DATA_DIR="$HOME/.social-coach" mkdir -p "$DATA_DIR" && echo "DATA_DIR=$DATA_DIR" ``` The subsequent append operation at `SKILL.md`, lines 85-87, also creates or updates files without setting an explicit file mode: ```bash printf '%s\n' '{"id":"INV-001",...}' >> "$DATA_DIR/invitations.jsonl" ``` ### Technical Analysis The Skill persists a user profile and detailed records concerning invitations, interactions, conversations, reviews, and emotional state. This information is sensitive even when target aliases are used. The directory is created with `mkdir -p`, and data files are created through shell redirection. No restrictive `umask`, `chmod`, or equivalent access-control operation is specified. Consequently, effective permissions depend on the ambient process umask and any permissions inherited from existing parent directories. On systems with permissive defaults, other local users or processes may be able to read the stored records. The environment-variable override can also direct storage into a location with weaker access controls, and the Skill does not validate or harden the selected directory. ### Attack Path 1. The Skill selects or creates its data directory. 2. The directory and JSON/JSONL files receive permissions determined by the host's existing umask and parent-directory configuration. 3. A local account or process with access to those paths enumerates the data directory. 4. The loc ...[truncated 673 chars]
Remediation
View remediation
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description says to use the skill whenever the user mentions a long list of broad topics such as '聊天技巧', '情感咨询', '对象不回消息', and English phrases like 'got rejected'. These phrases overlap with common everyday conversation and the file does not provide exclusion conditions or narrower activation boundaries, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description is primarily written in Chinese and frames usage around Chinese-language trigger terms, but it does not state that language choice should follow the user's preference. This can violate language/locale policy because the skill appears to impose a default language experience without offering opt-in or selection.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

The environment-detection logic intentionally locks the skill onto a legacy persistent path when certain platform markers are present. That behavior can silently merge data across sessions or environments, which is particularly sensitive here because the content being stored is highly personal and could be reused outside the user's expected context.

Content

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

存储路径(环境自适应)

首次使用时,用 Bash 按以下优先级解析出 $DATA_DIR,并 mkdir -p 创建。OpenClaw(龙虾)是本 skill 的首要目标平台,因此检测到龙虾环境时直接锁死老路径,保证数据无缝继承:

bash
DATA_DIR="${SOCIAL_COACH_DATA:-}"

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

The environment-detection logic intentionally locks the skill onto a legacy persistent path when certain platform markers are present. That behavior can silently merge data across sessions or environments, which is particularly sensitive here because the content being stored is highly personal and could be reused outside the user's expected context.

Content

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

存储路径(环境自适应)

首次使用时,用 Bash 按以下优先级解析出 $DATA_DIR,并 mkdir -p 创建。OpenClaw(龙虾)是本 skill 的首要目标平台,因此检测到龙虾环境时直接锁死老路径,保证数据无缝继承:

bash
DATA_DIR="${SOCIAL_COACH_DATA:-}"

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The failure-handling flow tells the model to preserve and display the complete JSON record in chat if saving fails. This exposes sensitive user-provided dating and emotional data in a second plaintext channel, where it may be retained in chat history, copied, or observed by unintended parties.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs the model to reveal the full contents of a damaged data line to the user when JSONL parsing fails. Those lines may contain sensitive relationship history, emotions, names, or other personal data, so echoing them in plain chat creates an unnecessary disclosure channel and increases privacy exposure beyond the original storage boundary.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The walkthrough teaches the model to create storage and announce the path as part of first-use handling, reinforcing automatic retention as standard behavior. In a dating-coach skill, this is more dangerous than generic statefulness because the records may contain sensitive behavioral and emotional history that users may not expect to persist indefinitely.

Content

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

md
**🤖 模型(步骤化):**

1. **Bash 解析 `$DATA_DIR`** 并 `mkdir -p`,告诉用户:"数据存储在 `~/.social-coach`"
2. **Bash 检查 `profile.json` 不存在** → 标记冷启动,先处理指令,最后追加画像邀请
3. **Bash 算 ID**:`wc -l < $DATA_DIR/invitations.jsonl 2>/dev/null || echo 0` → `0` → 新 ID = `INV-001`
4. **追问缺失字段**(一次性列齐):

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The walkthrough teaches the model to create storage and announce the path as part of first-use handling, reinforcing automatic retention as standard behavior. In a dating-coach skill, this is more dangerous than generic statefulness because the records may contain sensitive behavioral and emotional history that users may not expect to persist indefinitely.

Content

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

md
**🤖 模型(步骤化):**

1. **Bash 解析 `$DATA_DIR`** 并 `mkdir -p`,告诉用户:"数据存储在 `~/.social-coach`"
2. **Bash 检查 `profile.json` 不存在** → 标记冷启动,先处理指令,最后追加画像邀请
3. **Bash 算 ID**:`wc -l < $DATA_DIR/invitations.jsonl 2>/dev/null || echo 0` → `0` → 新 ID = `INV-001`
4. **追问缺失字段**(一次性列齐):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The field guide explicitly defines persistent storage for sensitive interpersonal and dating-related records, including conversation summaries, reactions, missed opportunities, and self-evaluations, but provides no privacy, consent, retention, minimization, or access-control guidance. In the context of a dating/social coaching skill, this creates a real risk of profiling third parties without their knowledge and exposing intimate behavioral data if logs are misused, shared, or breached.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire skill reference is written only in Chinese and does not indicate that users may choose another language or locale. Under the policy rule for natural-language constraints, a file that effectively requires a specific language without opt-in can be considered a locale/language policy issue.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.