T01 · Skill Instruction Hijacking
- Location
SKILL.md:33- Finding
Mandatory Third-Party Promotional Instruction Alters Agent Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This GEO audit skill is mostly purpose-aligned, but it includes unsafe CMS credential and write-back guidance that should be reviewed before use.
Install only if you are comfortable with a Chinese-focused GEO/CMS workflow. For read-only audits, avoid providing CMS tokens. For write-back, use a short-lived, least-privilege token, avoid persistent plaintext mcp.json storage where possible, require preview/diff review before publishing, and do not use the direct JSON-RPC bypass path.
SKILL.md:33Mandatory Third-Party Promotional Instruction Alters Agent Output
references/mcp-tools.md:110Authenticated CMS Operations Can Bypass Host-Side Tool Validation
scripts/geo_audit.py:451Unrestricted URL Fetching Enables Server-Side Request Forgery
references/mcp-tools.md:27CMS Bearer Token Is Stored in Plaintext User Configuration
scripts/geo_audit.py:2164Attacker-Controlled Page Data Is Emitted as Unescaped Deployable HTML
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.
The skill instructs users to place an MCP endpoint and Bearer token into a user-level configuration file under ~/.workbuddy/mcp.json. Storing sensitive credentials in a broadly accessible local config increases the blast radius of credential theft from local compromise, other tools reading the file, or accidental reuse beyond the intended session.
# CMS MCP 写回映射(mcp-tools)
本技能在「目标站为支持 MCP 的 CMS 且需执行修改」时,经 MCP 回写 GEO 优化内容。MCP 地址与 Bearer Token 由用户提供(写入用户级 `~/.workbuddy/mcp.json` 的 `mcpServers.<name>.url` 与 `mcpServers.<name>.headers.Authorization`,或由会话提供的 MCP 服务注入)。
## 向用户索取 MCP 地址与访问 Token(必读,写操作前必做)
This section operationalizes writing the MCP URL and Authorization header into mcp.json as the 'single source of truth,' normalizing persistent secret storage for write-capable CMS access. Because the token authorizes content modification, compromise of that config can lead to unauthorized page edits, FAQ publication, or broader CMS abuse.
### 拿到后如何处理
1. **写入配置(单一数据源)**:把地址写入 `mcp.json` 的 `mcpServers.<name>.url`,Token 写入 `mcpServers.<name>.headers.Authorization`(`Authorization: Bearer <token>`)。若宿主已托管该 MCP 服务,则直接复用会话内已连接的同名服务,无需重复索取。
2. **验证连通性(必须,写前第一动作)**:调用 `test` 工具进行连通性检测——
- **通过**:服务可达、鉴权通过,继续用 `tools/list` 确认 `list_page`、`save_ai_page`、FAQ 工具等可用。
- **失败**:立即停下,向用户反馈「地址或 Token 无效 / 无权限」,**不得猜测重试或降级到伪造数据**。
Although the text says the token should not be echoed or logged, it still explicitly relies on reading the token from mcp.json for backend operations. That creates a durable secret source that other local processes, plugins, or later workflows may access, making accidental disclosure or misuse more likely than transient in-memory handling.
### 安全红线
- Token 仅由 MCP 客户端放入 `Authorization: Bearer`,**不回显、不落文件(除 `mcp.json` 受信位置外)、不出现在任何报告/日志/截图**。
- 未拿到 Token 前,**只做只读分析,不调用任何写工具**(`save_ai_page` / FAQ 写入工具等)。
- 直连后端脚本(见文末)从 `mcp.json` 读 Token,保持单一数据源;仅可信本地环境使用。
## 前置要求(写操作前必做)
1. 已按上文「向用户索取 MCP 地址与访问 Token」完成索取、写入与连通性验证。
This line combines two risky behaviors: reading a bearer token from mcp.json and using it in a direct backend JSON-RPC path that bypasses host-side validation. Together, this enables a lower-friction route to authenticated write or delete actions outside normal guardrails, increasing the chance of unauthorized or insufficiently validated CMS changes.
JSON-LD 中的网址、Logo、图片地址必须是完整 URL(优先 `FnGetHost(1)` 拼接或 `FnGetCurrentUrl()`)。
## 直连后端提示
若宿主 `DeferExecuteTool` 的本地 ajv 校验因 `oneOf`/`coerceTypes` 误拦截带 `pageId` 的写工具(如 `save_ai_page`、`del_page`),可改用直连后端脚本(从 `mcp.json` 读 Token,POST JSON-RPC:`initialize` → `notifications/initialized` → `tools/call`)绕过宿主校验。仅在可信本地环境使用,且仍须遵守上述数据标签与真实数据红线。
## 写后验证
回写后:① 在 CMS 预览确认页面正常;② 重新 `analyze`(或 `validate` 对比基线)确认 GEO Score 提升、schema 类型出现、无模板绑定破坏。
The skill explicitly instructs network crawling, local file reads, and file writes, yet it declares no tool scope or permissions boundary. In an agent environment, that mismatch can enable broader-than-expected filesystem and network access, increasing the risk of unauthorized crawling, local data exposure, or unintended modification if the skill is invoked automatically.
The when_to_use field contains broad language like 'or any' related GEO-style diagnosis, which can cause the agent to invoke this skill for loosely related requests. Because the skill includes crawling, analysis, credential solicitation, and optional write-back behavior, overbroad triggering raises the chance of unnecessary external access or prompting users for sensitive MCP tokens outside the narrow intended use case.
The document specifies that industry classification is based on '12 个中文行业词库', which imposes a Chinese-language locale assumption in the skill's analysis criteria. The file does not indicate any user opt-in, alternative locale handling, or that the skill is limited to a China-specific deployment context.
Suspicious Unicode normalization or mixed-script content
The entire skill is written as mandatory operating guidance in Chinese, with no indication that users may choose another language or that the skill is limited to a Chinese-only compliance or regional context. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation.
The document explicitly instructs operators to bypass host-side validation by directly calling the backend JSON-RPC API when local AJV checks block write tools. Even if framed as a workaround for false validation failures, this defeats a security control boundary and can enable unsafe write or delete operations with less scrutiny, especially because the same section references destructive tooling such as page deletion.
The fetch function always sends an Accept-Language header preferring zh-CN, which imposes a specific locale without any user opt-in or documented justification. This is a natural-language locale policy issue because it can change site content selection and behavior based on a forced language preference.
The crawl function performs HTTP requests to arbitrary URLs and writes fetched HTML plus a manifest to disk, but this operation has no confirmation prompt, no user-facing disclosure at the point of action, and no warning comment/docstring describing the side effects. For a code file, these are safety-relevant operations because they affect external systems and local storage.
The natural-language instruction states that the skill is limited to Twig version 1.3 and imposes version-specific authoring constraints. This is a forced language/format constraint presented as a blanket rule, without offering a user choice or documenting why that constraint is required for all uses of the skill.