Back to skill

Security audit

AIButton

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its button-widget packaging purpose, but generated widgets use under-scoped cross-window control messaging and the packaging workflow uses unsafe temporary-file cleanup.

Review before installing or using this skill for deployed controls. It is not showing deception or exfiltration, but generated buttons should restrict trusted parent origins and validate messages, and the packaging commands should use mktemp-style staging and guarded cleanup instead of predictable /tmp paths and raw rm -rf.

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

Error
Location
SKILL.md:130
Finding

Unrestricted Cross-Origin Communication Allows Forged Control Messages

Content
View full analysis
` identifier and Boolean state are disclosed to that page. This pattern is presented as mandatory generated code and is repeated later in the Skill, making it likely that every generated widget will inherit the vulnerability. ### Attack Path 1. An attacker hosts a web page under an attacker-controlled ori ...[truncated 1155 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:311
Finding

Predictable Shared Temporary Directory Enables Local Race and File-Tampering Attacks

Content
View full analysis
/dev/null && echo "✓ aiui.json 格式正确" || { echo "✗ aiui.json 格式错误"; rm -rf /tmp/button_${MD5}; exit 1; } # 打包(包含子文件夹) cd /tmp/button_${MD5} && zip -r ~/Desktop/VNAIButton/控件名_${MD5}.zip 控件名_${MD5}/ # 清理临时目录 rm -rf /tmp/button_${MD5} ``` ### Technical Analysis The temporary directory name is derived solely from the current Unix timestamp in seconds. Applying MD5 does not make this value unpredictable because an attacker can calculate the same digest for the small set of likely timestamps. The script performs separate deletion, directory creation, copy, validation, packaging, and cleanup operations under the shared `/tmp` namespace. There is no atomic secure directory creation, ownership verification, symbolic-link rejection, or restrictive permission setup. A local attacker can race these operations by recreating paths or placing malicious filesystem objects between steps. The unquoted path expansions also reduce robustness. While the generated digest itself is constrained, the overall command template encourages unsafe handling of filesystem paths and localized control names. ### Attack Path 1. A local attacker predicts the likely timestamp used when the packaging command runs. 2. The attacker calculates the corresponding 16-character MD5 prefix and therefore the path `/tmp/button_`. 3. After the script removes that path, the attacker races the subsequent creation and copy operations. 4. ...[truncated 940 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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 (10)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The flagged command is a real instance of recursive forced deletion: rm -rf /tmp/button_${MD5}. Even though the static analyzer also generalized it to rm -rf /, the actual documented command still constitutes a dangerous tool-parameter pattern because it performs irreversible deletion based on a variable path.

Content

Scanner excerpt · SKILL.md (reported line 315)May include surrounding context.

md
MD5=$(echo -n "$TIMESTAMP" | md5 -r | cut -c1-16)

# 创建临时目录和子文件夹
rm -rf /tmp/button_${MD5}
mkdir -p /tmp/button_${MD5}/控件名_${MD5}

# 复制文件到子文件夹

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The flagged command is a real instance of recursive forced deletion: rm -rf /tmp/button_${MD5}. Even though the static analyzer also generalized it to rm -rf /, the actual documented command still constitutes a dangerous tool-parameter pattern because it performs irreversible deletion based on a variable path.

Content

Scanner excerpt · SKILL.md (reported line 315)May include surrounding context.

md
MD5=$(echo -n "$TIMESTAMP" | md5 -r | cut -c1-16)

# 创建临时目录和子文件夹
rm -rf /tmp/button_${MD5}
mkdir -p /tmp/button_${MD5}/控件名_${MD5}

# 复制文件到子文件夹

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

This line includes a real cleanup command rm -rf /tmp/button_${MD5} in the failure branch of JSON validation. Failure-triggered destructive behavior is particularly risky because it may be reached unexpectedly and executed automatically by an agent trying to recover from an error.

Content

Scanner excerpt · SKILL.md (reported line 323)May include surrounding context.

md
cp index.html /tmp/button_${MD5}/控件名_${MD5}/

# 验证 aiui.json 是有效 JSON 格式
python3 -m json.tool /tmp/button_${MD5}/控件名_${MD5}/aiui.json > /dev/null && echo "✓ aiui.json 格式正确" || { echo "✗ aiui.json 格式错误"; rm -rf /tmp/button_${MD5}; exit 1; }

# 打包(包含子文件夹)
cd /tmp/button_${MD5} && zip -r ~/Desktop/VNAIButton/控件名_${MD5}.zip 控件名_${MD5}/

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

This line includes a real cleanup command rm -rf /tmp/button_${MD5} in the failure branch of JSON validation. Failure-triggered destructive behavior is particularly risky because it may be reached unexpectedly and executed automatically by an agent trying to recover from an error.

Content

Scanner excerpt · SKILL.md (reported line 323)May include surrounding context.

md
cp index.html /tmp/button_${MD5}/控件名_${MD5}/

# 验证 aiui.json 是有效 JSON 格式
python3 -m json.tool /tmp/button_${MD5}/控件名_${MD5}/aiui.json > /dev/null && echo "✓ aiui.json 格式正确" || { echo "✗ aiui.json 格式错误"; rm -rf /tmp/button_${MD5}; exit 1; }

# 打包(包含子文件夹)
cd /tmp/button_${MD5} && zip -r ~/Desktop/VNAIButton/控件名_${MD5}.zip 控件名_${MD5}/

Chaining Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The command chains validation, status output, cleanup, and process exit in a single shell expression using && and ||. Chained shell control flow is dangerous in agent-executed skills because it obscures side effects, couples failure states to destructive actions, and makes safe review or policy enforcement harder.

Content

Scanner excerpt · SKILL.md (reported line 323)May include surrounding context.

md
cp index.html /tmp/button_${MD5}/控件名_${MD5}/

# 验证 aiui.json 是有效 JSON 格式
python3 -m json.tool /tmp/button_${MD5}/控件名_${MD5}/aiui.json > /dev/null && echo "✓ aiui.json 格式正确" || { echo "✗ aiui.json 格式错误"; rm -rf /tmp/button_${MD5}; exit 1; }

# 打包(包含子文件夹)
cd /tmp/button_${MD5} && zip -r ~/Desktop/VNAIButton/控件名_${MD5}.zip 控件名_${MD5}/

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The cleanup command rm -rf /tmp/button_${MD5} is a genuine risky operation, even if intended only to remove a temporary directory. In an adversarial or brittle execution environment, destructive cleanup commands create unnecessary exposure to data loss from path confusion or command misuse.

Content

Scanner excerpt · SKILL.md (reported line 329)May include surrounding context.

cd /tmp/button_${MD5} && zip -r ~/Desktop/VNAIButton/控件名_${MD5}.zip 控件名_${MD5}/

清理临时目录

rm -rf /tmp/button_${MD5} echo "✓ 完成: ~/Desktop/VNAIButton/控件名_${MD5}.zip"

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The cleanup command rm -rf /tmp/button_${MD5} is a genuine risky operation, even if intended only to remove a temporary directory. In an adversarial or brittle execution environment, destructive cleanup commands create unnecessary exposure to data loss from path confusion or command misuse.

Content

Scanner excerpt · SKILL.md (reported line 329)May include surrounding context.

cd /tmp/button_${MD5} && zip -r ~/Desktop/VNAIButton/控件名_${MD5}.zip 控件名_${MD5}/

清理临时目录

rm -rf /tmp/button_${MD5} echo "✓ 完成: ~/Desktop/VNAIButton/控件名_${MD5}.zip"

text

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly instructs execution of local shell commands for validation, packaging, directory creation, and cleanup. Even though these operations support the stated ZIP-generation task, they extend beyond simple artifact generation and can modify the local filesystem, so an agent following them without sandboxing or confirmation could cause unintended side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented workflow includes destructive deletion commands (rm -rf /tmp/button_${MD5}) during setup, error handling, and cleanup, but provides no confirmation, existence checks, or safeguards. In an agentic environment, destructive commands are risky because variable expansion mistakes, path manipulation, or execution in the wrong context can delete unintended data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill instructs creating directories and writing output directly under Desktop paths without warning the user that local files and directories will be created or potentially overwritten. While the paths are specific and the behavior appears operational rather than malicious, silent filesystem writes are still unsafe for an autonomous agent.

Content

No source excerpt is available for this finding.