Back to skill

Security audit

cae-skill

Security checks for vulnerabilities and agentic risk

Overview

This Windows CAE automation skill does what it says, but it exposes broad local executable-launch and force-close behavior with weak safeguards.

Review this skill before installing. It should only be used in a trusted local CAE workstation workflow, with trusted config.json files and trusted executable paths. Avoid opening Abaqus .py or .jnl files unless you intend to execute them, and require user confirmation before force-closing applications or saving new executable paths.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
skill_runner.py:38
Finding

Caller-Controlled Configuration Enables Arbitrary Local Executable Launch and Process Termination

Content
View full analysis
Dict[str, Any]: if no ...[truncated 4035 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
cae_launcher.py:347
Finding

Opening Abaqus Python or Journal Files Executes Their Contents Without Explicit Confirmation

Content
View full analysis
List[str]: app = app.lower() ext = os.path.splitext(file_path)[1].lower() if app == "abaqus": if ext == ".cae": return ["cmd", "/k", "abaqus", "cae", f"database={file_path}"] if ext == ".odb": return ["cmd", "/k", "abaqus", "viewer", f"database={file_path}"] if ext in {".jnl", ".py"}: return ["cmd", "/k", "abaqus", "cae", f"script={file_path}"] ``` `cae_launcher.py:482-489` executes the resulting command: ```python if app == "abaqus": p = subprocess.Popen( command, creationflags=subprocess.CREATE_NEW_CONSOLE ) else: p = subprocess.Popen(command, shell=False) ``` ### Technical Analysis The `open_file_in_app` action suggests a document-opening operation. For Abaqus `.py` and `.jnl` files, however, the implementation passes `script=` to Abaqus CAE. This causes script contents to execute in the Abaqus scripting environment. Input validation checks only whether the path exists and whether its suffix is in the allowed extension set. It does not establish the script's origin, restrict it to a trusted directory, inspect its contents, or obtain explicit confirmation that code execution is intended. This is not a conventional shell-injection issue because the command is supplied as an argument list. The vulnerability is semantic: untrusted content is deliberately handed to an interpreter through an operation documented and named as o ...[truncated 1082 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Error
Location
cae_launcher.py:329
Finding

Bare Abaqus Command Resolution Allows Local Tool Spoofing

Content
View full analysis
List[str]: app = app.lower() if app == "abaqus": return ["cmd", "/k", "abaqus", "cae"] if app == "ansys": return [exe_path] if app == "ansa": return [exe_path] if app == "hyperworks": return [exe_path] return [exe_path] def build_open_file_command(app: str, exe_path: str, file_path: str) -> List[str]: app = app.lower() ext = os.path.splitext(file_path)[1].lower() if app == "abaqus": if ext == ".cae": return ["cmd", "/k", "abaqus", "cae", f"database={file_path}"] if ext == ".odb": return ["cmd", "/k", "abaqus", "viewer", f"database={file_path}"] if ext in {".jnl", ".py"}: return ["cmd", "/k", "abaqus", "cae", f"script={file_path}"] ``` `cae_launcher.py:400-405` executes the command: ```python if app == "abaqus": p = subprocess.Popen( command, creationflags=subprocess.CREATE_NEW_CONSOLE ) ``` The same execution pattern is used by `open_file_in_app` at `cae_launcher.py:482-487`: ```python if app == "abaqus": p = subprocess.Popen( command, creationflags=subprocess.CREATE_NEW_CONSOLE ) ``` ### Technical Analysis Unlike the other supported applications, Abaqus does not use a verified absolute executable path. Instead, the Skill starts `cmd.exe` and asks it to resolve the bare name `abaqus`. Windows command resolution can search locations including the current working directory and entries in the process environment's `PATH`. An attacker who can place a malicious `abaqus.bat`, `abaqus.cmd`, or executable in a location searched ...[truncated 1450 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 (12)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill explicitly controls local Windows applications, opens arbitrary files, and saves executable paths, which implies shell execution plus file read/write behavior, yet it declares no tool scope or permission boundaries. Without an explicit allowlist of tools and operations, an agent runtime may grant broader-than-necessary capabilities, increasing the chance of unauthorized process execution, unsafe file access, or misuse of user-supplied paths.

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 · cae_launcher.py (reported line 118)May include surrounding context.

python
def _tasklist_output() -> str:
    try:
        return subprocess.check_output(
            ["tasklist"],
            text=True,
            encoding="gbk",

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 · cae_launcher.py (reported line 125)May include surrounding context.

python
errors="ignore"
        ).lower()
    except Exception:
        return subprocess.check_output(
            ["tasklist"],
            text=True,
            encoding="utf-8",

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 · cae_launcher.py (reported line 402)May include surrounding context.

python
try:
        if app == "abaqus":
            p = subprocess.Popen(
                command,
                creationflags=subprocess.CREATE_NEW_CONSOLE
            )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

This call executes exe_path obtained from configuration or user-saved paths, so a user-controlled or tampered config can cause arbitrary local executables to be launched. In the context of an agent skill that accepts and persists executable paths, this becomes a straightforward arbitrary code execution primitive under the agent's privileges.

Content

Scanner excerpt · cae_launcher.py (reported line 407)May include surrounding context.

python
creationflags=subprocess.CREATE_NEW_CONSOLE
            )
        else:
            p = subprocess.Popen(command, shell=False)

        return ok(
            message=f"{app} 已启动",

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
90% confidence
Finding

Although the Abaqus command is tokenized, it appends user-supplied file paths as command arguments to an external interpreter-style launcher (cmd /k abaqus ...). This can be dangerous because opening script-capable file types such as .py and .jnl may trigger execution of attacker-controlled content in the CAE application, turning file-open into code execution.

Content

Scanner excerpt · cae_launcher.py (reported line 484)May include surrounding context.

python
command = build_open_file_command(app, exe_path, file_path)

        if app == "abaqus":
            p = subprocess.Popen(
                command,
                creationflags=subprocess.CREATE_NEW_CONSOLE
            )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

This call runs a configured executable path and passes a user-provided file path to it. In this skill, both the executable path and the opened document can be attacker-influenced, so the function can be abused to execute an arbitrary program or to feed a malicious project/script file into a trusted CAE application that may process active content.

Content

Scanner excerpt · cae_launcher.py (reported line 489)May include surrounding context.

python
creationflags=subprocess.CREATE_NEW_CONSOLE
            )
        else:
            p = subprocess.Popen(command, shell=False)

        return ok(
            message=f"已使用 {app} 打开文件",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill can force-kill configured application processes, including with /F, without any built-in confirmation, save prompt handling, or user-facing warning. In a CAE workflow this can cause loss of unsaved engineering work and can be abused by a caller to disrupt local applications, making the automation context more dangerous than a normal helper utility.

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 · cae_launcher.py (reported line 548)May include surrounding context.

python
cmd.append("/F")

        try:
            result = subprocess.run(
                cmd,
                capture_output=True,
                text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The close_app branch passes force=args.get("force", True), which defaults to forceful application termination. This is a potentially destructive action that may cause unsaved work to be lost, but the file provides no confirmation prompt, warning message, or explanatory comment/docstring disclosing that behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

User-facing status and error messages throughout the file are written exclusively in Chinese, such as configuration, launch, and failure messages. This imposes a language choice without any visible opt-in or fallback, which is a natural-language locale policy concern under the stated rules.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The unknown-skill error message uses the Chinese text '未知 skill' directly, which forces a specific language in user-facing output. There is no indication that the skill is region-specific or that users can opt into this locale.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.