T09 · Insecure Skill Coding Practices
- Location
scripts/create_mod.py:32- Finding
Unrestricted Mod Name Allows Directory Traversal and File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a Stardew Valley mod helper, but its project generator can write outside the intended folder and can embed untrusted names into build/source files in ways that may execute code when built.
Review this skill carefully before installing. It appears intended for Stardew Valley mod creation and does not show hidden exfiltration or persistence, but do not run its project generator with mod names or author names supplied by someone else. Use simple identifier-style names only, inspect generated .csproj and .cs files before building, and avoid overwriting existing folders until the script adds path containment and metadata escaping.
scripts/create_mod.py:32Unrestricted Mod Name Allows Directory Traversal and File Overwrite
scripts/create_mod.py:76Unescaped Metadata Enables Generated MSBuild and C Sharp Injection
The skill includes shell and file-oriented operational guidance (for example python3, dotnet build, and file path manipulation) but declares no explicit tool scope or permissions boundary. That creates an authorization gap where an agent may infer it is allowed to execute commands or access files more broadly than intended, increasing the chance of unsafe command execution or unintended filesystem access.
The manifest description and title are written as a Chinese-language assistant for Stardew Valley mod creation, with no indication that other languages are supported or that the user can choose their preferred language. Under the policy for natural-language behavior, forcing a specific language without opt-in is a reportable locale-policy issue.
This Python file contains its docstring, comments, and all user-facing print messages in Chinese, which effectively forces a specific language for users. Under the policy rule, this is a natural-language locale constraint without opt-in or justification that the skill is only for a Chinese-speaking audience.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"""检查命令是否存在"""
if shutil.which(cmd):
try:
result = subprocess.run([cmd, '--version'], capture_output=True, text=True, timeout=5)
version = result.stdout.split('\n')[0] if result.stdout else "已安装"
return True, version
except:
The file’s natural-language interface is written in Chinese, including the module description and all user-facing CLI messages elsewhere in the script, with no opt-in or locale selection. This can violate language/locale policy where skills must not force a specific language on users without choice or clear justification.
The string literal logged to users is fixed in Chinese ('已加载!'). This imposes a specific language in a reusable template without any user opt-in or localization mechanism, which matches the language/locale policy violation criteria.
The entire reference is written in Chinese and does not indicate that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.
This code's docstring and all user-facing messages are written only in Chinese, which imposes a specific language on users without offering any language choice or documenting a locale-specific constraint. That matches the policy category for language/locale restrictions in natural-language content.
No suspicious patterns detected.