Back to skill

Security audit

My Tools

Security checks for vulnerabilities and agentic risk

Overview

This skill is a simple time-and-calculator helper, but its calculator feature evaluates user-provided text as Python code.

Install only if you trust the skill author and understand that calculator inputs may be treated as Python code. Prefer a version that uses a restricted arithmetic parser and avoids shell eval for user-provided expressions.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (3)

eval() call detected

High
Category
Dangerous Code Execution
Content
def calculator(self, expression: str):
        """计算数学表达式"""
        try:
            result = eval(expression, {"__builtins__": {}}, {})
            return f"{expression} = {result}"
        except Exception as e:
            return f"计算失败:{str(e)}"
Confidence
98% confidence
Finding
The calculator method passes user-controlled input directly into Python's eval(), which is inherently dangerous even with __builtins__ removed. Attackers may still trigger denial-of-service through expensive expressions or exploit Python object model behaviors in some environments to escape the intended sandbox, so this should not be treated as a safe math parser.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The calculator guidance uses `py -c "print(eval('EXPRESSION'))"`, which evaluates attacker-controlled input as Python code rather than as a constrained math expression. In a skill that is supposed to perform arithmetic, this enables arbitrary code execution via crafted expressions and is far more dangerous than the stated functionality requires.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The skill directs the agent to use a shell execution tool for both time lookup and calculation without any warning, safety boundary, or restriction guidance. In context, this increases risk because one of the commands incorporates user input for evaluation, and normalizing `exec` for simple tasks encourages unsafe command execution patterns.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
__init__.py:16