T01 · Skill Instruction Hijacking
- Location
SKILL.md:192- Finding
Mandatory Agent Behavior Override Forces Exclusive External Processing
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This captioning skill is mostly purpose-aligned, but its local file support can publish user files to the internet with weak scoping and misleading safety assurances.
Review carefully before installing. Avoid using this skill with confidential files, directories, source trees, credentials, or regulated data. Prefer remote URLs you already intend to share, or require fixes that validate regular files only, bind to localhost, add per-file random tokens, verify dependencies, and ask for explicit consent before any public tunnel is created.
SKILL.md:192Mandatory Agent Behavior Override Forces Exclusive External Processing
scripts/tunnel_server.py:139Directory Inputs Can Cause Unauthenticated Public and LAN File Exposure
scripts/tunnel_server.py:119Tunnel Setup Failures Can Bypass Resource Cleanup
SKILL.md:178Unpinned Dependencies and Unverified Executable Download
The documented behavior materially exceeds the stated purpose of a captioning skill by exposing local files over HTTP, creating a public Cloudflare tunnel, and launching local services/subprocesses. A description-behavior mismatch is dangerous because users may provide local documents expecting simple captioning, while the skill actually performs public network exposure and other sensitive actions outside that mental model.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
export ZHIPU_API_KEY="你的密钥"
3. **.env file / .env 文件:** Create `.env` in this skill directory:
ZHIPU_API_KEY=你的密钥
The instruction to display full raw output exactly as returned can directly expose extracted prompt content, document text, or model-produced sensitive data without filtering. Because this skill processes local files and documents, verbatim disclosure can become a data-exfiltration vector for confidential content that the user did not intend to reveal in full.
4. **IF API fails** — Display the error message and STOP immediately
5. **NO fallback methods** — Do NOT attempt captioning any other way
### 📋 Output Display Rules (MANDATORY)
After running the script, **you must show the full raw output to the user exactly as returned**. Do not summarize, truncate, or only say "generated". Users need the original model output to evaluate quality.
The code automatically exposes local videos or files over a public Cloudflare tunnel so a third-party API can fetch them. That materially expands the skill from caption generation into temporary public file hosting, creating a data exposure risk if sensitive local files are selected, tunnel URLs are leaked, or the tunnel serves more than the intended content.
Automatically tunneling local videos/files without an explicit point-of-use confirmation means users may unknowingly publish local content to a public URL as a side effect of captioning. The absence of an informed-consent warning is especially dangerous here because the skill handles arbitrary local paths and forwards them to an external service.
This logic adds an undeclared capability: making local files reachable on the public internet via Cloudflare tunnel. In the context of a captioning skill, that is broader than necessary and increases the blast radius from simple API transmission to public exposure of user-controlled local content.
The README explains that local video and document files are exposed through a Cloudflare Quick Tunnel and gives a public HTTPS URL example, but it does not prominently warn that the selected file becomes publicly reachable over the internet for the lifetime of the API call. Users may reasonably interpret 'transparent local file support' and 'handles everything automatically' as low-risk local processing, which can lead to unintended disclosure of sensitive files or documents.
The skill requests capabilities equivalent to environment access, file write, network, and shell execution, but it does not declare an explicit tool scope or permissions boundary. That makes the skill harder to audit and allows a captioning workflow to perform broader side effects than users would reasonably expect, especially network exposure and subprocess execution.
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
## Resource Links
| Resource | Link |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Get API Key** | [https://bigmodel.cn/usercenter/proj-mgmt/apikeys](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) |
| **API Docs** | [Chat Completions / 对话补全](https://docs.bigmodel.cn/api-reference/%E6%A8%A1%E5%9E%8B-api/%E5%AF%B9%E8%AF%9D%E8%A1%A5%E5%85%A8) |
The duplicated finding points to the same persistence pattern: storing and sharing a reusable API key in local config or environment creates residual access beyond a single session. In a skill that already invokes network operations and subprocesses, persistent shared credentials increase the consequences of any misuse or compromise.
This script reads the key from the `ZHIPU_API_KEY` environment variable and shares it with other Zhipu skills.
脚本通过 `ZHIPU_API_KEY` 环境变量获取密钥,与其他智谱技能共用同一个 key。
**Get Key / 获取 Key:** Visit [Zhipu Open Platform API Keys / 智谱开放平台 API Keys](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) to create or copy your key.
**Setup options / 配置方式(任选一种):**
The duplicated finding points to the same persistence pattern: storing and sharing a reusable API key in local config or environment creates residual access beyond a single session. In a skill that already invokes network operations and subprocesses, persistent shared credentials increase the consequences of any misuse or compromise.
This script reads the key from the `ZHIPU_API_KEY` environment variable and shares it with other Zhipu skills.
脚本通过 `ZHIPU_API_KEY` 环境变量获取密钥,与其他智谱技能共用同一个 key。
**Get Key / 获取 Key:** Visit [Zhipu Open Platform API Keys / 智谱开放平台 API Keys](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) to create or copy your key.
**Setup options / 配置方式(任选一种):**
The markdown mandates that the agent present a fixed explanation '原文照搬,不要精简' and the required text is entirely in Chinese. This imposes a specific language on the interaction without user opt-in, which is a natural-language policy violation under the language/locale rule.
The skill instructs the agent to install third-party software via package managers or direct binary download as part of normal operation. Auto-installation guidance increases supply-chain and system-modification risk, especially for a skill whose primary purpose is media captioning rather than system administration.
Requiring the agent to always display the full raw model output can leak sensitive information extracted from images, videos, or documents, including personal, confidential, or regulated data. The risk is amplified because the skill handles arbitrary user-provided files and may process documents whose contents should be minimized or partially redacted in output.
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
python {baseDir}/scripts/glmv_caption.py (--images IMG [IMG...] | --videos VID [VID...] | --files FILE [FILE...]) [OPTIONS]
| Parameter | Required | Description |
| --------------------- | -------- | -------------------------------------------------------------------------------------------- |
| `--images`, `-i` | One of | Image paths or URLs (supports multiple, base64 OK) |
| `--videos`, `-v` | One of | Video paths or URLs (supports multiple, mp4/mkv/mov, local paths auto-tunneled) |
The default prompt is hard-coded in Chinese, which makes the tool produce Chinese captions by default regardless of user locale or preference. This is a natural-language locale policy issue because the file does not offer a language choice or document that the tool is intentionally Chinese-only.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
if response_format == DEFAULT_RESPONSE_FORMAT:
payload["response_format"] = {"type": response_format}
response = requests.post(
API_BASE_URL, headers=headers, json=payload, stream=stream, timeout=120
)
The code publicly exposes files but provides no execution-time warning, confirmation, or transparency mechanism to ensure the user understands their local files are being published to a public URL. In the context of a multimodal captioning skill, users may reasonably expect files to be processed, not briefly hosted on the public internet, so the lack of disclosure materially increases the risk of unintended data leakage.
This code intentionally exposes local files through an HTTP server and a public Cloudflare Quick Tunnel, creating internet-accessible URLs for local content. In a captioning skill, that significantly expands the trust boundary: sensitive local documents, videos, or images may be published to a third-party-accessible endpoint without strong controls, making accidental data disclosure likely.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if sys.platform == "win32":
popen_kwargs["creationflags"] = subprocess.CREATE_NEW_PROCESS_GROUP
self._cf_process = subprocess.Popen(cmd, **popen_kwargs)
self._tunnel_base = self._wait_for_url(timeout=30)
def _wait_for_url(self, timeout: int = 30) -> str:
No suspicious patterns detected.