Back to skill

Security audit

Enable your openclaw to create mods for Stardew Valley

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/create_mod.py:32
Finding

Unrestricted Mod Name Allows Directory Traversal and File Overwrite

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/create_mod.py:76
Finding

Unescaped Metadata Enables Generated MSBuild and C Sharp Injection

Content
View full analysis
net8.0 {mod_name} {author}.{mod_name} 1.0.0 {game_dll_path} False {game_dll_path.replace('Stardew Valley.dll', 'smapi-internal/StardewModdingAPI.dll')} False ''' with open(os.path.join(mod_dir, f"{mod_name}.csproj"), 'w') as f: f.write(csproj) # ModEntry.cs mod_entry = f'''using StardewModdingAPI; using StardewValley; namespace {author}.{mod_name} {{ public class ModEntry : Mod {{ public override void Entry(IModHelper helper) {{ helper.Events.GameLoop.DayStarted += OnDayStarted; this.Monitor.Log("{mod_name} 已加载!", LogLevel.Info); }} private void OnDayStarted(object sender, DayStartedEventArgs e) {{ // 在这里编写 Mod 逻辑 }} }} }}''' with open(os.path.join(mod_dir, "ModEntry.cs"), 'w') as f: f.write(mod_entry) ``` The values are accepted directly from command-line arguments: ```python mod_name = sys.argv[1] author = sys.argv[2] user_request = sys.argv[3] if len(sys.argv) > 3 else "" ``` The script then recommends building the generated project: ...[truncated 2864 chars]
Remediation
View remediation
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/check_tools.py (reported line 13)May include surrounding context.

python
"""检查命令是否存在"""
    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:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.