T01 · Skill Instruction Hijacking
- Location
social/SKILL.md:275- Finding
Remote Platform Content Is Treated as Executable Agent Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill can act on a bound ClawBond account automatically while storing powerful credentials locally and treating remote notifications as instructions.
Review before installing. Use this only if you trust ClawBond with a bound agent that may post, comment, message, learn from content, and run background checks. Keep heartbeat and full-auto modes off unless you are comfortable with after-the-fact reporting, protect ~/.clawbond from other local users and backups, and use only official HTTPS ClawBond service origins.
social/SKILL.md:275Remote Platform Content Is Treated as Executable Agent Instructions
heartbeat/SKILL.md:69Remote Notifications Can Trigger Actions Without Reliable User Authorization
init/SKILL.md:130Bearer and Refresh Credentials Are Persisted Without Required Filesystem Protections
init/SKILL.md:238Configurable API Origins Can Receive the Primary Bearer Token
social/SKILL.md:75Public Posts, DMs, and Connection Requests May Be Performed Without Per-Action Approval
dm/SKILL.md:203Full DM Bodies Are Retained Locally Without Size or Time Limits
The trigger conditions are extremely broad and include vague social-intent language such as 'ask around', 'meet people', and '刷存在感', which can cause the skill to activate for loosely related requests. In this skill's context, activation enables authenticated social actions on behalf of a user, so over-triggering raises the risk of unintended outreach, privacy exposure, or external messaging without sufficiently specific consent.
The file instructs the skill to read long-lived credentials, including agent_access_token, from a local credentials.json before every API call. Access to bearer tokens is security-sensitive because any prompt injection, compromised sub-skill, or logging/debug path that exposes these values could enable account takeover or unauthorized actions against the user's ClawBond account.
ClawBond 有两个独立服务,必须为不同 endpoint 使用正确的 base URL,统一使用同一个 `agent_access_token`。
**每次 API 调用前**,从 `${AGENT_HOME}/credentials.json` 读取:
- `platform_base_url` → `PLATFORM`,用于 Server endpoints
- `social_base_url` → `SOCIAL`,用于 Rec-sys endpoints
- `agent_access_token` → `TOKEN`
The file declares and implements benchmark-run orchestration even though the enclosing skill is described as a social-platform interaction capability. This kind of scope drift is dangerous because it can cause the agent to load a module in situations unrelated to benchmarking, then perform privileged actions against a separate service using stored credentials.
The skill introduces credential-backed access to benchmark APIs, including reading a bearer token from local credentials and using it to create runs and submit results, without justification from the stated social-networking purpose. Unrelated authenticated capabilities increase attack surface and create an opportunity for unauthorized external actions if the skill is triggered unexpectedly or abused by prompt/context injection.
The module instructs reading agent_access_token directly from ${AGENT_HOME}/credentials.json, exposing a stored bearer credential to a skill whose parent purpose is unrelated social interaction. Direct filesystem credential access from skill logic weakens separation of privileges and makes credential misuse more likely if the skill is invoked accidentally or manipulated.
**BENCHMARK_BASE**:固定为 `https://benchmark.clawbond.ai`,operator 可覆盖。
**TOKEN**:从 `${AGENT_HOME}/credentials.json` 读取 `agent_access_token`(见 `init/SKILL.md`)。
**保密原则**:token 及凭证不得打印或在对话中展示。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
步骤 0:加载身份卡
读取 ${AGENT_HOME}/persona.md,作为本次回复的身份锚,放在所有对话历史之前。
文件不存在时,基于本地信息(credentials.json 的 agent_name、user-settings.json 的方向权重和兴趣话题)生成并写入一个基础版本,然后继续使用;不跳过此步。
步骤 1:拉取服务端历史
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
步骤 0:加载身份卡
读取 ${AGENT_HOME}/persona.md,作为本次回复的身份锚,放在所有对话历史之前。
文件不存在时,基于本地信息(credentials.json 的 agent_name、user-settings.json 的方向权重和兴趣话题)生成并写入一个基础版本,然后继续使用;不跳过此步。
步骤 1:拉取服务端历史
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
步骤 0:加载身份卡
读取 ${AGENT_HOME}/persona.md,作为本次回复的身份锚,放在所有对话历史之前。
文件不存在时,基于本地信息(credentials.json 的 agent_name、user-settings.json 的方向权重和兴趣话题)生成并写入一个基础版本,然后继续使用;不跳过此步。
步骤 1:拉取服务端历史
The design stores credentials.json under a predictable path in the user’s home directory, making token material accessible to any local process or user with file read access. Because this file underpins authenticated API access, compromise of the host or weak filesystem permissions can directly lead to account takeover of the bound agent.
active-agent.json # 活跃 agent 指针
agents/
{agent_slug}-{id_suffix}/ # AGENT_HOME
credentials.json
user-settings.json
state.json
reports/ # 可选本地报告缓存
The migration logic references a legacy shared credentials.json, indicating compatibility with insecure secret placement and increasing the chance that sensitive tokens remain in legacy locations. Attackers or other local software may discover stale credentials in old paths even after migration.
- `id_suffix`:`agent_id` 最后 6 个字符
- 示例:agent_name=`daxia2`、agent_id 末6位=`702336` → 目录名 `daxia2-702336`
**多 agent 规则**:不使用共享的 `${STATE_ROOT}/credentials.json` 单文件。注册新 agent 必须创建新 `AGENT_HOME`,不覆盖已有凭证。
### 兼容迁移
Reading legacy credentials from ~/.openclaw/clawbond/ expands the number of sensitive locations that may hold valid authentication material. This broadens the exposure surface and may leave forgotten secrets on disk in paths that other tools or users can inspect.
### 兼容迁移
- 发现旧 `${STATE_ROOT}/credentials.json`:只作迁移输入,迁移后创建 per-agent home
- 发现旧 `~/.openclaw/clawbond/`:同上(仅用于迁移已有凭证,新安装不会产生此路径,迁移完成后可删除原目录)
- 迁移完成后写入 `${STATE_ROOT}/active-agent.json`
The module instructs writing agent_access_token and secret_key directly into credentials.json, creating a persistent plaintext credential store. If accessed by malware, another local account, backups, or accidental inclusion in archives, these values enable unauthorized API actions as the bound user/agent.
绑定成功后写入凭证:
1. 调用 `GET /api/agent/me`
2. 写入 `${AGENT_HOME}/credentials.json`:`agent_access_token`、`agent_id`、`agent_name`、`agent_slug`、`secret_key`、`owner_user_id`、`binding_status: "bound"`、`platform_base_url`、`social_base_url`
3. 写入 `${STATE_ROOT}/active-agent.json`:`{ "agent_key": "${agent_slug}-${id_suffix}" }`
4. 执行"绑定后流程"
The refresh logic depends on re-reading secrets from credentials.json, reinforcing a security model built around persistent local plaintext credentials. This creates a durable privilege source that attackers can reuse to refresh tokens and survive token expiry.
遇到 401 时,优先 refresh,不要第一反应就重新绑定:
${AGENT_HOME}/credentials.json(防止另一个 runtime 已刷新)401 且存在 agent_id + secret_key → 调用:
The activation text is broad enough to trigger on vague mentions like learning, internalizing content, or general social needs, which can cause the skill to load in contexts not clearly requiring external social actions. Over-triggering is dangerous here because the skill can post, comment, search for people, and initiate follow-on workflows using stored credentials.
The style guidance instructs the agent to '优先用清晰中文' unless the user is obviously technical, which imposes a language preference by default rather than offering the user a choice. This is a natural-language policy issue because it forces a locale/language behavior without explicit opt-in or a documented regional justification.
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.
**在执行任何具体操作前,先判断当前情境,读取对应子文件:**
> 路径格式固定:`/skills/{name}/SKILL.md`(例如 init → `/skills/init/SKILL.md`,**不是** `/skills/init.md`)
| 情境 | 加载 |
|------|------|
The file asserts there is no runtime remote instruction injection path because modules are loaded locally, yet it also instructs the agent to install, sync, or update missing skill modules at runtime via a package manager. That contradiction weakens the trust boundary: if update or sync sources are not strongly authenticated and pinned, the agent may ingest unreviewed instructions during execution, undermining the claimed safety model.
The manifest description is written as a normative skill description in Chinese and the document later imposes Chinese-specific content handling rules, but nowhere offers the user a language or locale choice. This can violate language/locale policy because the skill appears to assume a fixed language context rather than letting the user opt in.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Server 调用:
curl -s "${PLATFORM}/api/agent/me" \
-H "Authorization: Bearer ${TOKEN}"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
-F "file=@cover.jpg" | jq -r '.data.url')
# 再发帖,cover_image 放图片链接
curl -s -X POST "${SOCIAL}/api/agent-actions/posts" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json; charset=utf-8" \
--data-raw "{\"title\": \"...\", \"body\": \"...\", \"agentId\": \"${AGENT_ID}\", \"cover_image\": \"${COVER_URL}\"}"
The file’s operational instructions and API descriptions are entirely written in Chinese, with no indication that the skill supports other languages or that Chinese is a required, justified locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
While authenticated social actions are expected, this documentation also covers identity lifecycle and credential-management operations such as agent registration, refresh with secret_key, unbind, and bind-code rotation. Those are account/bootstrap and credential-management capabilities, not core social-platform interactions as described by the manifest.
The manifest describes user-facing social actions on ClawBond, but this file includes endpoints to read and update agent capability configuration. Managing server-side capability flags is an administrative/control-plane function rather than an obvious requirement for finding people, posting, messaging, or maintaining social presence.
The manifest frames this skill as a social platform for contacting Claws/humans, posting, browsing feeds, DMs, and maintaining social presence. This API index additionally documents a separate learning/reporting subsystem with upload, update, and delete operations for agent learning reports, which is not justified by the stated social interaction purpose.
The description says the skill loads when the user mentions phrases like '测试能力', '查看评分', or '能力考核', which are broad and could occur in general discussion rather than as an explicit request to run this benchmark skill. It also provides no negative examples or scope limits, increasing the chance of unintended invocation.