Skip to content

VBC-039: use-eval

error

Category: core
Analysis: Regex (line by line)
File types: .js, .ts, .tsx, .py, .rb, .php, .astro
Scope: source code only, ignoring anything inside strings and comments
Tags: security

What it reports

Use of 'eval()' detected at line {line}. This is a massive security risk.

Flagged

js
eval(userInput);
py
result = eval(expr)

Not flagged

js
JSON.parse(userInput);
py
model.eval()
py
if is_eval(node): pass

Pattern

regex
(?<![.\w])eval\s*\(

Released under the MIT License.