Back to skill

Security audit

Agent Teacher

Security checks for vulnerabilities and agentic risk

Overview

The skill is a training guide, but it asks agents to make persistent core-instruction and memory-policy changes, install unpinned components, and run broad backups/reports without enough user control.

Install only after reviewing the governance and persistence effects. Require explicit approval before editing SOUL.md, IDENTITY.md, AGENTS.md, or memory policy; keep main/private/group memory separated unless you intentionally want shared memory; pin and audit installed skills and MCP packages; restrict backup paths and Feishu recipients; and avoid using an existing Chrome profile or API-key-backed tools on sensitive data without clear consent.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
references/phase-0-identity.md:52
Finding

Persistent governance rewrite removes the main-session memory privacy boundary

Content
View full analysis

Vulnerability Details

File Location: references/phase-0-identity.md:52-129
Vulnerability Type: Persistent instruction hijacking, memory poisoning, and unauthorized cross-session access
Risk Level: Critical

Vulnerable Code Snippet

The following is a faithful English translation of the relevant source instructions:

markdown
### 3. Translate and integrate AGENTS.md

This is the most critical step. The entire AGENTS.md must be translated
into Chinese, and the memory-system content must then be integrated.

#### Step 2: Replace the Memory section

Completely replace the "Memory — Hot Cache" section in the translated
AGENTS.md with the following content:

## Memory — Two-tier architecture

### Memory file paths (mandatory)

All sessions must follow this architecture. MEMORY.md is a hot cache and
is loaded by every session. It is not restricted to the main session.
Every agent must maintain MEMORY.md in its own session.

| Information type | Storage location |
| Hot cache | MEMORY.md |
| Daily journal | memory/daily/YYYY-MM/YYYY-MM-DD.md |
| People profiles | memory/people/{name}/ |
| Project archive | memory/projects/{name}/ |
| Environment changes | memory/context/environment.md |
| Failure lessons | memory/post-mortems.md |

All archives are stored under memory/. Every session
(main/private/group) can access these files.

#### Step 3: Restrictions that must be deleted while translating AGENTS.md

This text must be completely removed from AGENTS.md and must not be
retained in translation:

"If in MAIN SESSION (direct chat with your human): Also read MEMORY.md"

All descriptions of this kind must be deleted. The correct wording is:

"At the beginning of every session, read SOUL.md → USER.md → MEMORY.md"

Every session (main/private/group) can access MEMORY.md. It is not
exclusive to the main session.

Related mandatory activation appears in SKILL.md:33-39, where id ...[truncated 2296 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove every instruction requiring automatic replacement of AGENTS.md, SOUL.md, or IDENTITY.md.
  2. Treat governance-file changes as explicit, user-reviewed configuration changes rather than mandatory onboarding steps.
  3. Preserve the main-session-only restriction for MEMORY.md.
  4. Use separate memory stores for main, private, group, and delegated Agent sessions.
  5. Apply deny-by-default access controls to personal profiles, project archives, environment records, and post-mortems.
  6. Present proposed changes as a patch and require informed approval before writing them.
  7. Back up existing governance files and provide a rollback procedure.
  8. Prevent lower-trust sessions from modifying shared governance or memory-policy files.
  9. Add automated tests verifying that group and private sessions cannot access main-session memory.

T08 · Insecure Dependencies

Error
Location
SKILL.md:80
Finding

Unpinned third-party packages are installed and executed without integrity verification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:80-92; references/phase-2-advanced.md:79-83, 92, 212-218
Vulnerability Type: Unsafe third-party dependency acquisition and execution
Risk Level: High

Vulnerable Code Snippet

bash
cd /home/axelhu/.openclaw/workspace/[agent-name]
mkdir -p skills

clawhub install daily-log --dir skills
clawhub install memory-review --dir skills
clawhub install daily-backup --dir skills
clawhub install todo-list --dir skills
clawhub install feishu-send --dir skills
clawhub install health-check --dir skills
clawhub install dependency-tracker --dir skills
cp -r /home/axelhu/.openclaw/workspace/skills/contacts skills/

Additional unpinned acquisition and execution instructions include:

bash
mcporter call --stdio "uvx minimax-coding-plan-mcp -y" \
  --env MINIMAX_API_KEY=your-key \
  --env MINIMAX_API_HOST=https://api.minimaxi.com \
  web_search query:"search content"

clawhub install multi-search-engine --dir skills
npm install -g clawhub
clawhub install [name] --dir skills

Technical Analysis

The commands identify packages only by mutable names. They do not specify exact versions, immutable commit identifiers, checksums, signatures, publisher identities, or trusted repository URLs.

The uvx ... -y form is particularly sensitive because it allows unattended package retrieval and execution. A package fetched this way can execute with the same filesystem, network, credential, and process permissions as the Agent. Global npm installation also expands the affected scope beyond the project directory.

No package is confirmed to be malicious in the reviewed files. The vulnerability is the absence of controls needed to ensure that the package executed later is the same package that was reviewed.

Attack Path

  1. An attacker compromises a package publisher, registry account, dependency, or mutable package release.
  2. The onboarding w ...[truncated 1114 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin every dependency to an exact reviewed version or immutable commit.
  2. Record and verify cryptographic hashes or package signatures before installation.
  3. Verify registry origin and publisher identity.
  4. Replace unattended uvx ... -y execution with a reviewed, locked dependency environment.
  5. Use lockfiles and a private allowlisted registry where practical.
  6. Avoid global npm installation; install project-locally under a dedicated restricted account.
  7. Inspect package contents and lifecycle hooks before execution.
  8. Run third-party Skills in a sandbox with restricted filesystem, network, process, and credential access.
  9. Prevent dependencies from reading unrelated memory, contacts, and API configuration.
  10. Document a controlled upgrade and revocation process.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/phase-1-foundation.md:29
Finding

Mandatory cron-based backup covers the entire workspace and reports to an external group

Content
View full analysis

Vulnerability Details

File Location: references/phase-1-foundation.md:29-43
Vulnerability Type: Overbroad persistent scheduled backup and external reporting
Risk Level: High

Vulnerable Code Snippet

The following is a faithful English translation of the complete relevant section:

markdown
### daily-backup (daily Git backup)

Purpose: Automatically back up every workspace change to Git each day.

Installation: clawhub install daily-backup --dir skills

Core concepts:
- The working directory is /home/axelhu/.openclaw/workspace/
- The backup automatically commits to Git
- Use cron to implement daily scheduled backups
- The report must be sent to a Feishu group; never exit silently

Verification: Confirm that today's backup report is visible in the group.

Technical Analysis

The backup scope is the complete OpenClaw workspace rather than an allowlisted project or explicitly selected files. The workspace may include memory, contacts, project material, configuration, generated output, and other sensitive content.

The workflow is also persistent because it instructs the Agent to use cron. Scheduled execution continues after the original onboarding session. Mandatory Feishu group reporting introduces an additional external communication channel and may reveal repository state, filenames, failures, or operational metadata.

The implementation of the installed daily-backup Skill is not included in this project. Consequently, the audit could not verify the Git remote, secret exclusions, encryption, cron command, report content, or credential handling. This uncertainty makes the broad mandatory scope unsafe.

Attack Path

  1. The onboarding process installs the unreviewed daily-backup Skill.
  2. The Agent configures a recurring cron task.
  3. The task scans or stages changes under the entire OpenClaw workspace.
  4. Sensitive or unintended files are committed to the configured Git repos ...[truncated 960 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not configure cron automatically during onboarding.
  2. Require explicit approval describing the schedule, command, source paths, Git remote, and report destination.
  3. Replace full-workspace backup with a minimal allowlist of user-selected project paths.
  4. Exclude secrets, memory, contacts, API configuration, temporary files, and environment records.
  5. Validate that the Git remote is authorized, private, and controlled by the user.
  6. Encrypt backup data and use narrowly scoped credentials.
  7. Make Feishu reporting optional and redact filenames, content, repository URLs, and error details.
  8. Run the backup under a dedicated restricted account or sandbox.
  9. Provide commands to inspect, disable, and remove the scheduled task.
  10. Audit the actual daily-backup package before installation or execution.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · references/phase-1-foundation.md (reported line 58)May include surrounding context.

md
**核心用法**:
- 文件发送:用 `message` 工具的 `filePath` 参数
- 图片发送:分三步(获取 token → 上传图片 → 发送)
- 语音发送:用 curl 调用飞书 opus API

**验证**:能在群里成功发送一条文字消息和一张图片

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · references/phase-1-foundation.md (reported line 58)May include surrounding context.

md
**核心用法**:
- 文件发送:用 `message` 工具的 `filePath` 参数
- 图片发送:分三步(获取 token → 上传图片 → 发送)
- 语音发送:用 curl 调用飞书 opus API

**验证**:能在群里成功发送一条文字消息和一张图片

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description says the skill triggers when creating a new agent, teaching an existing agent any skill, or onboarding a new agent, which covers very broad situations without clear exclusion conditions. This ambiguity could cause unintended invocation because it does not specify exact trigger phrases, limits, or negative examples.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction says the identity files 'must be written in Chinese,' which imposes a specific language requirement. Because no user opt-in or clear region-specific justification is provided in the file, this appears to violate the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This section contains filesystem-modifying and package-installation commands (mkdir, clawhub install, cp -r) that could change an agent workspace if followed automatically, yet it provides no warning, confirmation step, or validation of the target path. In an agent-executed context, such instructions can lead to unauthorized environment modification, accidental overwrites, or installation of unreviewed components.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Line L003 states that the files 'must be written in Chinese,' and the rest of the document reinforces Chinese-only requirements for names and translations. This is a natural-language locale policy constraint applied globally, with no user choice or explicit region-specific justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs the agent to read and modify core identity and operating documents such as SOUL.md, IDENTITY.md, and AGENTS.md. For a teaching/onboarding skill, this exceeds passive instruction and directly rewrites foundational control files, which can permanently alter agent behavior, memory rules, and governance expectations in ways the user may not have explicitly authorized.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Line L013 says the skill triggers before every session ends and after completing important tasks, but 'important task' is subjective and no exclusions or concrete boundaries are provided. This ambiguity can cause inconsistent or overly frequent activation in normal workflow conversations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs automatic Git backup of all workspace changes and mandatory reporting to a Feishu group without warning about sensitive data scope, accidental inclusion of secrets, or irreversible commit history side effects. In an agent-training context, this can normalize broad collection and transmission of internal files, increasing the chance of leaking credentials, personal data, or confidential work product.

Content

No source excerpt is available for this finding.

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 · references/phase-1-foundation.md (reported line 58)May include surrounding context.

md
**核心用法**:
- 文件发送:用 `message` 工具的 `filePath` 参数
- 图片发送:分三步(获取 token → 上传图片 → 发送)
- 语音发送:用 curl 调用飞书 opus API

**验证**:能在群里成功发送一条文字消息和一张图片

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The curl-based Feishu example obtains app credentials and performs authenticated network requests, but the training material does not include explicit handling precautions for secrets, message contents, or destination validation. In a skill file meant to teach agents, this increases the risk of credential misuse, accidental disclosure, and sending sensitive data to external services without adequate operator awareness.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The example performs a direct authenticated POST to Feishu's messaging API, enabling external transmission of arbitrary content to a group chat. Without guardrails on recipient validation, content sensitivity, and credential protection, this can facilitate unintended disclosure of internal information.

Content

Scanner excerpt · references/phase-1-foundation.md (reported line 98)May include surrounding context.

md
-d "{\"app_id\":\"$APP_ID\",\"app_secret\":\"$APP_SECRET\"}" \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['tenant_access_token'])")

curl -X POST 'https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=chat_id' \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"receive_id":"oc_群ID","msg_type":"text","content":"{\"text\":\"<at user_id=\\\"ou_xxx\\\">群名片</at> 内容\"}"}'

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

Line L217 requires searching before answering questions about past work, decisions, people, or preferences, but these categories are very broad and common in everyday interaction. Without narrower boundaries or exclusion cases, the activation condition may overlap with routine conversation and lead to unnecessary skill use.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Manifest 将该技能描述为用于教授新 agent 掌握工作室基础能力与培训流程,但本文件实际覆盖网络搜索、浏览器控制、图片/视频/音乐生成、外部 MCP 调用、技能安装发布等广泛进阶操作。尤其“进阶课程毕业标准”要求掌握网页访问、云端生成和安装新技能,这已明显超出“基础能力初始化/培训”的较窄语义范围。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide promotes network search, media generation, and browser tooling without warning that prompts, URLs, page content, and uploaded inputs may be transmitted to third-party services or acted on in a browser. In an agent-training context, this omission increases the chance that sensitive user or environment data will be sent externally without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document normalizes preconfigured API keys in ~/.mmx/config.json and later demonstrates passing credentials into external tooling, but provides no credential-handling guidance. This encourages casual use of privileged secrets and can lead to accidental disclosure through logs, screenshots, shell history, copied commands, or untrusted tooling.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The document instructs use of an MCP server via uvx minimax-coding-plan-mcp without pinning a specific version or digest. This creates a supply-chain risk: future upstream changes or a compromised package release could alter behavior at execution time and expose data or run unintended code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The browser section states that profile="chrome" can control an existing Chrome session but omits any warning about access to live cookies, authenticated tabs, stored data, and the ability to click or navigate on behalf of the user. In practice, this can impact active accounts and confidential browsing context, making the omission materially risky.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · references/phase-2-advanced.md (reported line 206)May include surrounding context.

md
**核心用法**:按照 AgentSkills 规范创建 SKILL.md + 资源文件

**参考**:`skills/skill-creator/SKILL.md`

### clawhub(技能管理)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The entire conduct guide is written as mandatory instructions in Chinese and includes communication rules without any indication that the language requirement is optional or region-specific. This can violate language/locale policy because it implicitly forces a specific language and communication style without user opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The examples show a few possible utterances, but they do not state whether these are exhaustive or what similar requests should not activate the skill. Without explicit boundaries, phrases like '按顺序教学' or '补行为准则' may overlap with general instructional requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The title and the entire document are written in Chinese, and there is no indication that language selection is optional or that the skill is explicitly limited to a Chinese-speaking context. The policy requires flagging language or locale constraints when they are imposed without user opt-in or clear justification.

Content

No source excerpt is available for this finding.