You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Cybergym-Pro — PHP benchmark tasks

English | 中文

Snapshot: 2026-11-04. This dataset contains the PHP portion of the Cybergym-Pro benchmark: 199 task packages, each shipped with the same four-level material set used by the other language datasets in the same collection.

Layout

tasks/<task_id>/
  images/<task_id>-vul.tar.gz     # docker image archive, vulnerable build
  images/<task_id>-fix.tar.gz     # docker image archive, fixed build
  levels/level0/                  # repo-vul.tar.gz + README.md + submit.sh
  levels/level1/                  # + description.txt
  levels/level2/                  # + error.txt (reference input output on vul)
  levels/level3/                  # + patch.diff and repo-fix.tar.gz
  source/repo-vul.tar.gz          # vulnerable source snapshot
  source/repo-fix.tar.gz          # fixed source snapshot
  source/patch.diff               # upstream fix diff
  source/source-hashes.json       # archive hashes
  metadata.json                   # task id, CVE ids, upstream repo/commits, image tags
agent/cybergym-agent-php-1.tar.gz # PHP agent runtime image (docker save, gzipped)

<task_id> is the 16-hex Cybergym task id (e.g. 019e0f0b88563440); the CVE mapping is in each task's metadata.json (cve_ids).

Level semantics

  • level0: vulnerable source + README.md + submit.sh (run a PoC against the vulnerable build).
  • level1: adds description.txt — component and observable behaviour only, no CVE id, fix commit, patch or decision procedure.
  • level2: adds error.txt, the real output of the reference input on the vulnerable program.
  • level3: adds patch.diff and the fixed source archive.

All 199 task packages carry level0–level3; the six delivered PHP L1 batches (10/20/30/40/49/50) are represented exactly once.

Using the images

docker load -i tasks/<task_id>/images/<task_id>-vul.tar.gz
docker load -i tasks/<task_id>/images/<task_id>-fix.tar.gz
docker run --rm --network none -v /path/to/poc:/tmp/poc:ro \
  cybergym/php:<task_id>-vul /usr/local/bin/run_poc /tmp/poc

Each task exposes the same runtime contract: /usr/local/bin/run_poc <poc> executes the submitted PoC inside the task image. Detection is per-task and is derived from real vulnerable/fixed behaviour, never from exit status alone.

Agent runtime

agent/cybergym-agent-php-1.tar.gz is the gzipped docker save archive of the PHP agent image (cybergym-agent/php:1). It bundles PHP 8.4, Composer, Python, Node.js, Codex CLI, Claude Code and OpenHands.

gunzip -c agent/cybergym-agent-php-1.tar.gz | docker load
docker run --rm -it cybergym-agent/php:1

Notes

  • Reference PoCs, evaluation contracts and admin validation material are kept private and are not part of this dataset.
  • metadata.json records provenance only (upstream repository, vulnerable/fix commits, image tags, reference PoC hash); it contains no PoC source.
  • Task packages are provided for benchmark evaluation. Use them only in sandboxed environments you control.

中文说明

本数据集是 Cybergym-Pro 的 PHP 部分,共 199 个任务包,结构与同一 collection 中的其他语言数据集一致:

  • tasks/<task_id>/:任务包,含漏洞/修复两份镜像归档(images/)、四层材料 (levels/level0–level3)、源码快照与补丁(source/)、元数据(metadata.json);
  • agent/cybergym-agent-php-1.tar.gz:PHP agent 运行镜像(docker save 后 gzip)。

level0 只有漏洞源码与提交脚本;level1 增加描述;level2 增加参考输入在漏洞 版本上的真实输出;level3 增加补丁与修复源码。199 个任务全部具备四层材料。

参考 PoC、评测契约与管理端校验材料不在本数据集中,仅保留任务本身所需的源码、 镜像与分层材料。

Downloads last month
2,421

Collection including guan-wang/php