Permanent-memory security research and reverse-engineering agent toolkit for
authorized testers, researchers, and builders. Python 3.13 package on uv,
pydantic, httpx, and typer with SQLite memory, CVE/CISA KEV ingestion, audit
checklists, Ghidra MCP catalog, and Stake Engine math helpers.
Authorized testing only. Use only with explicit written scope (contract, Rules of Engagement, or program rules). See
docs/SECURITY.mdfor disclosure policy anddocs/SECURITY.md#authorized-usefor the project’s stance on out-of-scope use.
src/hacker_agent/
├── config.py # Path + env resolution (no hardcoded absolute paths)
├── memory/ # SQLite knowledge base + Pydantic models
├── cli/ # Typer CLI (`python -m hacker_agent` / `hacker-agent`)
├── cve/ # NVD + CISA KEV importer (direct HTTP, no subprocess)
├── stake/ # Provably-fair game math + RGS templates
├── audit/ # Security-audit checklist generator
└── ghidra/ # Ghidra MCP tool catalog + memory bridge
scripts/ # Bash automation (auto-mode, auto-commit)
tests/ # pytest suite
data/ # Default SQLite location (gitignored; `.gitkeep` tracked)
| Requirement | Notes |
|---|---|
| Python 3.13+ | requires-python = ">=3.13" in pyproject.toml. pyenv matches the pinned .python-version. |
| uv | Recommended install and task runner (uv sync, uv run …). |
| Bash + common Unix utilities | scripts/auto-mode.sh uses bash, find, tar, git. macOS and Linux are first-class; Windows is unsupported except via WSL2. |
git clone https://github.com/subkoks/hacker-agent.git
cd hacker-agent
git checkout develop # default integration branch; use tags for releasesWith uv (recommended)
# Production / runtime dependencies only
uv sync
# Add dev tools (pytest, ruff, mypy, bandit, respx)
uv sync --extra devWith pip (editable install)
python3.13 -m venv .venv
source .venv/bin/activate # Linux / macOS
# .venv\Scripts\activate # Windows cmd (unsupported except WSL)
pip install -U pip
pip install -e ".[dev]" # or pip install -e . without dev extrasAfter any editable install, the console script hacker-agent is available when
the virtual environment is activated. With uv and no shell activation, use
uv run hacker-agent … (see Run).
uv run hacker-agent --version
uv run python -m hacker_agent --version-
Copy the template:
cp .env.example .envand edit values for your machine. -
This package does not auto-load
.env. Export variables in your shell, usedirenv, or wrap commands, for example:set -a && source .env && set +a && uv run hacker-agent dashboard
Resolved paths are project-root relative unless an absolute path is given
(see src/hacker_agent/config.py).
| Variable | Purpose | Default |
|---|---|---|
HACKER_DATA_DIR |
Directory for SQLite and default dump paths | <repo>/data |
HACKER_MEMORY_DB |
SQLite database file | <data>/hacker-memory.db |
HACKER_LOG_DIR |
auto-mode / auto-commit logs |
<repo>/logs |
HACKER_BACKUP_DIR |
auto-mode tarball backups |
<repo>/backups |
HACKER_AUTO_INTERVAL |
Seconds between daemon cycles in scripts/auto-mode.sh start |
3600 |
NVD_API_BASE |
NVD CVE 2.0 JSON endpoint | Public NVD URL in .env.example |
CISA_KEV_URL |
CISA KEV JSON feed URL | Official CISA URL |
AUTO_COMMIT_BRANCH_PREFIX |
Prefix for branches created by scripts/auto-commit.sh on main/master |
auto/ |
GHIDRA_PROJECT_DIR |
Default Ghidra project directory hint (GhidraIntegration) |
~/Projects/ghidra-re/projects |
GITHUB_TOKEN |
Not read by the Python package today; reserved for local GitHub automation you may layer on (for example gh auth). |
(empty) |
Show the resolved database path:
uv run hacker-agent memory pathWith uv (no manual activate):
uv run hacker-agent --help
uv run python -m hacker_agent --helpWith an activated virtualenv after pip install -e .:
hacker-agent --help
python -m hacker_agent --helpThere is no separate long-running server process; each command exits when finished.
Mirror CI locally:
uv run ruff check src tests
uv run ruff format --check src tests
uv run mypy src
uv run pytest -q --cov=src/hacker_agentSee CONTRIBUTING.md for branch flow (develop → PR → main
on release) and review expectations.
# Knowledge ops
hacker-agent learn --content "JWT 'none' alg bypass" --category technique --importance 8
hacker-agent recall --query "JWT" --limit 5
hacker-agent dashboard
# CVE feed import (NVD + CISA KEV — network required)
hacker-agent cve import --days 7
hacker-agent cve import --kev-only
# Audit checklists
hacker-agent audit list
hacker-agent audit generate --type web-application --format markdown
# Stake-style RGS math (simulation helpers)
hacker-agent stake verify-rtp --game crash --rounds 100000
# Ghidra MCP catalog + workflow text (see below)
hacker-agent ghidra tools
hacker-agent ghidra guide- Cursor / VS Code: Open the cloned repository folder. Use the integrated
terminal to run
uv run hacker-agent …. Optional project subagents live in.cursor/agents/; repo rules are inAGENTS.md. For link previews, upload.github/social-preview.pngunder the repository’s Settings → General → Social preview on GitHub (under 1 MB; use.github/repository-open-graph-template.pngfor safe margins). - Ghidra MCP: The
ghidrapackage submodule lists expected MCP tool names and prints a workflow guide to stdout. Disassembly and MCP calls execute in your Ghidra-backed MCP server and host agent, not insidehacker-agentitself. Wire a Ghidra MCP server in your editor, then usehacker-agent ghidra recordto persist snapshots into SQLite when you have JSON / decompilation artifacts on disk.
scripts/auto-mode.sh runs health checks, tarball backups (including a brain
export when the CLI succeeds), optional auto-commit via auto-commit.sh, and a
lightweight upstream notice. Daemon / backup paths expect python3 and
python3 -m hacker_agent on PATH (your venv or uv shim).
export PATH="$PWD/.venv/bin:$PATH" # example after venv activate
scripts/auto-mode.sh once # single cycle
scripts/auto-mode.sh start # background daemon (uses HACKER_AUTO_INTERVAL)
scripts/auto-mode.sh status
scripts/auto-mode.sh stop
scripts/auto-mode.sh health # one-shot compile + CLI smoke
scripts/auto-mode.sh backup # backup onlyscripts/auto-commit.sh creates commits on a safe feature branch when run from
main/master, and attempts git push if origin exists — configure Git
credentials / SSH as you normally would for pushes.
- Treat imported brain dumps, CVE JSON, and Ghidra triage files as
untrusted input; keep filesystem permissions tight on
HACKER_MEMORY_DBand backups. - NVD API calls use the public endpoint; respect NIST usage
expectations and your corporate
egress policy. There is no
NVD_API_KEYwiring in this codebase yet. - Do not use this tool against systems you are not explicitly authorized to test.
ruff check src tests
ruff format --check src tests
mypy src
pytest -q(Prefer uv run … as shown in Development commands.)
- Repository: https://github.com/subkoks/hacker-agent
- Latest release: https://github.com/subkoks/hacker-agent/releases/latest
- Issues: https://github.com/subkoks/hacker-agent/issues
- NVD CVE 2.0 API: https://nvd.nist.gov/developers/vulnerabilities
- CISA KEV catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- Stake Engine docs: https://docs.stake-engine.com
See CONTRIBUTING.md for development setup, branch flow, and
code standards. Vulnerability reports go through docs/SECURITY.md,
not public issues. Community expectations live in CODE_OF_CONDUCT.md.
User-visible changes are recorded in docs/CHANGELOG.md.