Back to skill

Security audit

General Software Automation

Security checks for vulnerabilities and agentic risk

Overview

This is a broad automation skill with purpose-aligned scripts, but its GUI and batch-file powers are under-scoped and include unsafe behaviors that can leak typed text or move/overwrite files.

Install only if you are comfortable reviewing each automation run before execution. Avoid using it for passwords or secrets, run batch renames in a test directory first, keep the default preview mode until the plan is verified, and do not run JSON GUI scripts from untrusted sources.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/batch_rename.py:28
Finding

Path Traversal in Batch Rename Destination

Content
View full analysis

Vulnerability Details

File Location: scripts/batch_rename.py, lines 28–47
Vulnerability Type: Unvalidated destination path / path traversal
Risk Level: High

Vulnerable Code

python
if regex:
    try:
        new_name = re.sub(pattern, replacement, old_name)
    except re.error as e:
        print(f"[ERROR] Regular expression error: {e}")
        continue
else:
    new_name = old_name.replace(pattern, replacement)

if new_name == old_name:
    skipped.append(old_name)
    continue

new_path = f.parent / new_name
if preview:
    print(f"  Preview: {old_name} → {new_name}")
else:
    if new_path.exists():
        print(f"[SKIP] Destination already exists: {new_name}")
        skipped.append(old_name)
        continue
    f.rename(new_path)

Technical Analysis

The replacement value is controlled through command-line arguments and is used to construct new_path without ensuring that the resulting value is a simple filename. A replacement can contain parent-directory components such as ../, directory separators, or an absolute path.

With pathlib, joining a parent path with an absolute second operand produces the absolute path itself. Relative traversal components can similarly resolve outside f.parent. When execution mode is enabled, f.rename(new_path) therefore permits moving a selected source file outside the directory the user intended to process.

The existing destination check prevents replacement of an existing target in this function, but it does not stop relocation to a new attacker-selected path.

Attack Path

  1. An attacker or untrusted automation configuration supplies a crafted replacement containing ../ components or an absolute path.
  2. A user or agent invokes the replace command with --execute.
  3. The script derives new_name from the untrusted replacement.
  4. f.parent / new_name resolves outside the selected directory.
  5. `f. ...[truncated 581 chars]
Remediation
View remediation

Remediation Suggestions

Treat the generated value strictly as a filename rather than a path:

  • Reject absolute paths.
  • Reject /, \, empty names, . and ...
  • Verify that Path(new_name).name == new_name.
  • Resolve the destination and confirm that its parent is exactly the resolved source directory.
  • Refuse execution if containment validation fails.
  • Consider a restrictive allowlist for characters permitted in generated filenames.
  • Add tests covering absolute paths, nested paths, ../ traversal, Windows drive paths, UNC paths, and mixed separators.

Example containment validation:

python
candidate = Path(new_name)
if candidate.is_absolute() or candidate.name != new_name or new_name in {".", ".."}:
    raise ValueError("Replacement must produce a plain filename")

parent = f.parent.resolve()
new_path = (parent / new_name).resolve()
if new_path.parent != parent:
    raise ValueError("Destination escapes the source directory")

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/batch_rename.py:72
Finding

Existing File Can Be Overwritten by Sequence-Rename Fallback

Content
View full analysis

Vulnerability Details

File Location: scripts/batch_rename.py, lines 72–76
Vulnerability Type: Unsafe file overwrite
Risk Level: Medium

Vulnerable Code

python
if new_path.exists() and new_path != f:
    new_name = f"{prefix}{i:03d}{suffix}_{new_ext}"
    new_path = f.parent / new_name
f.rename(new_path)
print(f"  Renamed: {old_name} → {new_name}")

Technical Analysis

When the primary sequence destination already exists, the script generates one fallback destination. It does not check whether that fallback also exists before calling Path.rename().

On operating systems where rename operations replace an existing destination, including common Unix-like environments, the fallback operation can overwrite and destroy an unrelated existing file. The destination can also be influenced through the command-line prefix, suffix, extension, and starting sequence number.

A single fallback attempt is not a safe collision-resolution strategy. Batch renaming also benefits from a two-phase design because names created earlier in the same operation can collide with names required later.

Attack Path

  1. A directory contains a source file and files occupying both its calculated primary destination and calculated fallback destination.
  2. The user or agent invokes seq --execute with parameters that produce those names.
  3. The primary destination check detects the first collision.
  4. The script switches to the fallback destination.
  5. The fallback is not checked for existence.
  6. On a platform with replacement semantics, f.rename(new_path) overwrites the existing fallback file.

Impact Assessment

This issue can permanently destroy an existing file in the processed directory. It does not grant additional system privileges, and its scope is limited by the permissions of the running process. However, every writable file matching a generated fallback name is potentially affected, making acci ...[truncated 53 chars]

Remediation
View remediation

Remediation Suggestions

  • Never overwrite existing files by default.
  • Recheck every generated fallback destination before renaming.
  • Generate unique names in a bounded loop or abort with a clear collision error.
  • Build and validate the complete source-to-destination plan before changing any files.
  • Use a two-phase rename through securely generated temporary names to prevent collisions among files in the same batch.
  • Provide an explicit overwrite option only if required, accompanied by a clear warning and confirmation.
  • Add tests in which both primary and multiple fallback names already exist.

Example safe behavior:

python
if new_path.exists() and new_path != f:
    raise FileExistsError(f"Refusing to overwrite existing file: {new_path}")
f.rename(new_path)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/gui_auto.py:59
Finding

Sensitive GUI Input Is Disclosed Through Standard Output

Content
View full analysis

Vulnerability Details

File Location: scripts/gui_auto.py, lines 59–61
Vulnerability Type: Plaintext sensitive-data exposure in logs
Risk Level: Medium

Vulnerable Code

python
def type_text(text, interval=0.05):
    pa.typewrite(text, interval=interval)
    print(f"[OK] Input text: {text[:20]}...")

Technical Analysis

The GUI automation utility prints the first 20 characters of every value entered through type_text. This function can be reached directly through the type command and through a JSON automation script using a type_text action.

Form automation commonly handles passwords, API tokens, personal information, recovery codes, and other confidential values. Printing a prefix is not meaningful redaction: many passwords and tokens are no longer than 20 characters, and even a partial token may reveal identifying or security-sensitive information.

Standard output may be retained in terminal captures, CI logs, agent transcripts, monitoring systems, or redirected files. Those records can have a wider readership and longer retention period than the target GUI application.

Attack Path

  1. A user or automation file supplies a password, token, or other secret to type_text.
  2. PyAutoGUI enters the value into the active GUI control.
  3. The function prints up to the first 20 characters of the same value.
  4. The output is captured by a terminal logger, orchestration system, CI job, or agent transcript.
  5. A person or service with access to those logs retrieves the disclosed secret or secret prefix.

Impact Assessment

The vulnerability can expose credentials and confidential form data to any principal able to read the process output or retained logs. It does not independently obtain elevated privileges, but leaked credentials may subsequently enable access to the account or application associated with the entered value. The exact downstream scope depends on the sensitivity and a ...[truncated 32 chars]

Remediation
View remediation

Remediation Suggestions

  • Never log the content or prefix of text entered into GUI controls.
  • Log only a fixed redacted marker or, if operationally necessary, the input length.
  • Add an explicit sensitive-input action whose value is obtained from a protected source such as an environment variable or secret manager.
  • Ensure JSON automation files do not store secrets in plaintext.
  • Review existing execution logs and transcripts for previously exposed values and rotate affected credentials.
  • Document that debug logging must not reveal user-provided form data.

A safe implementation would be:

python
def type_text(text, interval=0.05):
    pa.typewrite(text, interval=interval)
    print(f"[OK] Input text: [REDACTED], length={len(text)}")
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises capabilities involving file handling, log collection, screenshots, software installation, and configuration changes, but it declares no explicit tool scope or permission boundaries. That creates an authorization ambiguity where an agent may apply file-read or related capabilities more broadly than the user expects, increasing the chance of unintended access to sensitive files or system data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger description is extremely broad and covers common actions like window operations, file handling, installation, configuration, logging, and screenshots. Overbroad routing can cause this high-privilege automation skill to activate for many generic requests, increasing the risk of destructive actions, privacy-invasive collection, or unintended system modifications being performed under an inappropriately matched skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill describes operations that can delete, overwrite, expose, or collect sensitive data—such as batch file processing, silent installs, registry/config changes, log collection, and screenshots—but it does not provide clear warnings about these risks. In this context, missing safety warnings materially increases the chance that a user or agent will execute destructive or privacy-impacting actions without informed consent or adequate safeguards.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains natural-language docstrings, argument descriptions, and console output exclusively in Chinese, which effectively forces a specific language for all users. The file does not provide any opt-in, alternate locale, or explanation that the tool is intended only for a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This script exposes powerful GUI automation primitives and a JSON-driven runner that can click, type, press hotkeys, drag, and take screenshots without any confirmation, allowlist, safety interlock, or foreground-window validation. In the context of an automation skill, that makes unintended or maliciously supplied inputs capable of triggering destructive user-interface actions, data entry into the wrong window, or screen capture of sensitive information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The natural-language description and usage guidance are written entirely in Chinese, while the skill name is English and there is no statement that the skill is intended only for a Chinese-speaking audience or region. This can violate language/locale policy expectations when users are not given an explicit language choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

Natural-language strings in the module description, CLI help text, and runtime messages are consistently Chinese-only, which imposes a locale choice on users. There is no indication that the tool is intentionally region-specific or that users can opt into another language.

Content

No source excerpt is available for this finding.