The Problem

EVA addresses a gap in offensive security workflows: pentesters often switch between multiple AI backends, run repetitive recon commands, and manually correlate outputs to decide next steps. The tool wraps AI-driven attack guidance around a pentest shell so a user can execute commands, have the output analyzed in context, and get suggested follow-ups without leaving the terminal.

What This Does

EVA is a Python CLI that guides penetration tests through reconnaissance, exploitation, and reporting phases. It supports multiple AI backends (Ollama, OpenAI, Anthropic, Gemini, custom endpoints) via modules/llm.py, and persists session state—targets, chat history, model context—through sessions/eva_session.py. The modules/ folder handles the operational pieces: attack_map.py builds network graphs, exploit_search.py queries exploit databases, reporting.py generates findings, and tooling.py validates shell commands before execution.

The repo is a fork of ARCANGEL0/EVA (518 stars) with 18 Python files across modules/, utils/, and sessions/. It has no tests, no CI, no license file, and no lockfile—hygiene issues that matter for anyone planning to modify or redistribute it.

How It Is Wired

Execution starts in eva.py at cli (line 166), which reaches 180 functions and is the sole entry point. From there, control flows through main (line 53) into the interactive menu. The shortest path to an external effect is cli -> open_in_default_editor (via subprocess.run) and main -> menu (via os.system), so a single run can spawn subprocesses within two hops.

The busiest hub is utils/ui.py's cyber function, called from 18 places—it handles command execution and output display. utils/system.py (35 functions) and modules/llm.py (34 functions) are the other heavy hitters, both touching files, subprocesses, and the network. modules/llm.py also calls a model for inference. sessions/eva_session.py is the most unstable module (instability 0.83), importing 10 modules and sitting at the edge of the graph.

Two modules—utils/ui.py and utils/system.py—are in a circular import cycle, which makes changes ripple unpredictably. Deep nesting (max depth 8) in llm.py, eva_session.py, and system.py compounds the cognitive load.

How To Use It

git clone https://github.com/moses-y/EVA
cd EVA
pip install -e .  # from pyproject.toml
python eva.py      # entry point: cli() at eva.py:166

Configuration lives in config.py and utils/config_loader.py; the README documents backend selection (Ollama, OpenAI, Anthropic, Gemini, custom API) but does not specify exact environment variable names. Sessions persist under sessions/. The repo lacks a lockfile, so builds are not reproducible without committing one.

Real-World Use

A consultant running an external engagement could use EVA to automate recon: define a target, let the AI suggest nmap and enum4linux commands, execute them inside the shell, and have outputs analyzed for vulnerabilities. The session file preserves context across days, and modules/reporting.py can generate a findings report at the end.

Code Health & Issues

Static analysis (not opinion) found 15 issues: 5 high, 10 medium. The high-severity items are:

  • Import cycleutils/ui.py, utils/system.py are mutually reachable; break the cycle by extracting shared types.
  • Deep nesting – max depth 8 in modules/llm.py, sessions/eva_session.py, utils/system.py; flatten with guard clauses.
  • Duplicated code – 16 repeated 6-line blocks across 16 files; extract shared helpers.

Medium findings include broad except clauses in utils/ui.py and modules/llm.py, unmanaged open() calls in modules/attack_map.py and modules/reporting.py, oversized files (exploit_search.py at 765 lines), and high branching density in modules/tooling.py and modules/vuln_intel.py.

SDLC gaps: no test suite, no CI pipeline, no license file (default is all-rights-reserved, blocking reuse), and no lockfile for reproducible builds.

The Bottom Line

EVA is a functional prototype with real utility for guided pentesting, but it is not production-grade. The circular imports and missing test coverage make it risky to modify without breaking behavior. Use it for internal experimentation or as a reference for building your own AI-assisted shell—but add a license, tests, and CI before treating it as a deliverable.