Back to skill

Security audit

Windows应用控制器

Security checks for vulnerabilities and agentic risk

Overview

This Windows GUI automation skill is broadly purpose-aligned, but it gives an agent high-impact desktop control with unsafe process-kill code and limited user-facing safeguards.

Review carefully before installing. Use it only in a controlled Windows session, avoid sensitive windows while screenshots are enabled, require explicit confirmation before clicks, form submissions, launches, or process termination, and replace the taskkill/os.system example with a safer subprocess or psutil implementation with validation and allowlists.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:62
Finding

Shell Command Injection in Process Termination Function

Content
View full analysis
bool: """ 关闭应用程序 示例: close_app("notepad.exe") """ import os os.system(f"taskkill /F /IM {process_name}") return True ``` ### Technical Analysis The `close_app` function directly interpolates `process_name` into a command passed to `os.system`. On Windows, `os.system` invokes the command interpreter, so shell metacharacters contained in `process_name` are interpreted as command syntax rather than as part of a literal process name. No validation, escaping, allowlisting, or argument separation is applied. If an untrusted caller can influence `process_name`, the caller can append an additional command using Windows command-shell operators. This converts an intended process-termination operation into arbitrary command execution. The function also always returns `True`, regardless of whether `taskkill` succeeds, which can conceal failed or manipulated execution. ### Attack Path 1. The skill or a generated automation script accepts a process name from an untrusted request, workflow variable, external record, or other attacker-influenced source. 2. The attacker supplies a value containing a valid process name followed by a command-shell control operator and an additional command. 3. The value is inserted without validation into: `taskkill /F /IM {process_name}` 4. `os.system` passes the constructed string to the Windows command interpreter. 5. The interpreter runs `taskkill` and then interprets and executes the appended command. 6. The injected command runs with the same user privileges and environmental access as the Python process executing the skill. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account running the automation ag ...[truncated 449 chars]
Remediation
View remediation
bool: if not re.fullmatch(r"[A-Za-z0-9._-]+\.exe", process_name): raise ValueError("Invalid process name") result = subprocess.run( ["taskkill", "/F", "/IM", process_name], shell=False, check=False, capture_output=True, text=True, ) return result.returncode == 0 ``` Apply the following additional controls: 1. Prefer `psutil` process APIs when possible, avoiding command-line construction entirely. 2. Validate process names against a strict syntax and, where practical, an explicit allowlist of applications the skill is authorized to terminate. 3. Never use `shell=True` or `os.system` with attacker-influenced values. 4. Return or log the real execution result instead of unconditionally reporting success. 5. Run the automation process with least privilege so a compromised operation has limited system access. 6. Require user confirmation before terminating security-sensitive, system, or unrelated processes. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:43
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill advertises opening/closing apps, clicking, filling forms, and taking screenshots without prominent warnings about destructive actions, privacy exposure, or unintended interactions. Because the skill controls the local desktop, missing warnings and guardrails materially increase the chance of harmful or privacy-invasive use.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented use of forced process termination via taskkill /F lacks any warning about unsaved data loss or service interruption. In a desktop-control skill, this makes harmful shutdowns easier and normalizes an irreversible action that can affect user applications or defensive software.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Using os.system with string interpolation to invoke taskkill introduces shell-command execution behavior and permits command injection if process_name is attacker-controlled. Even aside from injection, forced termination of arbitrary processes can disrupt security tools, destroy unsaved work, or interfere with system stability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill description and later prescribed output format are written to produce Chinese-language interaction by default, but the document does not state that language is optional or user-selected. This can violate language/locale policy when users have not opted into Chinese output.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The listed trigger phrases "控制应用 / 自动化Windows / GUI操作" are generic descriptions rather than narrowly scoped invocation terms. The document does not provide exclusion conditions, context limits, or negative examples to clarify when the skill should and should not activate.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill exposes arbitrary process execution through subprocess.Popen on a caller-supplied path, which allows launching any executable or script available to the host. In the context of an AI-invoked automation skill, this expands from GUI control into general code execution and could be abused to run malware, destructive tools, or credential-stealing programs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The screenshot features capture and save on-screen content without warning that sensitive information such as passwords, tokens, emails, or customer data may be recorded to disk or clipboard. In an automation skill with broad desktop access, that omission increases privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The output format section defines the generated report entirely in Chinese, implying a fixed locale for user-facing responses. There is no indication that the user can choose another language or that the Chinese-only format is required for a justified regional purpose.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.