T09 · Insecure Skill Coding Practices
- Location
scripts/download_results.py:31- Finding
Unrestricted URL Retrieval Enables SSRF and Local File Access
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent LibTV media-generation integration, but its download and upload helpers are too loosely scoped and could fetch, write, or upload more than users expect.
Review this skill before installing. It needs a LibTV access key and sends prompts, selected local media files, and session requests to the configured LibTV endpoint. Use it only with a trusted OPENAPI_IM_BASE/IM_BASE_URL, avoid arbitrary --urls and path-like --prefix values, and confirm any local file path before upload because the script's media and size checks are weak.
scripts/download_results.py:31Unrestricted URL Retrieval Enables SSRF and Local File Access
scripts/download_results.py:95Output Path Traversal Through an Unsanitized Filename Prefix
scripts/upload_file.py:25Fail-Open Upload Validation Allows Non-Media and Oversized Files
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers=_headers(),
)
try:
with urllib.request.urlopen(req, timeout=30) as resp:
return json.loads(resp.read().decode("utf-8"))
except urllib.error.HTTPError as e:
err_body = e.read().decode("utf-8") if e.fp else ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers=_headers(),
)
try:
with urllib.request.urlopen(req, timeout=30) as resp:
return json.loads(resp.read().decode("utf-8"))
except urllib.error.HTTPError as e:
err_body = e.read().decode("utf-8") if e.fp else ""
The skill instructs batch downloading generated media to the local filesystem, including direct URL-based downloads, but this local write behavior is not clearly surfaced in the top-level declared purpose. Hidden or under-declared file writes are dangerous because they can surprise users, persist untrusted remote content locally, and expand the blast radius from simple chat automation into disk-modifying behavior.
The skill instructs batch downloading generated media to the local filesystem, including direct URL-based downloads, but this local write behavior is not clearly surfaced in the top-level declared purpose. Hidden or under-declared file writes are dangerous because they can surprise users, persist untrusted remote content locally, and expand the blast radius from simple chat automation into disk-modifying behavior.
The skill instructs batch downloading generated media to the local filesystem, including direct URL-based downloads, but this local write behavior is not clearly surfaced in the top-level declared purpose. Hidden or under-declared file writes are dangerous because they can surprise users, persist untrusted remote content locally, and expand the blast radius from simple chat automation into disk-modifying behavior.
The skill instructs batch downloading generated media to the local filesystem, including direct URL-based downloads, but this local write behavior is not clearly surfaced in the top-level declared purpose. Hidden or under-declared file writes are dangerous because they can surprise users, persist untrusted remote content locally, and expand the blast radius from simple chat automation into disk-modifying behavior.
The skill instructs batch downloading generated media to the local filesystem, including direct URL-based downloads, but this local write behavior is not clearly surfaced in the top-level declared purpose. Hidden or under-declared file writes are dangerous because they can surprise users, persist untrusted remote content locally, and expand the blast radius from simple chat automation into disk-modifying behavior.
The activation rule is extremely broad and mandates triggering for nearly any AI image/video-related request, including loosely related mentions like uploads or progress checks. Over-broad triggering is dangerous because it can cause the agent to invoke networked actions, file uploads, session creation, or downstream processing in situations where the user did not clearly intend to use this external service, leading to privacy leaks, unnecessary external data transfer, and loss of user control.
The skill requires environment access, network access, and likely additional execution capabilities, but does not declare an explicit tool scope such as allowed-tools or permissions. This weakens containment and review because the runtime can perform sensitive actions without a clearly bounded capability contract, increasing the chance of unintended data access or outbound requests.
The skill instructs automatic downloading of generated results to local storage without explicit user warning or consent at the moment of write. Automatic disk writes are risky because they persist potentially untrusted content, may consume storage, and can violate user expectations or policy in environments where filesystem writes require explicit approval.
This script exposes project-switching functionality that is not described by the skill's manifest, which states the skill is for AI image/video generation and editing workflows. Hidden or undocumented state-changing capabilities can let the skill alter the user's active project context unexpectedly, increasing the risk of cross-project confusion, unauthorized actions in the wrong workspace, or abuse if the agent invokes it without clear user consent.
The module docstring and CLI help text are entirely in Chinese, which imposes a specific language on users without opt-in or explanation. Under the stated policy, hardcoded locale/language constraints should either offer user choice or be clearly justified as region-specific.
The docstring, CLI description, examples, and help text are presented only in Chinese. The policy for this audit flags language/locale constraints when a skill forces a specific language without user opt-in, and this file does not offer an alternative language or explain that it is intentionally region-specific.
The module docstring is entirely in Chinese and the command-line help text throughout the script is also Chinese-only, which imposes a specific language on users. The policy allows locale constraints only when they are optional, user-selected, or clearly justified as region-specific, none of which is stated here.
The script performs a network-backed session query via query_session(...), and the help text indicates it uses the LIBTV_ACCESS_KEY bearer credential. While the CLI describes required environment variables, it does not explicitly warn the user that the command will transmit authentication and request data to a remote service when run.
No suspicious patterns detected.