Back to skill

Security audit

calculator

Security checks for vulnerabilities and agentic risk

Overview

The skill implements a coherent calculator, but it evaluates arbitrary Python expressions with eval() without AST-sanitization, which can be exploited to achieve arbitrary code execution if untrusted input is allowed.

This calculator is coherent and convenient, but it currently evaluates raw Python expressions with eval(), which is dangerous if expressions come from untrusted users or external sources — attackers can craft expressions that escape the intended math-only behavior and execute arbitrary code. Before installing or using this skill in any environment that might receive untrusted input, either: (1) replace eval() with a safe evaluator (parse the expression with ast.parse and permit only a whitelist of node types and names), (2) use a dedicated math-expression library (e.g., sympy parsing, numexpr, or a vetted math expression parser), or (3) strongly sandbox execution (container/VM with limited privileges) and strictly validate/sanitize inputs (reject tokens like __, attribute access via '.', very long inputs, etc.). If you can't update the code, only use the skill interactively with trusted inputs and avoid exposing it to external user-supplied expressions.

SkillSpector findings are pending for this release.