SkillsReviewed · thedaviddias

Front-End Checklist: avoid-eval

avoid-eval is a JavaScript review skill for coding assistants and front-end developers, but its files disagree about Content Security Policy. It guides replacement of string-based code execution with data parsing, explicit function selection and function-based timers, alongside ESLint rules and browser checks.

Researched 17 Nov 2026

In short.

avoid-eval is a security review skill for front-end developers using coding assistants, with a conflicting explanation of Content Security Policy that needs correction. It supplies replacement examples for eval(), new Function() and string-based timers, plus ESLint configuration and browser-verification instructions. It provides written guidance rather than an executable scanner. Nothing was executed, so its integration, findings and suggested changes have not been tested.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete selected folder: skills/avoid-eval/SKILL.md and skills/avoid-eval/references/rule.md at commit e8d14d049010e2ce25afcd5e8609dfcbbe63e47e, plus the repository-level LICENSE outside that folder. Other repository files, other skills and externally linked documentation were not assessed. Nothing was executed: assistant loading, lint enforcement, CSP behavior, refactor compatibility and browser journeys remain untested.

The overview

Identity

avoid-eval belongs to the thedaviddias/Front-End-Checklist repository. Its selected folder contains SKILL.md and references/rule.md. The entry file identifies its category as JavaScript, its priority as critical and its difficulty as beginner.

The original folder is [https://github.com/thedaviddias/Front-End-Checklist/tree/main/skills/avoid-eval]. The declared rule page is [https://frontendchecklist.io/rules/javascript/avoid-eval]; that page's contents are not included in the supplied evidence.

Assessment

The skill offers a practical starting point for a focused JavaScript security review: it identifies specific execution patterns, proposes replacements and asks for browser checks after changes. Beginners get concrete examples; experienced developers get review boundaries and lint settings.

Its main reliability problem is the disagreement between the entry file and reference about whether CSP blocks new Function(). Resolve that explanation before relying on the skill for security guidance. No evidence establishes detection accuracy or successful fixes.

Users

The resource fits developers reviewing browser scripts, client components and bundles, particularly where input might become executable JavaScript. A coding assistant can use its instructions to structure a review, while a developer can follow the reference directly.

Beginners should understand the difference between parsing data and executing code. Experienced reviewers still need to trace input boundaries and inspect runtime behavior; the skill does not establish that an application is free of XSS vulnerabilities.

Capabilities

The instructions target eval(), new Function(), and setTimeout() or setInterval() calls with string arguments. Replacement examples cover JSON.parse(), URLSearchParams, validated property access, explicit dispatch tables and function references for timers.

The reference supplies ESLint settings for no-eval, no-new-func and no-implied-eval. It also requests checks of the main user flow, an edge case, and delayed, lazy-loaded or failed script paths. These are instructions for a reviewer, not bundled automated checks.

Using it

Requirements

Following the full guidance requires access to the application's JavaScript and a browser environment for checking affected behavior. The suggested automated checks require an ESLint setup.

The files specify no assistant product, model, operating system, JavaScript runtime version or ESLint version. Compatibility and any assistant-specific requirements are unknown.

Mechanism

SKILL.md organizes the work into checking code, replacing risky patterns, explaining the risk and reviewing relevant browser execution paths. It points to references/rule.md for examples, configuration and verification details.

The approach combines source inspection with runtime verification. It asks reviewers to document constrained input boundaries explicitly and avoid treating framework defaults as automatic exceptions.

Setup

No assistant-specific installation command or loading procedure is supplied. Preserve the relationship between SKILL.md and references/rule.md when making the folder available to an assistant; whether a particular assistant discovers and follows it is unassessed.

The concrete lint configuration sets no-eval, no-new-func and no-implied-eval to error. The reference also gives a CSP example containing script-src 'self'; object-src 'none'. Suitability of that policy for an existing application's scripts and dependencies has not been assessed.

Example

For JSON input, the reference replaces eval('(' + jsonString + ')') with JSON.parse(jsonString). For a timer, it replaces setTimeout('updateUI()', 1000) with setTimeout(updateUI, 1000) or an arrow-function callback.

After such a change, the proposed verification is to check the affected browser flow and an edge case, including delayed loading or failure where relevant. These examples were read only; their behavior was not executed or tested.

Assessment & evidence

Limitations

SKILL.md says CSP restrictions block eval() but miss new Function(). The reference instead states that a script-src policy without 'unsafe-eval' blocks both. These are incompatible explanations within the same skill.

The dispatch-table example checks whether actions[actionName] is truthy without demonstrating an own-property restriction. That omission deserves review before copying the pattern where actionName is untrusted.

The reference mentions untrusted innerHTML but supplies no corresponding remediation example. Its CSP documentation link also contains an author-local /Users/ filesystem path. No executable scanner, test results or complete XSS assessment is supplied.

Reasoning

The central rationale is that attacker-controlled strings reaching code-execution functions can become browser-side code. The proposed replacements parse data or select existing operations instead of constructing JavaScript from strings.

The guidance also recognizes that a replacement must preserve application behavior. Its requests for browser checks and explicit input boundaries make the review more useful than a search for function names alone, although effectiveness remains unmeasured.

Alternatives

A developer can use the reference directly as a manual checklist without loading an assistant skill. For automated enforcement of the listed patterns, the resource itself recommends the three ESLint rules.

For individual refactors, it presents JSON.parse(), URLSearchParams, allowlisted property access, dispatch tables and function-based timers as alternatives to string execution. No comparison with other skills or security tools is supplied.

Evidence

The source snapshot contains both files in skills/avoid-eval and the repository-level LICENSE at commit e8d14d049010e2ce25afcd5e8609dfcbbe63e47e. It supports analysis of the written instructions and examples, not claims about successful execution.

The unchanged entry file is [https://raw.githubusercontent.com/thedaviddias/Front-End-Checklist/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e/skills/avoid-eval/SKILL.md]. The reference is [https://raw.githubusercontent.com/thedaviddias/Front-End-Checklist/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e/skills/avoid-eval/references/rule.md].

Access & freshness

Costs

The MIT license grants permission free of charge. The evidence gives no assistant pricing, usage charges or measured implementation costs, so the total cost of using the skill is unknown.

The reference estimates ten minutes for the task. That is an author estimate, not a measured review duration.

Rights

The repository's MIT license permits use, copying, modification, publication, distribution, sublicensing and sale. Copies or substantial portions must retain the copyright and permission notices. The notice names David Dias, copyright 2017–2026, and disclaims warranties.

The captured license is [https://raw.githubusercontent.com/thedaviddias/Front-End-Checklist/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e/LICENSE].

Freshness

The snapshot was captured on 17 November 2026 at 02:46:54 UTC and is pinned to commit e8d14d049010e2ce25afcd5e8609dfcbbe63e47e.

The supplied files do not establish a release version, their last modification dates or current assistant compatibility. Changes after this snapshot are unknown.

Actions

Before adopting the guidance, reconcile the conflicting CSP statements and review the dispatch-table input boundary. Confirm how your chosen assistant loads the folder and its reference file; no supported integration is documented.

For an initial application review, follow one relevant script path, choose the replacement that matches its purpose, apply the suggested lint rules and verify the affected browser behavior. Check a normal flow and a relevant delayed, lazy-loaded or failure case before treating the change as verified.

Evidence for this report

LICENSEnotice · checked 2026-11-17
skills/avoid-eval/SKILL.mdselected · checked 2026-11-17
skills/avoid-eval/references/rule.mdselected · checked 2026-11-17