Upload folder using huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- cybersecurity
|
| 9 |
+
- vulnerability
|
| 10 |
+
- php
|
| 11 |
+
- benchmark
|
| 12 |
+
- cybergym
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Cybergym-Pro — PHP benchmark tasks
|
| 16 |
+
|
| 17 |
+
English | [中文](#中文说明)
|
| 18 |
+
|
| 19 |
+
Snapshot: **2026-11-04**. This dataset contains the PHP portion of the
|
| 20 |
+
Cybergym-Pro benchmark: **199 task packages**, each shipped with the same
|
| 21 |
+
four-level material set used by the other language datasets in the same
|
| 22 |
+
collection.
|
| 23 |
+
|
| 24 |
+
## Layout
|
| 25 |
+
|
| 26 |
+
```text
|
| 27 |
+
tasks/<task_id>/
|
| 28 |
+
images/<task_id>-vul.tar.gz # docker image archive, vulnerable build
|
| 29 |
+
images/<task_id>-fix.tar.gz # docker image archive, fixed build
|
| 30 |
+
levels/level0/ # repo-vul.tar.gz + README.md + submit.sh
|
| 31 |
+
levels/level1/ # + description.txt
|
| 32 |
+
levels/level2/ # + error.txt (reference input output on vul)
|
| 33 |
+
levels/level3/ # + patch.diff and repo-fix.tar.gz
|
| 34 |
+
source/repo-vul.tar.gz # vulnerable source snapshot
|
| 35 |
+
source/repo-fix.tar.gz # fixed source snapshot
|
| 36 |
+
source/patch.diff # upstream fix diff
|
| 37 |
+
source/source-hashes.json # archive hashes
|
| 38 |
+
metadata.json # task id, CVE ids, upstream repo/commits, image tags
|
| 39 |
+
agent/cybergym-agent-php-1.tar.gz # PHP agent runtime image (docker save, gzipped)
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
`<task_id>` is the 16-hex Cybergym task id (e.g. `019e0f0b88563440`); the CVE
|
| 43 |
+
mapping is in each task's `metadata.json` (`cve_ids`).
|
| 44 |
+
|
| 45 |
+
## Level semantics
|
| 46 |
+
|
| 47 |
+
- `level0`: vulnerable source + `README.md` + `submit.sh` (run a PoC against the
|
| 48 |
+
vulnerable build).
|
| 49 |
+
- `level1`: adds `description.txt` — component and observable behaviour only,
|
| 50 |
+
no CVE id, fix commit, patch or decision procedure.
|
| 51 |
+
- `level2`: adds `error.txt`, the real output of the reference input on the
|
| 52 |
+
vulnerable program.
|
| 53 |
+
- `level3`: adds `patch.diff` and the fixed source archive.
|
| 54 |
+
|
| 55 |
+
All 199 task packages carry `level0`–`level3`; the six delivered PHP L1 batches
|
| 56 |
+
(10/20/30/40/49/50) are represented exactly once.
|
| 57 |
+
|
| 58 |
+
## Using the images
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
docker load -i tasks/<task_id>/images/<task_id>-vul.tar.gz
|
| 62 |
+
docker load -i tasks/<task_id>/images/<task_id>-fix.tar.gz
|
| 63 |
+
docker run --rm --network none -v /path/to/poc:/tmp/poc:ro \
|
| 64 |
+
cybergym/php:<task_id>-vul /usr/local/bin/run_poc /tmp/poc
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Each task exposes the same runtime contract: `/usr/local/bin/run_poc <poc>`
|
| 68 |
+
executes the submitted PoC inside the task image. Detection is per-task and is
|
| 69 |
+
derived from real vulnerable/fixed behaviour, never from exit status alone.
|
| 70 |
+
|
| 71 |
+
## Agent runtime
|
| 72 |
+
|
| 73 |
+
`agent/cybergym-agent-php-1.tar.gz` is the gzipped `docker save` archive of the
|
| 74 |
+
PHP agent image (`cybergym-agent/php:1`). It bundles PHP 8.4, Composer, Python,
|
| 75 |
+
Node.js, Codex CLI, Claude Code and OpenHands.
|
| 76 |
+
|
| 77 |
+
```bash
|
| 78 |
+
gunzip -c agent/cybergym-agent-php-1.tar.gz | docker load
|
| 79 |
+
docker run --rm -it cybergym-agent/php:1
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
## Notes
|
| 83 |
+
|
| 84 |
+
- Reference PoCs, evaluation contracts and admin validation material are kept
|
| 85 |
+
private and are **not** part of this dataset.
|
| 86 |
+
- `metadata.json` records provenance only (upstream repository, vulnerable/fix
|
| 87 |
+
commits, image tags, reference PoC hash); it contains no PoC source.
|
| 88 |
+
- Task packages are provided for benchmark evaluation. Use them only in
|
| 89 |
+
sandboxed environments you control.
|
| 90 |
+
|
| 91 |
+
## 中文说明
|
| 92 |
+
|
| 93 |
+
本数据集是 Cybergym-Pro 的 PHP 部分,共 **199** 个任务包,结构与同一 collection
|
| 94 |
+
中的其他语言数据集一致:
|
| 95 |
+
|
| 96 |
+
- `tasks/<task_id>/`:任务包,含漏洞/修复两份镜像归档(`images/`)、四层材料
|
| 97 |
+
(`levels/level0`–`level3`)、源码快照与补丁(`source/`)、元数据(`metadata.json`);
|
| 98 |
+
- `agent/cybergym-agent-php-1.tar.gz`:PHP agent 运行镜像(docker save 后 gzip)。
|
| 99 |
+
|
| 100 |
+
`level0` 只有漏洞源码与提交脚本;`level1` 增加描述;`level2` 增加参考输入在漏洞
|
| 101 |
+
版本上的真实输出;`level3` 增加补丁与修复源码。199 个任务全部具备四层材料。
|
| 102 |
+
|
| 103 |
+
参考 PoC、评测契约与管理端校验材料不在本数据集中,仅保留任务本身所需的源码、
|
| 104 |
+
镜像与分层材料。
|