T09 · Insecure Skill Coding Practices
- Location
scripts/search_tool.py:215- Finding
Unbounded Archive Extraction and Legacy TAR Path Escape
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This local text-search skill is mostly purpose-aligned, but its archive extraction can create local safety risks when scanning untrusted archives.
Install only if you need recursive local text search and understand that matching content is saved to local result files. Avoid using it on untrusted archives or very large archive collections unless you run it in a restricted environment with storage limits, and prefer pinned dependencies in a virtual environment.
scripts/search_tool.py:215Unbounded Archive Extraction and Legacy TAR Path Escape
SKILL.md:74Unpinned Third-Party Archive Dependencies
Without declared permissions the skill's intent is opaque and cannot be validated.
The skill title and operational instructions are presented in Chinese, but the file does not indicate that language is optional or user-selected. This can violate a language/locale policy when the skill implicitly forces one language without opt-in.
The phrase "任何需要在文件/压缩包中批量搜索字符串或正则的请求" is a broad catch-all that does not clearly bound when the skill should or should not activate. Without exclusions or negative examples, it could overlap with many general file-analysis requests and cause unintended invocation.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
RAR 所需系统工具:
- **Windows**:下载 unrar.exe → https://www.rarlab.com/rar_add.htm
- **macOS**:`brew install unrar`
- **Linux**:`sudo apt install unrar`
若用户未安装上述依赖,脚本会给出友好提示,ZIP/TAR 等格式不受影响仍可正常使用。
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
RAR 所需系统工具:
- **Windows**:下载 unrar.exe → https://www.rarlab.com/rar_add.htm
- **macOS**:`brew install unrar`
- **Linux**:`sudo apt install unrar`
若用户未安装上述依赖,脚本会给出友好提示,ZIP/TAR 等格式不受影响仍可正常使用。
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
RAR 所需系统工具:
- **Windows**:下载 unrar.exe → https://www.rarlab.com/rar_add.htm
- **macOS**:`brew install unrar`
- **Linux**:`sudo apt install unrar`
若用户未安装上述依赖,脚本会给出友好提示,ZIP/TAR 等格式不受影响仍可正常使用。
The script advertises recursive search through logs, configs, and archives while also writing matching lines to a local result file, but does not prominently warn that matched contents may be stored persistently. Because the searched sources commonly contain credentials, tokens, personal data, or incident artifacts, this behavior can create a secondary sensitive-data repository.
RAR handling relies on the external unrar utility via the rarfile library, introducing execution of a system binary that is not obvious from the skill description. This expands the attack surface because archive parsing is delegated to an external program, which may have its own vulnerabilities or unsafe behaviors when processing attacker-controlled archives.
The natural-language documentation and user-facing prompts are entirely in Chinese, and the script provides no language or locale choice. This creates a locale-policy issue because the skill imposes a specific language on all users without opt-in or documented regional justification.
The tool persists matched file contents to disk by default, which can unintentionally store sensitive data from searched files such as logs, configs, or secrets. In a directory-search skill, this increases data exposure beyond the immediate search task, especially if users do not expect content to be retained in a local results file.