T09 · Insecure Skill Coding Practices
- Location
scripts/driver_utils.py:54- Finding
Path Traversal Through Untrusted Driver Metadata
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it says, but it downloads driver packages and writes files using untrusted metadata without enough validation.
Review before installing. Use this only for intended UOS printer-driver downloads, prefer a controlled output directory, inspect driver_list.json if using the two-step flow, and verify any downloaded .deb through trusted vendor channels before installing it. Be aware that a compromised API response or edited cache file could cause unsafe file writes or save an untrusted package.
scripts/driver_utils.py:54Path Traversal Through Untrusted Driver Metadata
scripts/driver_utils.py:72Unvalidated Remote Download Target and Package Integrity
The skill metadata understates behavior by not clearly declaring local file writes such as creating driver_list.json, while the documented workflow involves persistent local state and package downloads. This mismatch can mislead users and reviewers about what the skill actually changes on disk, reducing informed consent and making it easier for unsafe side effects to go unnoticed.
The skill declares capabilities to search, download, and save files, but it does not declare any explicit tool scope or permissions for network access and local file read/write. That creates an authorization and transparency gap: an agent may perform network and filesystem actions the user or platform did not clearly approve, increasing the risk of unintended downloads or file creation.
This skill facilitates downloading executable software packages (.deb) onto the user's system but provides no explicit warning about the security risks of package installation, trust boundaries, or filesystem side effects. In context, package download functionality is inherently more dangerous than plain document download because users may later install the package, leading to code execution if the source, package integrity, or model matching is wrong.
The module docstring presents usage instructions entirely in Chinese, and the script's runtime messages are also Chinese-only. For a general-purpose utility, this is a natural-language policy issue because it imposes a specific language on users without opt-in or a documented regional justification.
This code file contains natural-language strings that force a specific language for usage instructions and user interaction. Under the policy, language constraints should either be optional for the user or clearly justified as region-specific; neither is present here.
The module docstring is written entirely in Chinese, and all user-facing messages throughout the file are also hard-coded in Chinese. This indicates a language constraint presented without any opt-in, locale selection, or documented region-specific justification, which matches the language/locale policy violation criteria.
The code takes a download URL from a remote API response and immediately performs a second request to that URL without validating the scheme, host, or expected file type. This creates a server-side request forgery / untrusted redirect style risk and also allows downloading arbitrary content from an attacker-controlled endpoint if the upstream API, network path, or response is compromised.
actual_url = result_data['data']['url']
file_resp = requests.get(actual_url, headers=headers, stream=True, timeout=60)
file_resp.raise_for_status()
filename = f"{package}_{version}_{arch}.deb"
The module docstring and all user-facing prompts are written only in Chinese, which imposes a specific language on users. Under the policy, locale or language constraints should be optional or clearly justified; this file provides neither an opt-in nor documentation that the skill is region-specific.