Agent skill

Detecting Eval Exec Usage

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Scan a source tree for dynamic-code-execution APIs that an attacker can hijack: Python eval / exec / compile, JavaScript eval / Function() / setTimeout(string), Ruby eval / instanceeval / classeval…

MITAuto-check passedTesting & QA

Install Detecting Eval Exec Usage

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-eval-exec-usage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace detecting-eval-exec-usage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/detecting-eval-exec-usage .claude/skills/detecting-eval-exec-usage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
detecting-eval-exec-usage
GitHub stars
2.8k
Token cost
~1.1k tokens
SKILL.md length
285 words
Files
4 (incl. scripts, references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Scan a source tree for dynamic-code-execution APIs that an attacker can hijack: Python eval / exec / compile, JavaScript eval / Function() / setTimeout(string), Ruby eval / instanceeval / classeval…

  • : pre-commit gate on any application that parses user-uploaded code (rule engines
  • SKILL.md covers Overview, When the skill produces findings, Prerequisites and Instructions, plus 4 more sections
  • Runs Python scripts from its folder; calls python3 and git
  • Formula evaluators

What it does

Detecting Eval Exec Usage is an agent skill from jeremylongshore/tons-of-skills-marketplace. Scan a source tree for dynamic-code-execution APIs that an attacker can hijack: Python eval / exec / compile, JavaScript eval / Function() / setTimeout(string), Ruby eval / instanceeval / classeval, Java ScriptEngine, PHP eval / assert($str), .NET Activator.CreateInstance / Reflection.Emit with dynamic input. Use when: pre-commit gate on any application that parses user-uploaded code (rule engines, formula evaluators, plugin systems), or post-bug-report when "we run user-supplied expressions." Threshold: any call…

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/PLAYBOOK.md`, `references/THEORY.md` and `scripts/scan_eval.py`). Compatibility notes: Designed for Claude Code

It sits in Testing & QA, covering QA and bug reports. It works with Python, PHP, Ruby and Java. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • : pre-commit gate on any application that parses user-uploaded code (rule engines
  • Formula evaluators
  • Plugin systems)
  • With: scan eval

Example prompts

  • “we run user-supplied expressions.”
  • “scan eval”
  • “find dynamic exec”
  • “/detecting-eval-exec-usage”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Bash(python3:*), Glob, Grep

What it can do on your machine

Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Bash(python3:*)
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Detecting Eval Exec Usage loads about 1.1k tokens when it runs, and up to ~4.2k if it reads all its reference files. Until then it costs about 180 tokens; SKILL.md has 285 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~180
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 285 words, ~1,063 tokens.

Download SKILL.mdSave it as .claude/skills/detecting-eval-exec-usage/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
detecting-eval-exec-usage
description
Scan a source tree for dynamic-code-execution APIs that an attacker can hijack: Python eval / exec / compile, JavaScript eval / Function() / setTimeout(string), Ruby eval / instance_eval / class_eval, Java ScriptEngine, PHP eval / assert($str), .NET Activator.CreateInstance / Reflection.Emit with dynamic input. Use when: pre-commit gate on any application that parses user-uploaded code (rule engines, formula evaluators, plugin systems), or post-bug-report when "we run user-supplied expressions." Threshold: any call to eval / exec / Function / similar where the argument is not a string literal. Trigger with: "scan eval", "find dynamic exec", "audit eval calls", "code injection patterns".
allowed-tools
Read, Bash(python3:*), Glob, Grep
compatibility
Designed for Claude Code
disallowed-tools
Bash(rm:*), Bash(curl:*)
version
3.30.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
security, static-analysis, code-injection, pentest

Detecting eval / exec Usage

Overview

Dynamic-code-execution APIs (CWE-95 Eval Injection) let an application interpret a string as code at runtime. If the string contains anything user-controllable, the application has handed the attacker arbitrary code execution.

The defensive posture: don't use these APIs. The exceptions are narrow: rule engines, formula evaluators (spreadsheet = formulas), plugin systems with explicit sandboxing. For everything else, there's almost always a safer alternative.

When the skill produces findings

FindingSeverityThresholdAffected control
Python eval(...) with non-literalCRITICALargument contains var refCWE-95
Python exec(...) with non-literalCRITICALargument contains var refCWE-95
Python compile(...) with non-literalHIGHsource string contains varCWE-95
Python __import__(var)HIGHdynamic module loadingCWE-95
JS eval(...)CRITICALanyCWE-95
JS new Function(str)CRITICALany non-literalCWE-95
JS setTimeout/setInterval(string)HIGHstring instead of functionCWE-95
Ruby eval(...)/instance_eval(...)/class_eval(...)CRITICALnon-literalCWE-95
PHP eval(...)CRITICALalwaysCWE-95
PHP assert($str)CRITICAL(legacy code-eval form)CWE-95
PHP create_functionCRITICALdeprecated, eval-equivalentCWE-95
Java ScriptEngineManager + evalHIGHdynamic script executionCWE-95
C# Activator.CreateInstance(Type.GetType(str))HIGHtype loading from stringCWE-95

Prerequisites

  • Python 3.9+
  • Source tree on local filesystem

Instructions

Run
bash
python3 ${CLAUDE_PLUGIN_ROOT}/skills/detecting-eval-exec-usage/scripts/scan_eval.py /path/to/repo

Options: --output FILE, --format json|jsonl|markdown, --min-severity, --include-tests, --languages LIST.

Interpret

CRITICAL = direct RCE vector. Replace the dynamic execution with explicit logic (lookup table, switch statement) or a sandboxed expression library (Python simpleeval, JavaScript expr-eval, Ruby Dentaku).

Remediation

See references/PLAYBOOK.md.

Examples

Pre-commit
bash
python3 ${CLAUDE_PLUGIN_ROOT}/skills/detecting-eval-exec-usage/scripts/scan_eval.py \
    --min-severity high $(git diff --name-only main...HEAD | tr '\n' ' ')
CI
yaml
- run: |
    python3 plugins/security/penetration-tester/skills/detecting-eval-exec-usage/scripts/scan_eval.py \
        . --min-severity high

Output

JSON / JSONL / Markdown. Exit codes: 0 / 1 / 2.

Error Handling

False positive on eval("'literal'") — the value is a constant string. Verify the regex match by reading the source line.

Resources

  • references/THEORY.md — Why dynamic-code execution is the highest-impact injection class, sandbox limits, the formula-evaluator design pattern
  • references/PLAYBOOK.md — Per-language safe alternatives (Python simpleeval / ast.literal_eval, JS expression-eval libraries, Ruby Dentaku, Java scripting sandboxes)

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/.curated/detecting-eval-exec-usage of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/PLAYBOOK.md
  • references/THEORY.md
  • scripts/scan_eval.py

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Detecting Eval Exec Usage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Detecting Eval Exec Usage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Detecting Eval Exec Usage this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT
Security Reviewgithub/awesome-copilot40k1 repos~2.3kAutomated safety check: NotesMIT
Hunt DeserializationEncod3d-Sec/TORCH329—~1.7kAutomated safety check: PassMIT
Supercovsupercorp-ai/supercov1511 repos~415Automated safety check: PassMIT
Crap Analyzerswingerman/engineer154—~1.2kAutomated safety check: PassMIT
Selenium Skillsickn33/agentic-awesome-skills47k1 repos~2.4kAutomated safety check: PassMIT

Similar skills

  • Security Review

    github/awesome-copilot

    Official

    AI-powered codebase security scanner that reasons about code like a security researcher — tracing data flows, understanding component interactions, and catching vulnerabilities that pattern-matching…

    40k GitHub starsUsed in 1 repo~2.3k tokens
    SecurityAuto-check: notes
  • Hunt Deserialization

    Encod3d-Sec/TORCH

    Insecure deserialization hunting across Java / .NET / PHP / Python / Ruby / Node.

    329 GitHub stars~1.7k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Supercov

    supercorp-ai/supercov

    Measures test coverage and code quality in a repository with the supercov CLI, and turns what it finds into small, focused tests or fixes.

    151 GitHub starsUsed in 1 repo~415 tokens
    Testing & QAAuto-check passed
  • Crap Analyzer

    swingerman/engineer

    A skill your agent uses to produce a risk-based refactor + test plan for recently-changed code on a diff/branch/PR by computing CRAP (complexity × untested) on changed methods.

    154 GitHub stars~1.2k tokensUpdated 16 days ago
    Testing & QAAuto-check passed
  • Selenium Skill

    sickn33/agentic-awesome-skills

    Generates production-grade Selenium WebDriver automation scripts and tests in Java, Python, JavaScript, C, Ruby, or PHP.

    47k GitHub starsUsed in 1 repo~2.4k tokens
    Testing & QAAuto-check passed
  • Jsonlogic

    aiskillstore/marketplace

    Work with JsonLogic business rules — the JSON-based conditional-logic format at jsonlogic.com.

    430 GitHub stars~2.8k tokensUpdated today
    Product & Project ManagementAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Categories

Questions about Detecting Eval Exec Usage

What does Detecting Eval Exec Usage do?

Scan a source tree for dynamic-code-execution APIs that an attacker can hijack: Python eval / exec / compile, JavaScript eval / Function() / setTimeout(string), Ruby eval / instanceeval / classeval…. Detecting Eval Exec Usage is an agent skill from jeremylongshore/tons-of-skills-marketplace.Emit with dynamic input.

When should I use Detecting Eval Exec Usage?

Detecting Eval Exec Usage fits situations like: : pre-commit gate on any application that parses user-uploaded code (rule engines; formula evaluators; plugin systems); with: scan eval.

How do I install Detecting Eval Exec Usage in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-eval-exec-usage -a claude-code`. Or copy the skill folder (skills/.curated/detecting-eval-exec-usage in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/detecting-eval-exec-usage in your project. Claude Code loads it when a task matches its description.

How do I install Detecting Eval Exec Usage in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-eval-exec-usage -a codex`. Or copy the skill folder (skills/.curated/detecting-eval-exec-usage in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/detecting-eval-exec-usage in your project. Codex loads it when a task matches its description.

Can I use Detecting Eval Exec Usage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-eval-exec-usage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/detecting-eval-exec-usage, .gemini/skills/detecting-eval-exec-usage, .github/skills/detecting-eval-exec-usage and .opencode/skills/detecting-eval-exec-usage in your project.

What does Detecting Eval Exec Usage need to run?

Going by SKILL.md and its folder, Detecting Eval Exec Usage needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and git). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Bash(python3:*), Glob, Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Detecting Eval Exec Usage access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Detecting Eval Exec Usage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Detecting Eval Exec Usage use?

Detecting Eval Exec Usage is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Detecting Eval Exec Usage use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.1k tokens, read only when the agent opens those files.

What are the alternatives to Detecting Eval Exec Usage?

Skills that share tags, products or a category with Detecting Eval Exec Usage: Security Review (github/awesome-copilot, 40k stars), Hunt Deserialization (Encod3d-Sec/TORCH, 329 stars), Supercov (supercorp-ai/supercov, 151 stars) and Crap Analyzer (swingerman/engineer, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Detecting Eval Exec Usage?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.