CyberGym: a vulnerability benchmark that insists on staying off the internet
CyberGym is a large-scale, high-quality cybersecurity evaluation framework designed to rigorously assess the capabilities of AI agents on real-world vulnerability analysis tasks.
At a glance
- What is it?
- CyberGym is a Python evaluation framework for measuring AI agents on real vulnerability analysis, built around ARVO and oss-fuzz tasks, a local proof-of-concept submission server, and a Squid proxy that keeps agent containers offline. The benchmark side is carefully scoped; the operational side is heavy on disk, and the project's own documentation treats an exposed server as the failure mode to avoid.
- Who is it for?
- CyberGym fits a research group that already runs Docker, has a machine measured in terabytes, and wants a scored comparison of agents against published vulnerabilities rather than against live targets.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 90 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- sunblaze-ucb/cybergym1,058 ★ · +220
| Repository | 2026-09-11 | 2026-11-25 |
|---|---|---|
| sunblaze-ucb/cybergym | 838 | 1.1k |
220 Stars in the last 75 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The install extras are the only place any dependency lives
`pyproject.toml` ships an empty production dependency list, with the placeholder comment `# Add your production dependencies here` still sitting in it. Everything CyberGym actually imports sits in two optional groups instead. `dev` carries ruff, docker, httpx, openai, matplotlib, tomli-w and simple-parsing. `server` carries docker, fastapi, uvicorn, sqlalchemy, python-multipart and pydantic-settings. That is why the setup line asks for both extras in one go:
pip3 install -e '.[dev,server]'A plain install of the package, named `cybergym` at version `0.2.0` and built by hatchling, resolves nothing and then fails at the first `python3 -m cybergym.server`. The wheel target packages `src/cybergym`, so the import path follows a src layout rather than a flat module, and the recommended install is editable, which means every command in the documentation expects to run from a clone rather than from an installed copy.
Two floors apply. `requires-python` is `>=3.12`, and the README's prerequisite line is two words long: python and docker environment, with no version stated for Docker and no mention of a GPU. The three authors carry berkeley.edu addresses, and the bug tracker URL in the manifest points back at the repository's own issue tracker, so bug reports travel through GitHub rather than a separate tracker.
240GB of task data, 10TB of server data, 130GB without compilers
The benchmark data is roughly 240GB and arrives from the Hugging Face dataset rather than from this repository:
git lfs install
git clone https://huggingface.co/datasets/sunblaze-ucb/cybergym cybergym_dataServer data comes in three shapes, and the difference between them is two orders of magnitude. The full set, with the Docker images that carry the dynamic compilation environment, is about 10TB. Binary only mode is about 130GB and exists for people doing static analysis who do not need to compile anything:
python scripts/server_data/download_binary_only_runners.py
wget https://huggingface.co/datasets/sunblaze-ucb/cybergym-server-binary/resolve/main/cybergym-server-data.7z
7z x cybergym-server-data.7zThat path needs a 7z extractor, and it changes how the server is launched later on, because the binary mode takes a `--binary_dir` argument instead of Docker images.
A third path is a 10-task subset described as five tasks an agent can solve plus five that are not easy for it:
arvo:47101
arvo:3938
arvo:24993
arvo:1065
arvo:10400
arvo:368
oss-fuzz:42535201
oss-fuzz:42535468
oss-fuzz:370689421
oss-fuzz:385167047The subset comes from `python scripts/server_data/download_subset.py`, and the full set from `python scripts/server_data/download.py --tasks-file ./cybergym_data/tasks.json`, so the tasks file produced by the first clone is what tells the second step what to pull.
One more dependency sits in the repository root: a `.gitmodules` file, so part of the checkout has to arrive through submodule initialization, yet the installation section never mentions submodules.
The bind address is a security decision, and 0.0.0.0 is the wrong one
The README is unusually direct about this. The submission server only needs to be reachable from the agent containers and from the host, and `0.0.0.0` binds every interface, which on a machine with a public IP exposes a partly unauthenticated service to the internet. The correct address is the gateway of whichever Docker network the agents run on, queried rather than guessed:
# If you use the firewall (agents on the isolated `cybergym-internal` network):
HOST=$(docker network inspect cybergym-internal -f '{{(index .IPAM.Config 0).Gateway}}')
# If agents run on the default bridge instead (no firewall):
HOST=$(docker network inspect bridge -f '{{(index .IPAM.Config 0).Gateway}}')
# If the agent runs directly on the host with no container at all:
HOST=127.0.0.1The two gateways are not interchangeable. `cybergym-internal` is created with `internal=True`, so its containers have no route to the default bridge, which means a server bound to `172.17.0.1` is unreachable from firewalled agents. Docker picks that subnet when the network is created, so the gateway is host-specific; the printed examples of 192.168.48.1 and 172.17.0.1 are illustrations rather than values to copy, and `python3 -m cybergym.firewall start` plus `status` both print the same value under the name `host_gateway`.
The same `$HOST` has to be reused in the `--server` argument when tasks are generated and when results are verified, otherwise the agent is handed an address nothing is listening on.
The default API key in the verification command is public
Verifying what an agent submitted goes through a script that takes the server URL, the PoC database and an agent identifier, and the agent identifier comes from the run's `logs/args.json`:
# NOTE: this is the public default placeholder key. Set your own via CYBERGYM_API_KEY
# on both the server and the client. It is not a substitute for keeping the server private.
export CYBERGYM_API_KEY=cybergym-030a0cd7-5908-4862-8ab9-91f2bfc7b56d
python3 scripts/verify_agent_result.py \
--server http://$SERVER_IP:$SERVER_PORT \
--pocdb_path $POC_SAVE_DIR/poc.db \
--agent_id 8113f33401d34ee3ae48cf823b757ac7Three facts sit in that block. The key is a placeholder that anyone who has read this repository already knows. The comment says plainly that swapping it is not a substitute for keeping the server private. And the example output shows the shape of a scored record with `task_id`, `poc_id` and `poc_hash`, which means submissions are content-addressed and stored in a SQLite file at `--db_path` inside the save directory alongside the logs.
The server takes `--host`, `--port`, `--mask_map_path`, `--log_dir` and `--db_path`, with `POC_SAVE_DIR=./server_poc` as the documented save location and `mask_map.json` from the repository root as the mask map. Since authentication is partial by the project's own description, the network boundary is the real access control, which is why the README opens by asking you to deploy everything locally and expose no part of CyberGym to the public internet.
The example output next to that command reports `task_id` `arvo:3848` for the agent identifier used in the same block, while the walkthrough elsewhere generates `arvo:10400`, so read that record as a shape illustration rather than something to match. The binary only server keeps every one of those arguments and appends `--binary_dir $CYBERGYM_SERVER_DATA_DIR`, so the two modes differ by a single path rather than by a different interface.
The firewall filters outbound traffic and nothing else
CyberGym ships a domain-allowlist proxy that confines agent containers to approved destinations, built on an isolated Docker network with no direct internet route so all outbound traffic has to pass through a Squid proxy filtered by domain. Its lifecycle is four commands:
python3 -m cybergym.firewall start
python3 -m cybergym.firewall status
python3 -m cybergym.firewall stop # stop proxy only
python3 -m cybergym.firewall stop-all # stop proxy and remove network`stop` leaves the network in place and `stop-all` removes it, which matters when you come back to the bind-address choice above. The built-in allowlist covers apt, pip and LLM APIs and lives at `src/cybergym/firewall/default_allowlist.txt`. Agent containers must be started on `cybergym-internal` and take their proxy environment from `ProxyManager.env_vars()`.
Because that network is created with `internal=True`, an agent that needs to reach an LLM API depends on the allowlist covering it, which the built-in list does, and anything else stays out until you add it to that text file yourself.
Two limits are stated and worth repeating. The firewall only filters outbound traffic from agent containers, and it does nothing about inbound reachability of the submission server, which stays a host-level binding and host-level firewall decision. Separately, `FirewallProxyManager.start()` adds the network gateway to `NO_PROXY` and to the proxy's IP allowlist, so traffic between an agent and the submission server bypasses Squid entirely, by design, since that path has to keep working while the proxy filters everything else.
Task generation hands the agent a directory it must read on its own
Generating one task takes an id, an output directory, a data directory, a server URL, a mask map and a difficulty:
TASK_ID='arvo:10400'
OUT_DIR=./cybergym_tmp
CYBERGYM_DATA_DIR=./cybergym_data/data
python3 -m cybergym.task.gen_task \
--task-id $TASK_ID \
--out-dir $OUT_DIR \
--data-dir $CYBERGYM_DATA_DIR \
--server "http://$SERVER_IP:$SERVER_PORT" \
--mask-map mask_map.json \
--difficulty level1The result is four files: `description.txt`, a per-task `README.md`, `repo-vul.tar.gz` and `submit.sh`. The README hands off the format to the documentation site rather than showing a flag list.
The smoke test is worth reading, because it shows what a submission looks like before any agent is involved:
echo -en "\x00\x01\x02\x03" > $OUT_DIR/poc
bash $OUT_DIRFour arbitrary bytes are written to a file named `poc`, then `submit.sh` is run, and the point is to confirm the whole path works end to end before you spend hours on a real agent run. A filler submission like that should score as a failure, which is exactly the baseline you want before an agent fills the database with real attempts.
`submit.sh` is generated by the tool, so its contents are not part of this repository, and the same holds for the per-task `README.md`, for `description.txt`, and for whatever `repo-vul.tar.gz` unpacks into. The only handles you hold over a generated task are the server URL you passed to `--server`, the mask map, and the difficulty level.
The sdist leaves the LICENSE out on purpose
The build configuration includes a commented-out license line:
[tool.hatch.build.targets.sdist]
include = [
"src/cybergym",
"README.md",
# "LICENSE",
]Apache-2.0 is declared as the project license and a LICENSE file sits at the repository root, but that file is not in the sdist include list. The wheel target lists only `packages = ["src/cybergym"]`, so neither distribution artifact carries the license text, which leaves anyone building from a source distribution without the terms attached to it. The `homepage` under `[project.urls]` also points at the GitHub repository rather than at the project site, even though the README links cybergym.io as the front door and the arXiv entry 2506.02548 as the paper behind the benchmark.
The lint configuration is more coherent. Ruff selects flake8-bugbear, isort, naming, pyupgrade, bandit, builtin shadowing, comprehensions, datetime timezone and debugger rules, sets a 120 character line length, and then ignores E501, the very rule that measures line length. The extras duplicate one entry, with `docker>=7.1.0` required by both the `dev` group and the `server` group, which is consistent since the same client library drives image pulls and container runs.
Leaderboard rules live in two files the README only links
Two documents carry the policy. `FAQ.md` covers benchmark setup questions such as network access, local deployment, pre- and post-patch versions, and how to interpret outcomes. `SUBMISSION.md` covers leaderboard submissions, including cost reporting and writeup requirements. Both are linked from a note block near the top of the README rather than summarized, so cost accounting and the rule about which patch version counts are not visible from the entry page alone.
The repository state is easy to date. The manifest version is `0.2.0`, there are no GitHub releases to go with it, the repository is not archived, and its last push is dated 2026-08-28. Anything you pin should be the commit you tested, because there is no tag to pin.
One detail about the firewall section matters before you rely on it. That section closes by pointing at `python3 -m cybergym.firewall --help` for more, and the sentence ends there after the fragment `for mor`, so everything beyond the start, status, stop and stop-all commands lives in the tool's own help output rather than in the page.
The root is small, eleven entries with no CI directory and no changelog, so there is no automated history to read and no release notes beyond the arXiv entry. The examples directory holds `examples/agents`, which is the natural place to see how a harness is expected to be wired in.
Editorial conclusion
CyberGym fits a research group that already runs Docker, has a machine measured in terabytes, and wants a scored comparison of agents against published vulnerabilities rather than against live targets. Verify three things before starting: disk, since full server data is about 10TB and the static-analysis path is about 130GB; network isolation, because the submission server is only partly authenticated and the default API key in the README is public; and the extras list, since the production dependencies are empty and `pip3 install -e '.[dev,server]'` is the line that makes anything import. Pin `0.2.0` from the manifest rather than a tag, and read FAQ.md and SUBMISSION.md before submitting anything to the leaderboard.
Frequently asked questions
What is the cybergym benchmark?
CyberGym is an evaluation framework for measuring AI agents on real vulnerability analysis. Each task is generated into a directory holding description.txt, a README.md, repo-vul.tar.gz and submit.sh, and the proof of concept an agent produces is scored against a submission server running on your own machine.
How does CyberGym work?
Install the extras with pip, clone the about 240GB benchmark data, download either the roughly 10TB full server data, the 10-task subset, or the roughly 130GB binary-only set, then run cybergym.task.gen_task for a task id and cybergym.server for the submission endpoint. After the agent runs, scripts/verify_agent_result.py checks submitted proofs of concept against the PoC database using the agent_id from logs/args.json.
Does CyberGym have to be reachable from the internet?
No. The README opens by asking you to deploy everything locally and expose no part of CyberGym to the public internet, and it notes that binding 0.0.0.0 on a machine with a public IP exposes a partly unauthenticated service. The firewall proxy only filters outbound traffic from agent containers, so inbound reachability stays a host binding and firewall decision.
How much data does CyberGym need?
The benchmark data is about 240GB and comes from the Hugging Face dataset through git lfs. Server data is about 10TB in full mode with compilation images, about 130GB in binary only mode for static analysis without a dynamic compilation environment, or the 10-task subset of five solvable and five harder tasks.
Is the CYBERGYM_API_KEY in the CyberGym README safe to keep?
It is labeled a public default placeholder key, and the comment beside it says to set your own via CYBERGYM_API_KEY on both the server and the client, and that doing so is not a substitute for keeping the server private. Since the submission server is described as only partly authenticated, the network boundary is what protects it.
Which Python version does CyberGym need?
`requires-python` in pyproject.toml is >=3.12. The README's stated prerequisites are a python and docker environment, with no Docker version given. The production dependencies list is empty, so pip3 install -e '.[dev,server]' is what actually installs the server and task generation dependencies.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/sunblaze-ucb-cybergym)Star history chart for your README
[](https://hysenlabs.com/projects/sunblaze-ucb-cybergym)Was this useful?