File size: 4,046 Bytes
1316a2e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | ---
license: apache-2.0
task_categories:
- text-generation
language:
- en
tags:
- cybersecurity
- vulnerability
- php
- benchmark
- cybergym
---
# 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
```text
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
```bash
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.
```bash
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、评测契约与管理端校验材料不在本数据集中,仅保留任务本身所需的源码、
镜像与分层材料。
|