Back to skill

Security audit

Calculator Chat

Security checks for vulnerabilities and agentic risk

Overview

The skill is meant to show chat-derived numbers in a calculator, but it ships under-scoped desktop automation and command-execution code that users should review before installing.

Review this skill before installing. It has no obvious exfiltration or persistence, but it can launch and manipulate local calculator applications, close existing calculator windows, and includes exported platform modules with command-injection flaws. Use only in a controlled desktop environment unless the publisher narrows triggers, removes unsafe platform modules, avoids pkill and shell interpolation, and documents explicit per-use consent for GUI automation.

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

T09 · Insecure Skill Coding Practices

Error
Location
src/platform/linux.js:30
Finding

Shell Command Injection in the Linux Calculator Module

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/platform/macos.js:21
Finding

Shell Command Injection in the macOS AppleScript Launcher

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/platform/windows.js:75
Finding

Command Injection in the Windows PowerShell Invocation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/platform/windows.js:75
Finding

Predictable and Unsafely Cleaned Temporary PowerShell Script

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (40)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the implementation uses a custom GTK window or arbitrary text display instead of the stated system calculator and phrase-mapping flow, the skill is materially different from what it claims. While this may not always be directly exploitable, deceptive or inaccurate behavior weakens trust boundaries and can conceal unexpected UI spoofing or broader input acceptance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

If the implementation uses a custom GTK window or arbitrary text display instead of the stated system calculator and phrase-mapping flow, the skill is materially different from what it claims. While this may not always be directly exploitable, deceptive or inaccurate behavior weakens trust boundaries and can conceal unexpected UI spoofing or broader input acceptance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the implementation uses a custom GTK window or arbitrary text display instead of the stated system calculator and phrase-mapping flow, the skill is materially different from what it claims. While this may not always be directly exploitable, deceptive or inaccurate behavior weakens trust boundaries and can conceal unexpected UI spoofing or broader input acceptance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

If the implementation uses a custom GTK window or arbitrary text display instead of the stated system calculator and phrase-mapping flow, the skill is materially different from what it claims. While this may not always be directly exploitable, deceptive or inaccurate behavior weakens trust boundaries and can conceal unexpected UI spoofing or broader input acceptance.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Auto-triggering on broadly defined emotional expressions can cause the skill to activate unexpectedly during normal conversation, launching GUI actions without clear user intent. In this context, opening or manipulating a desktop calculator is low-to-moderate impact, but the trigger ambiguity increases the chance of nuisance behavior, focus stealing, and accidental execution of local actions.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

Examples like common everyday phrases make the activation surface too broad, so ordinary chat may trigger the skill unintentionally. Because the skill affects the local desktop environment, accidental activations can repeatedly open or alter calculator windows and degrade user control over the system session.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · docs/plans/2026-03-08-calculator-chat-skill-implementation-plan.md (reported line 279)May include surrounding context.

Files:

  • Create: calculator-chat/SKILL.md

Step 1: Write SKILL.md

markdown
---

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file implements a standalone GTK calculator GUI, while the skill metadata describes a chat-triggered calculator-display behavior. This mismatch is dangerous because it can conceal undeclared functionality, mislead reviewers about what will execute, and expand the runtime/UI attack surface beyond the documented skill behavior.

Content

No source excerpt is available for this finding.

eval() call detected

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

Direct eval() call evaluates arbitrary expressions. This can be exploited to execute malicious code or exfiltrate data.

Content

Scanner excerpt · src/calculator.py (reported line 40)May include surrounding context.

python
}
        
        # 使用 eval 但只允许数字和运算符
        result = eval(expr, {"__builtins__": {}}, allowed_names)
        return result
    except Exception:
        return None

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The AppleScript subprocess uses System Events keystroke automation to type content into the GUI, which is dangerous because keystrokes may be delivered to the wrong window if focus changes and because this pattern can be repurposed for broader host interaction. The escaping is also not a strong safety boundary for shell-embedded AppleScript, so the combination of subprocess execution and UI injection creates elevated risk relative to the skill's simple stated purpose.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares executable dependencies and its documentation describes shell/process interactions, but it does not declare any explicit tool scope or permissions. This creates a transparency and containment problem: a host may grant or infer broader shell/file/env access than users expect, making local process control and command execution harder to review safely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description specifies responding with calculator-number meanings based on Chinese homophonic interpretation and states support for Chinese phonetic translation, but it does not indicate that this is optional or user-selected. This can violate language or locale policy when a skill imposes one language behavior by default.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The design document defines the trigger as /calc <message>, while the skill metadata describes activation on /calc-chat or emotional expressions. This mismatch is security-relevant because users, reviewers, and enforcement systems may misunderstand when the skill activates and what scope of behavior to expect, increasing the chance of unintended execution or insufficient review of the real behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The design proposes OS-level window discovery and synthetic input mechanisms such as Win32 messaging, AppleScript, and xdotool to control a system application. Even if intended for a calculator, these primitives are broadly applicable to desktop automation and can be repurposed to manipulate other windows, inject input without focus, or bypass normal user awareness, making the skill materially more dangerous in context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The design explicitly states that it will launch the system calculator and send input in the background without focus, yet provides no user warning or consent model. Hidden application launching and background UI manipulation reduce transparency and can surprise users, creating opportunities for misuse, social engineering, or unauthorized desktop interaction under the guise of a harmless chat feature.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The implementation plan expands a narrowly described skill into a generic CLI that accepts arbitrary user-provided input and automates OS GUI actions based on that input. This increases capability beyond the declared scope, making the skill easier to invoke in unintended contexts and reducing opportunities for policy gating or user consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The plan grants the skill subprocess-based GUI automation across Windows, macOS, and Linux, including PowerShell, AppleScript, and xdotool execution. These are powerful primitives that exceed a simple text-mapping feature and materially raise the risk of abuse, accidental interaction with the wrong window, or future extension into arbitrary desktop control.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The SKILL.md documentation changes activation from the declared /calc-chat or emotional-expression behavior to /calc <message>, creating a mismatch between user expectations, manifest semantics, and actual execution. Such trigger drift can bypass review assumptions and cause the skill to run in broader situations than intended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The user-facing skill description and usage omit a clear warning that the skill will launch and control a local GUI application through OS automation. Lack of transparency can lead to surprising execution, unsafe consent assumptions, and users authorizing a skill without understanding that it can manipulate desktop state.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring explicitly describes a full arithmetic calculator, contradicting the stated chat-based emotional-number skill. While not directly exploitable on its own, misleading internal documentation can help hide unauthorized behavior and reduce the chance that reviewers detect functionality drift or policy violations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill launches local processes and opens a system calculator based on user-controlled input. While the input is somewhat constrained by pattern matching and digit extraction, the code still triggers host-side application execution, which is a real security concern for agent skills because it crosses from text handling into local OS interaction and could be abused for unwanted application launches or user disruption.

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 · src/open_calc.py (reported line 22)May include surrounding context.

python
"""检查计算器是否正在运行"""
    try:
        # 使用 pgrep 检查进程,避免直接杀进程
        result = subprocess.run(
            ['pgrep', '-x', 'gnome-calculator'],
            capture_output=True,
            timeout=2

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Closing existing calculator processes is unnecessary for the advertised function of displaying calculator-chat responses. In a desktop automation setting, this broad side effect can interfere with unrelated user activity and indicates overbroad permissions/capability relative to the skill's declared purpose.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

This code kills all gnome-calculator processes on the desktop, which exceeds the stated purpose of merely showing a number in the calculator. In an agent/skill context, terminating user applications is a disruptive side effect and can cause denial of service or loss of unsaved calculator state for the current user.

Content

Scanner excerpt · src/open_calc.py (reported line 35)May include surrounding context.

python
def close_calculator():
    """关闭已打开的计算器"""
    try:
        subprocess.run(
            ['pkill', '-x', 'gnome-calculator'],
            capture_output=True,
            timeout=2

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The ability to kill desktop calculator processes is not justified by a skill that should only display numeric messages. Even without privilege escalation, an agent that can terminate user applications creates an avoidable denial-of-service capability and weakens trust boundaries on the desktop.

Content

No source excerpt is available for this finding.