securevibebench 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {securevibebench-0.2.0/securevibebench.egg-info → securevibebench-0.2.1}/PKG-INFO +51 -28
- {securevibebench-0.2.0 → securevibebench-0.2.1}/README.md +50 -25
- {securevibebench-0.2.0 → securevibebench-0.2.1}/docs/README.md +19 -3
- securevibebench-0.2.1/docs/changeLog.md +17 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/cli.py +12 -2
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/editable_mini.py +65 -5
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/resources.json +107 -107
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/run.py +187 -14
- {securevibebench-0.2.0 → securevibebench-0.2.1}/pyproject.toml +1 -3
- {securevibebench-0.2.0 → securevibebench-0.2.1/securevibebench.egg-info}/PKG-INFO +51 -28
- {securevibebench-0.2.0 → securevibebench-0.2.1}/securevibebench.egg-info/SOURCES.txt +1 -1
- {securevibebench-0.2.0 → securevibebench-0.2.1}/securevibebench.egg-info/requires.txt +0 -2
- {securevibebench-0.2.0 → securevibebench-0.2.1}/tests/test_package.py +127 -5
- {securevibebench-0.2.0 → securevibebench-0.2.1}/tools/bundle_resources.py +1 -1
- {securevibebench-0.2.0 → securevibebench-0.2.1}/uv.lock +1 -525
- securevibebench-0.2.0/evaluation/README.md +0 -6
- {securevibebench-0.2.0 → securevibebench-0.2.1}/LICENSE +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/MANIFEST.in +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/THIRD_PARTY_NOTICES.md +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/build_backend.py +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/__init__.py +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/__main__.py +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/bootstrap.py +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/harbor.yaml +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/hf_verifier.py +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/mini-source.tar.gz +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/prepare.sh +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/resources.py +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/run.sh +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/evaluation/setup.sh +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/securevibebench.egg-info/dependency_links.txt +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/securevibebench.egg-info/entry_points.txt +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/securevibebench.egg-info/top_level.txt +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/setup.cfg +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/tests/test_bootstrap.py +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/tools/download_dataset.py +0 -0
- {securevibebench-0.2.0 → securevibebench-0.2.1}/tools/install.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: securevibebench
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Generate and evaluate secure coding agents on SecureVibeBench
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/iCSawyer/SecureVibeBench
|
|
@@ -18,8 +18,6 @@ Description-Content-Type: text/markdown
|
|
|
18
18
|
License-File: LICENSE
|
|
19
19
|
License-File: THIRD_PARTY_NOTICES.md
|
|
20
20
|
Requires-Dist: harbor<0.26.0,>=0.25.0
|
|
21
|
-
Requires-Dist: mini-swe-agent==2.4.6
|
|
22
|
-
Requires-Dist: huggingface-hub>=0.34.3
|
|
23
21
|
Requires-Dist: docker>=7.1.0
|
|
24
22
|
Requires-Dist: pyyaml>=6.0.2
|
|
25
23
|
Requires-Dist: python-dotenv>=1.1.1
|
|
@@ -28,23 +26,29 @@ Dynamic: license-file
|
|
|
28
26
|
# SecureVibeBench
|
|
29
27
|
|
|
30
28
|
<p align="left">
|
|
31
|
-
<img src="https://img.shields.io/badge/Version-v0.2-blue.svg?style=for-the-badge" alt="Version: v0.2">
|
|
29
|
+
<!-- <img src="https://img.shields.io/badge/Version-v0.2-blue.svg?style=for-the-badge" alt="Version: v0.2"> -->
|
|
32
30
|
<a href="https://2026.aclweb.org/"><img src="https://img.shields.io/badge/Venue-ACL%202026-2ea44f.svg?style=for-the-badge" alt="Venue: ACL 2026"></a>
|
|
33
31
|
<a href="https://arxiv.org/abs/2509.22097"><img src="https://img.shields.io/badge/arXiv-2509.22097-b31b1b.svg?style=for-the-badge" alt="arXiv"></a>
|
|
34
|
-
<a href="https://huggingface.co/datasets/iCSawyer/SecureVibeBench"><img src="https://img.shields.io/badge/
|
|
35
|
-
<a href="https://
|
|
32
|
+
<a href="https://huggingface.co/datasets/iCSawyer/SecureVibeBench"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fhuggingface.co%2Fapi%2Fdatasets%2FiCSawyer%2FSecureVibeBench%3Fexpand%255B%255D%3DdownloadsAllTime&query=%24.downloadsAllTime&label=Downloads&color=FFD21F&style=for-the-badge&logo=huggingface" alt="Hugging Face Downloads"></a>
|
|
33
|
+
<!-- <a href="https://huggingface.co/datasets/iCSawyer/SecureVibeBench"><img src="https://img.shields.io/badge/HF-SecureVibeBench-FFD21F.svg?style=for-the-badge&logo=huggingface" alt="Hugging Face: SecureVibeBench"></a> -->
|
|
34
|
+
<!-- <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="License MIT"></a> -->
|
|
36
35
|
<!-- <a href="https://chen-junkai.github.io/securevibebench-leaderboard/"><img src="https://img.shields.io/badge/Leaderboard-Online-2ea44f.svg?style=for-the-badge" alt="Leaderboard"></a> -->
|
|
37
36
|
</p>
|
|
38
37
|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
39
41
|
> [!IMPORTANT]
|
|
40
|
-
> **SecureVibeBench is now v0.2!**
|
|
42
|
+
> **SecureVibeBench is now v0.2!** Just try `pip install securevibebench`!
|
|
41
43
|
>
|
|
42
|
-
> We
|
|
44
|
+
> We are updating the evaluation criteria and workflow currently, so **the results obtained may differ from v0.1**.
|
|
45
|
+
> Please report any usage issues you encouter via Issues or my [email](mailto:junkaichen@smu.edu.sg), and we will investigate and fix as soon as possible. 🙏
|
|
43
46
|
|
|
44
47
|
<p align="left">
|
|
45
48
|
✨ <a href="#nav-news">News</a>
|
|
46
49
|
| 🛠️ <a href="#nav-quick-start">Quick Start</a>
|
|
47
50
|
| 🔭 <a href="#nav-overview">Overview</a>
|
|
51
|
+
| 🗺️ <a href="#nav-roadmap">Roadmap</a>
|
|
48
52
|
| 📚 <a href="#nav-citation">Citation</a>
|
|
49
53
|
| 🙏 <a href="#nav-acknowledgments">Acknowledgments</a>
|
|
50
54
|
</p>
|
|
@@ -53,7 +57,7 @@ Dynamic: license-file
|
|
|
53
57
|
|
|
54
58
|
## ✨ News
|
|
55
59
|
|
|
56
|
-
- **[2026-10-29]** We updated to **v0.2**, introducing a PyPI package, Harbor-format tasks, and unified model
|
|
60
|
+
- **[2026-10-29]** We updated to **v0.2**, introducing a PyPI package, Harbor-format tasks, and unified model evaluation. The original version is now referred to as **v0.1**.
|
|
57
61
|
<!-- - **[2026-06-06]** 🏆 We released the online [Leaderboard](https://chen-junkai.github.io/securevibebench-leaderboard/) for SecureVibeBench.
|
|
58
62
|
- **[2026-04-15]** 🤗 We support the usage via [Hugging Face Datasets](https://huggingface.co/datasets/iCSawyer/SecureVibeBench).
|
|
59
63
|
- **[2026-04-11]** 🚀 We released code and data for SecureVibeBench. -->
|
|
@@ -64,24 +68,21 @@ Dynamic: license-file
|
|
|
64
68
|
|
|
65
69
|
## 🛠️ Quick Start
|
|
66
70
|
|
|
67
|
-
Requirements: Python 3.12+, Linux
|
|
71
|
+
Requirements: Python 3.12+, Linux, and Docker.
|
|
68
72
|
|
|
69
73
|
### Install
|
|
70
74
|
|
|
71
|
-
We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) for managing Python environments.
|
|
75
|
+
We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) for managing Python environments.
|
|
72
76
|
|
|
73
77
|
```bash
|
|
74
|
-
# Run without installing into your current environment
|
|
75
|
-
uvx securevibebench --help
|
|
76
|
-
|
|
77
|
-
# Or install into an active virtual environment
|
|
78
78
|
uv pip install securevibebench
|
|
79
|
-
|
|
79
|
+
```
|
|
80
|
+
```bash
|
|
80
81
|
# Or with pip
|
|
81
82
|
pip install securevibebench
|
|
82
83
|
```
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
Task containers will be prepared when the real evaluation starts.
|
|
85
86
|
|
|
86
87
|
### For development
|
|
87
88
|
|
|
@@ -91,24 +92,19 @@ cd SecureVibeBench
|
|
|
91
92
|
uv sync # editable install + development tools
|
|
92
93
|
```
|
|
93
94
|
|
|
94
|
-
Use `uv run securevibebench eval ...` for the development checkout, or activate `.venv/bin/activate`.
|
|
95
|
-
|
|
96
|
-
Without uv, use `python tools/install.py --dev --installer pip` in an active virtual environment.
|
|
97
|
-
|
|
98
95
|
### Run evaluation
|
|
99
96
|
|
|
100
97
|
```bash
|
|
101
98
|
export OPENAI_API_KEY='<your-api-key>'
|
|
102
99
|
export MODEL='openai/<model-name>'
|
|
103
100
|
|
|
104
|
-
# With uv, without a persistent installation
|
|
105
|
-
uvx securevibebench eval --model "$MODEL" --task 992
|
|
106
|
-
|
|
107
|
-
# Or after installing the package
|
|
108
101
|
securevibebench eval --model "$MODEL" --task 992
|
|
102
|
+
# securevibebench eval --model "$MODEL" # all 105 tasks
|
|
109
103
|
```
|
|
110
104
|
|
|
111
|
-
|
|
105
|
+
Results are saved to `runs/<job>/summary.json` under the current working directory.
|
|
106
|
+
|
|
107
|
+
We disable static vulnerability analysis by default. Enable it with `--run-sast TRUE` and configure Semgrep credentials such as `SEMGREP_APP_TOKEN`.
|
|
112
108
|
|
|
113
109
|
> [!NOTE]
|
|
114
110
|
> For custom endpoints, development setup, and more details, see the [Usage Guide](https://github.com/iCSawyer/SecureVibeBench/blob/main/docs/README.md). Run `securevibebench eval --help` for evaluation options.
|
|
@@ -134,11 +130,18 @@ To comprehensively evaluate the generated code of code agents, we conduct (i) **
|
|
|
134
130
|
> - No other secure coding benchmark considering (i) functional correctness, (ii) PoV-based evaluation, and (iii) SAST tool-based new security issue detection.
|
|
135
131
|
|
|
136
132
|
|
|
133
|
+
<a id="nav-roadmap"></a>
|
|
134
|
+
|
|
135
|
+
## 🗺️ Roadmap
|
|
136
|
+
|
|
137
|
+
- [ ] **Cascaded LLM-as-a-judge.** Add an LLM judge as a final stage after the functional checks. Its verdicts would be reported separately so they don't change the existing scores.
|
|
138
|
+
|
|
139
|
+
|
|
137
140
|
<a id="nav-citation"></a>
|
|
138
141
|
|
|
139
142
|
## 📚 Citation
|
|
140
143
|
|
|
141
|
-
If you find
|
|
144
|
+
If you find our project useful, please consider citing our paper:
|
|
142
145
|
|
|
143
146
|
```bibtex
|
|
144
147
|
@inproceedings{chen2026securevibebench,
|
|
@@ -160,7 +163,7 @@ If you find SecureVibeBench useful, please cite:
|
|
|
160
163
|
|
|
161
164
|
## 🙏 Acknowledgments
|
|
162
165
|
|
|
163
|
-
Our work builds on [OSS-Fuzz](https://github.com/google/oss-fuzz)
|
|
166
|
+
Our work builds on the following excellent works, and please consider citing them: [OSS-Fuzz](https://github.com/google/oss-fuzz), [ARVO](https://arxiv.org/abs/2408.02153), [habour](https://github.com/harbor-framework/harbor), and [mini-SWE-agent](https://github.com/SWE-agent/mini-swe-agent).
|
|
164
167
|
|
|
165
168
|
```bibtex
|
|
166
169
|
@misc{mei2024arvoatlasreproduciblevulnerabilities,
|
|
@@ -181,3 +184,23 @@ Our work builds on [OSS-Fuzz](https://github.com/google/oss-fuzz) and [ARVO](htt
|
|
|
181
184
|
year = {2017}
|
|
182
185
|
}
|
|
183
186
|
```
|
|
187
|
+
|
|
188
|
+
```bibtex
|
|
189
|
+
@software{Harbor_Framework,
|
|
190
|
+
author = {{Harbor Framework Team}},
|
|
191
|
+
title = {{Harbor: A framework for evaluating and optimizing agents and models in container environments}},
|
|
192
|
+
year = {2026},
|
|
193
|
+
doi = {10.5281/zenodo.20953922},
|
|
194
|
+
url = {https://doi.org/10.5281/zenodo.20953922}
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
```bibtex
|
|
199
|
+
@inproceedings{yang2024sweagent,
|
|
200
|
+
title={{SWE}-agent: Agent-Computer Interfaces Enable Automated Software Engineering},
|
|
201
|
+
author={John Yang and Carlos E Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik R Narasimhan and Ofir Press},
|
|
202
|
+
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
|
|
203
|
+
year={2024},
|
|
204
|
+
url={https://arxiv.org/abs/2405.15793}
|
|
205
|
+
}
|
|
206
|
+
```
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
# SecureVibeBench
|
|
2
2
|
|
|
3
3
|
<p align="left">
|
|
4
|
-
<img src="https://img.shields.io/badge/Version-v0.2-blue.svg?style=for-the-badge" alt="Version: v0.2">
|
|
4
|
+
<!-- <img src="https://img.shields.io/badge/Version-v0.2-blue.svg?style=for-the-badge" alt="Version: v0.2"> -->
|
|
5
5
|
<a href="https://2026.aclweb.org/"><img src="https://img.shields.io/badge/Venue-ACL%202026-2ea44f.svg?style=for-the-badge" alt="Venue: ACL 2026"></a>
|
|
6
6
|
<a href="https://arxiv.org/abs/2509.22097"><img src="https://img.shields.io/badge/arXiv-2509.22097-b31b1b.svg?style=for-the-badge" alt="arXiv"></a>
|
|
7
|
-
<a href="https://huggingface.co/datasets/iCSawyer/SecureVibeBench"><img src="https://img.shields.io/badge/
|
|
8
|
-
<a href="https://
|
|
7
|
+
<a href="https://huggingface.co/datasets/iCSawyer/SecureVibeBench"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fhuggingface.co%2Fapi%2Fdatasets%2FiCSawyer%2FSecureVibeBench%3Fexpand%255B%255D%3DdownloadsAllTime&query=%24.downloadsAllTime&label=Downloads&color=FFD21F&style=for-the-badge&logo=huggingface" alt="Hugging Face Downloads"></a>
|
|
8
|
+
<!-- <a href="https://huggingface.co/datasets/iCSawyer/SecureVibeBench"><img src="https://img.shields.io/badge/HF-SecureVibeBench-FFD21F.svg?style=for-the-badge&logo=huggingface" alt="Hugging Face: SecureVibeBench"></a> -->
|
|
9
|
+
<!-- <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="License MIT"></a> -->
|
|
9
10
|
<!-- <a href="https://chen-junkai.github.io/securevibebench-leaderboard/"><img src="https://img.shields.io/badge/Leaderboard-Online-2ea44f.svg?style=for-the-badge" alt="Leaderboard"></a> -->
|
|
10
11
|
</p>
|
|
11
12
|
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
> [!IMPORTANT]
|
|
13
|
-
> **SecureVibeBench is now v0.2!**
|
|
17
|
+
> **SecureVibeBench is now v0.2!** Just try `pip install securevibebench`!
|
|
14
18
|
>
|
|
15
|
-
> We
|
|
19
|
+
> We are updating the evaluation criteria and workflow currently, so **the results obtained may differ from v0.1**.
|
|
20
|
+
> Please report any usage issues you encouter via Issues or my [email](mailto:junkaichen@smu.edu.sg), and we will investigate and fix as soon as possible. 🙏
|
|
16
21
|
|
|
17
22
|
<p align="left">
|
|
18
23
|
✨ <a href="#nav-news">News</a>
|
|
19
24
|
| 🛠️ <a href="#nav-quick-start">Quick Start</a>
|
|
20
25
|
| 🔭 <a href="#nav-overview">Overview</a>
|
|
26
|
+
| 🗺️ <a href="#nav-roadmap">Roadmap</a>
|
|
21
27
|
| 📚 <a href="#nav-citation">Citation</a>
|
|
22
28
|
| 🙏 <a href="#nav-acknowledgments">Acknowledgments</a>
|
|
23
29
|
</p>
|
|
@@ -26,7 +32,7 @@
|
|
|
26
32
|
|
|
27
33
|
## ✨ News
|
|
28
34
|
|
|
29
|
-
- **[2026-10-29]** We updated to **v0.2**, introducing a PyPI package, Harbor-format tasks, and unified model
|
|
35
|
+
- **[2026-10-29]** We updated to **v0.2**, introducing a PyPI package, Harbor-format tasks, and unified model evaluation. The original version is now referred to as **v0.1**.
|
|
30
36
|
<!-- - **[2026-06-06]** 🏆 We released the online [Leaderboard](https://chen-junkai.github.io/securevibebench-leaderboard/) for SecureVibeBench.
|
|
31
37
|
- **[2026-04-15]** 🤗 We support the usage via [Hugging Face Datasets](https://huggingface.co/datasets/iCSawyer/SecureVibeBench).
|
|
32
38
|
- **[2026-04-11]** 🚀 We released code and data for SecureVibeBench. -->
|
|
@@ -37,24 +43,21 @@
|
|
|
37
43
|
|
|
38
44
|
## 🛠️ Quick Start
|
|
39
45
|
|
|
40
|
-
Requirements: Python 3.12+, Linux
|
|
46
|
+
Requirements: Python 3.12+, Linux, and Docker.
|
|
41
47
|
|
|
42
48
|
### Install
|
|
43
49
|
|
|
44
|
-
We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) for managing Python environments.
|
|
50
|
+
We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) for managing Python environments.
|
|
45
51
|
|
|
46
52
|
```bash
|
|
47
|
-
# Run without installing into your current environment
|
|
48
|
-
uvx securevibebench --help
|
|
49
|
-
|
|
50
|
-
# Or install into an active virtual environment
|
|
51
53
|
uv pip install securevibebench
|
|
52
|
-
|
|
54
|
+
```
|
|
55
|
+
```bash
|
|
53
56
|
# Or with pip
|
|
54
57
|
pip install securevibebench
|
|
55
58
|
```
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
Task containers will be prepared when the real evaluation starts.
|
|
58
61
|
|
|
59
62
|
### For development
|
|
60
63
|
|
|
@@ -64,24 +67,19 @@ cd SecureVibeBench
|
|
|
64
67
|
uv sync # editable install + development tools
|
|
65
68
|
```
|
|
66
69
|
|
|
67
|
-
Use `uv run securevibebench eval ...` for the development checkout, or activate `.venv/bin/activate`.
|
|
68
|
-
|
|
69
|
-
Without uv, use `python tools/install.py --dev --installer pip` in an active virtual environment.
|
|
70
|
-
|
|
71
70
|
### Run evaluation
|
|
72
71
|
|
|
73
72
|
```bash
|
|
74
73
|
export OPENAI_API_KEY='<your-api-key>'
|
|
75
74
|
export MODEL='openai/<model-name>'
|
|
76
75
|
|
|
77
|
-
# With uv, without a persistent installation
|
|
78
|
-
uvx securevibebench eval --model "$MODEL" --task 992
|
|
79
|
-
|
|
80
|
-
# Or after installing the package
|
|
81
76
|
securevibebench eval --model "$MODEL" --task 992
|
|
77
|
+
# securevibebench eval --model "$MODEL" # all 105 tasks
|
|
82
78
|
```
|
|
83
79
|
|
|
84
|
-
|
|
80
|
+
Results are saved to `runs/<job>/summary.json` under the current working directory.
|
|
81
|
+
|
|
82
|
+
We disable static vulnerability analysis by default. Enable it with `--run-sast TRUE` and configure Semgrep credentials such as `SEMGREP_APP_TOKEN`.
|
|
85
83
|
|
|
86
84
|
> [!NOTE]
|
|
87
85
|
> For custom endpoints, development setup, and more details, see the [Usage Guide](https://github.com/iCSawyer/SecureVibeBench/blob/main/docs/README.md). Run `securevibebench eval --help` for evaluation options.
|
|
@@ -107,11 +105,18 @@ To comprehensively evaluate the generated code of code agents, we conduct (i) **
|
|
|
107
105
|
> - No other secure coding benchmark considering (i) functional correctness, (ii) PoV-based evaluation, and (iii) SAST tool-based new security issue detection.
|
|
108
106
|
|
|
109
107
|
|
|
108
|
+
<a id="nav-roadmap"></a>
|
|
109
|
+
|
|
110
|
+
## 🗺️ Roadmap
|
|
111
|
+
|
|
112
|
+
- [ ] **Cascaded LLM-as-a-judge.** Add an LLM judge as a final stage after the functional checks. Its verdicts would be reported separately so they don't change the existing scores.
|
|
113
|
+
|
|
114
|
+
|
|
110
115
|
<a id="nav-citation"></a>
|
|
111
116
|
|
|
112
117
|
## 📚 Citation
|
|
113
118
|
|
|
114
|
-
If you find
|
|
119
|
+
If you find our project useful, please consider citing our paper:
|
|
115
120
|
|
|
116
121
|
```bibtex
|
|
117
122
|
@inproceedings{chen2026securevibebench,
|
|
@@ -133,7 +138,7 @@ If you find SecureVibeBench useful, please cite:
|
|
|
133
138
|
|
|
134
139
|
## 🙏 Acknowledgments
|
|
135
140
|
|
|
136
|
-
Our work builds on [OSS-Fuzz](https://github.com/google/oss-fuzz)
|
|
141
|
+
Our work builds on the following excellent works, and please consider citing them: [OSS-Fuzz](https://github.com/google/oss-fuzz), [ARVO](https://arxiv.org/abs/2408.02153), [habour](https://github.com/harbor-framework/harbor), and [mini-SWE-agent](https://github.com/SWE-agent/mini-swe-agent).
|
|
137
142
|
|
|
138
143
|
```bibtex
|
|
139
144
|
@misc{mei2024arvoatlasreproduciblevulnerabilities,
|
|
@@ -154,3 +159,23 @@ Our work builds on [OSS-Fuzz](https://github.com/google/oss-fuzz) and [ARVO](htt
|
|
|
154
159
|
year = {2017}
|
|
155
160
|
}
|
|
156
161
|
```
|
|
162
|
+
|
|
163
|
+
```bibtex
|
|
164
|
+
@software{Harbor_Framework,
|
|
165
|
+
author = {{Harbor Framework Team}},
|
|
166
|
+
title = {{Harbor: A framework for evaluating and optimizing agents and models in container environments}},
|
|
167
|
+
year = {2026},
|
|
168
|
+
doi = {10.5281/zenodo.20953922},
|
|
169
|
+
url = {https://doi.org/10.5281/zenodo.20953922}
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```bibtex
|
|
174
|
+
@inproceedings{yang2024sweagent,
|
|
175
|
+
title={{SWE}-agent: Agent-Computer Interfaces Enable Automated Software Engineering},
|
|
176
|
+
author={John Yang and Carlos E Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik R Narasimhan and Ofir Press},
|
|
177
|
+
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
|
|
178
|
+
year={2024},
|
|
179
|
+
url={https://arxiv.org/abs/2405.15793}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
@@ -17,7 +17,7 @@ pip install securevibebench
|
|
|
17
17
|
|
|
18
18
|
Create a virtual environment first if needed: `uv venv` or `python -m venv .venv`, then `source .venv/bin/activate`.
|
|
19
19
|
|
|
20
|
-
Installation downloads the pinned 105-task dataset and original evaluator from Hugging Face.
|
|
20
|
+
Installation downloads the pinned 105-task dataset and original evaluator from Hugging Face. mini-swe-agent is installed inside task containers when evaluation starts; it is not installed on the host. Docker images and container tools are prepared automatically.
|
|
21
21
|
|
|
22
22
|
## Source installation and development
|
|
23
23
|
|
|
@@ -60,11 +60,27 @@ securevibebench eval --model 'openai/<model-name>' --task 992 \
|
|
|
60
60
|
|
|
61
61
|
The endpoint must be reachable from task containers. Set the key to `unused` if authentication is disabled. SAST is disabled by default. To enable it, pass `--run-sast TRUE` and provide Semgrep configuration and credentials such as `SEMGREP_APP_TOKEN`. See `securevibebench eval --help` for options.
|
|
62
62
|
|
|
63
|
+
## Agent installation cache
|
|
64
|
+
|
|
65
|
+
Each task container needs uv, a managed Python, and mini-swe-agent. The first task downloads and installs them, then saves the result to `.cache/securevibebench/agent-toolchain/` in the current working directory; later tasks restore that archive instead of downloading again (about 25 seconds instead of several minutes). Archives are keyed by the container's `$HOME`, CPU architecture, and C library, so images that cannot share one get their own. If a restore fails, the task installs from scratch. Delete the directory to force a fresh install.
|
|
66
|
+
|
|
67
|
+
## Interrupt and resume
|
|
68
|
+
|
|
69
|
+
Progress is printed as one line per task phase. Ctrl-C, `SIGTERM`, or `SIGHUP` stops the run, removes its task and evaluator containers, and keeps finished tasks in `summary.json` (`"status": "interrupted"`). Continue later with the saved settings; finished tasks are not rerun:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
securevibebench eval --resume runs/<job>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Resuming also removes containers left by a run that was killed outright (for example with `SIGKILL`).
|
|
76
|
+
|
|
63
77
|
## Results
|
|
64
78
|
|
|
65
|
-
Results are written to `runs/<job>/summary.json` under the current working directory, alongside trajectories, patches, and original reports. Functional and PoV security scores remain independent and retain the original scoring rules.
|
|
79
|
+
Results are written to `runs/<job>/summary.json` under the current working directory, alongside trajectories, patches, and original reports. The summary is updated after every finished task. Functional and PoV security scores remain independent and retain the original scoring rules.
|
|
80
|
+
|
|
81
|
+
Since v0.2.1 the functional-test parser reads parallel `ctest -j` output per test. The Wireshark tasks interleave output from concurrent tests, and the original parser could pair a test with another test's status, misreporting passes and failures. Functional results for those tasks can therefore differ from v0.2.0 and v0.1; other tasks are unaffected. Locally cached baselines are rebuilt automatically.
|
|
66
82
|
|
|
67
|
-
|
|
83
|
+
Runtime caches live next to `runs/` in the current working directory: resources and functional-test baselines in `.cache/securevibebench/resources/`, and the agent toolchain in `.cache/securevibebench/agent-toolchain/`. The dataset downloaded during installation is cached in `~/.cache/securevibebench/huggingface/` (respects `XDG_CACHE_HOME`). The package's `resources.json` records upstream commits and checksums. No `dev/` directory is required.
|
|
68
84
|
|
|
69
85
|
## Developer checks
|
|
70
86
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## v0.2.1
|
|
4
|
+
|
|
5
|
+
- **Bug fix: functional evaluation of task 10172 and the other Wireshark tasks.** Their test scripts run `ctest -j`, which interleaves output from concurrent tests. The parser could attach a test name to another test's status and also counted summaries such as `OK (skipped=2)` as tests. For example, a 10172 patch that passed every test scored `functional = 0`. The parser now reads each test's output on its own. Functional scores for these tasks can differ from v0.2.0 and v0.1; other tasks are unaffected. The dataset is pinned to HF `habour-preview` commit `5fa48dd`.
|
|
6
|
+
- Interrupting a run with Ctrl-C, `SIGTERM`, or `SIGHUP` now removes its containers and keeps finished tasks in `summary.json`. Continue the run with `securevibebench eval --resume runs/<job>`.
|
|
7
|
+
- `summary.json` is updated after each task, and progress prints one line per task phase.
|
|
8
|
+
- The agent toolchain is cached across tasks. Runtime caches (resources, baselines, agent toolchain) now live in `.cache/securevibebench/` under the working directory, next to `runs/`.
|
|
9
|
+
- mini-swe-agent runs only inside task containers and is no longer installed on the host.
|
|
10
|
+
- Added `securevibebench --version`.
|
|
11
|
+
|
|
12
|
+
## v0.2.0
|
|
13
|
+
|
|
14
|
+
- First PyPI release: `pip install securevibebench` installs all 105 tasks and the original evaluator from Hugging Face. The tasks use the Harbor format.
|
|
15
|
+
- A single command, `securevibebench eval`, generates code with mini-swe-agent and evaluates it, and works with custom OpenAI-compatible endpoints.
|
|
16
|
+
- SAST is disabled by default; enable it with `--run-sast TRUE`.
|
|
17
|
+
- Task instructions, tests, and scoring logic are unchanged from v0.1, but results can differ because the agent and evaluation workflow changed.
|
|
@@ -3,20 +3,30 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import argparse
|
|
6
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
6
7
|
import sys
|
|
7
8
|
|
|
8
9
|
from . import run
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
def package_version() -> str:
|
|
13
|
+
try:
|
|
14
|
+
return version("securevibebench")
|
|
15
|
+
except PackageNotFoundError:
|
|
16
|
+
return "unknown"
|
|
17
|
+
|
|
18
|
+
|
|
11
19
|
def build_parser() -> argparse.ArgumentParser:
|
|
12
20
|
parser = argparse.ArgumentParser(
|
|
13
21
|
prog="securevibebench", description="Run secure coding agent benchmarks.",
|
|
14
22
|
)
|
|
23
|
+
parser.add_argument("--version", action="version", version=f"%(prog)s {package_version()}")
|
|
15
24
|
commands = parser.add_subparsers(dest="command", required=True)
|
|
16
|
-
commands.add_parser(
|
|
25
|
+
evaluation = commands.add_parser(
|
|
17
26
|
"eval", help="Generate and evaluate code on SecureVibeBench tasks",
|
|
18
27
|
description=run.__doc__, parents=[run.build_parser()], add_help=False,
|
|
19
28
|
)
|
|
29
|
+
evaluation.set_defaults(usage_error=evaluation.error)
|
|
20
30
|
return parser
|
|
21
31
|
|
|
22
32
|
|
|
@@ -26,4 +36,4 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
26
36
|
if not arguments:
|
|
27
37
|
parser.print_help()
|
|
28
38
|
return 0
|
|
29
|
-
return run.evaluate(parser.parse_args(arguments))
|
|
39
|
+
return run.evaluate(run.check_arguments(parser.parse_args(arguments)))
|
|
@@ -6,19 +6,30 @@ version detection, and ATIF conversion are inherited from Harbor's integration.
|
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
+
import hashlib
|
|
9
10
|
import json
|
|
11
|
+
import os
|
|
10
12
|
from pathlib import Path
|
|
11
13
|
import shlex
|
|
12
14
|
import shutil
|
|
13
15
|
import tempfile
|
|
14
16
|
from typing import Any
|
|
15
17
|
|
|
16
|
-
from harbor.agents.installed.mini_swe_agent import
|
|
18
|
+
from harbor.agents.installed.mini_swe_agent import (
|
|
19
|
+
_MINI_SWE_AGENT_PYTHON_VERSION, MiniSweAgent, MiniSweAgentOptions,
|
|
20
|
+
)
|
|
17
21
|
from harbor.environments.base import BaseEnvironment
|
|
18
22
|
from pydantic import Field
|
|
19
23
|
|
|
20
24
|
|
|
21
25
|
REMOTE_SOURCE = "/installed-agent/mini-swe-agent-source"
|
|
26
|
+
REMOTE_TOOLCHAIN = "/tmp/securevibebench-agent-toolchain.tar.gz"
|
|
27
|
+
# uv, its managed Python, and the mini-swe-agent tool environment, relative to $HOME.
|
|
28
|
+
TOOLCHAIN_PATHS = ".local/bin .local/share/uv"
|
|
29
|
+
AGENT_PATH = (
|
|
30
|
+
'if [ -f "$HOME/.local/bin/env" ]; then . "$HOME/.local/bin/env"; fi; '
|
|
31
|
+
'export PATH="$HOME/.local/bin:$PATH"; '
|
|
32
|
+
)
|
|
22
33
|
|
|
23
34
|
|
|
24
35
|
def copy_source(source: Path, target: Path) -> None:
|
|
@@ -59,22 +70,71 @@ print(json.dumps({{"version": dist.version, "editable": True, "url": direct["url
|
|
|
59
70
|
|
|
60
71
|
class EditableMiniSweAgentOptions(MiniSweAgentOptions):
|
|
61
72
|
source_dir: str = Field(description="Local official mini-swe-agent source checkout to install editable")
|
|
73
|
+
toolchain_cache_dir: str | None = Field(
|
|
74
|
+
default=None, description="Host directory reusing the installed agent toolchain across tasks")
|
|
62
75
|
|
|
63
76
|
|
|
64
77
|
class EditableMiniSweAgent(MiniSweAgent):
|
|
65
78
|
options_model = EditableMiniSweAgentOptions
|
|
66
79
|
options: EditableMiniSweAgentOptions
|
|
67
80
|
|
|
68
|
-
def __init__(self, *, source_dir: str | Path,
|
|
81
|
+
def __init__(self, *, source_dir: str | Path, toolchain_cache_dir: str | Path | None = None,
|
|
82
|
+
**kwargs: Any) -> None:
|
|
69
83
|
self.source_dir = Path(source_dir).resolve()
|
|
70
84
|
for relative in ("pyproject.toml", "README.md", "LICENSE.md", "src/minisweagent/__init__.py"):
|
|
71
85
|
if not (self.source_dir / relative).is_file():
|
|
72
86
|
raise ValueError(f"Incomplete mini-swe-agent checkout: {self.source_dir / relative}")
|
|
73
|
-
|
|
87
|
+
self.toolchain_cache_dir = Path(toolchain_cache_dir).resolve() if toolchain_cache_dir else None
|
|
88
|
+
super().__init__(source_dir=str(self.source_dir),
|
|
89
|
+
toolchain_cache_dir=str(self.toolchain_cache_dir) if self.toolchain_cache_dir else None,
|
|
90
|
+
**kwargs)
|
|
91
|
+
|
|
92
|
+
async def toolchain_archive(self, environment: BaseEnvironment) -> Path | None:
|
|
93
|
+
"""Cache key: binaries and wheels only run where $HOME, arch, and libc match."""
|
|
94
|
+
if self.toolchain_cache_dir is None:
|
|
95
|
+
return None
|
|
96
|
+
probe = await self.exec_as_agent(
|
|
97
|
+
environment, command='printf "%s|%s|%s" "$HOME" "$(uname -m)" "$(ldd --version 2>&1 | head -n 1)"')
|
|
98
|
+
key = hashlib.sha256(f"{probe.stdout}|{self._version}|{_MINI_SWE_AGENT_PYTHON_VERSION}".encode())
|
|
99
|
+
return self.toolchain_cache_dir / f"mini-swe-agent-{self._version}-{key.hexdigest()[:16]}.tar.gz"
|
|
100
|
+
|
|
101
|
+
async def restore_toolchain(self, environment: BaseEnvironment, archive: Path | None) -> bool:
|
|
102
|
+
if archive is None or not archive.is_file():
|
|
103
|
+
return False
|
|
104
|
+
try:
|
|
105
|
+
await self.ensure_system_dependencies(environment, ("bash", "git"))
|
|
106
|
+
await environment.upload_file(source_path=archive, target_path=REMOTE_TOOLCHAIN)
|
|
107
|
+
await self.exec_as_agent(environment, command=(
|
|
108
|
+
f'tar -xzf {REMOTE_TOOLCHAIN} -C "$HOME" && rm -f {REMOTE_TOOLCHAIN} && '
|
|
109
|
+
'if ! grep -q \'export PATH="$HOME/.local/bin:$PATH"\' "$HOME/.bashrc" 2>/dev/null; then'
|
|
110
|
+
' echo \'export PATH="$HOME/.local/bin:$PATH"\' >> "$HOME/.bashrc"; fi; '
|
|
111
|
+
+ AGENT_PATH + "mini-swe-agent --help >/dev/null"))
|
|
112
|
+
except Exception as error:
|
|
113
|
+
self.logger.warning(f"Cached agent toolchain {archive} is unusable, reinstalling: {error}")
|
|
114
|
+
return False
|
|
115
|
+
return True
|
|
116
|
+
|
|
117
|
+
async def save_toolchain(self, environment: BaseEnvironment, archive: Path | None) -> None:
|
|
118
|
+
if archive is None:
|
|
119
|
+
return
|
|
120
|
+
try:
|
|
121
|
+
await self.exec_as_agent(
|
|
122
|
+
environment, command=f'tar -czf {REMOTE_TOOLCHAIN} -C "$HOME" {TOOLCHAIN_PATHS}')
|
|
123
|
+
archive.parent.mkdir(parents=True, exist_ok=True)
|
|
124
|
+
partial = archive.with_name(f".{archive.name}.{os.getpid()}.{id(self)}")
|
|
125
|
+
await environment.download_file(source_path=REMOTE_TOOLCHAIN, target_path=partial)
|
|
126
|
+
await self.exec_as_agent(environment, command=f"rm -f {REMOTE_TOOLCHAIN}")
|
|
127
|
+
# Concurrent trials may race to save the same key; either copy is complete.
|
|
128
|
+
os.replace(partial, archive)
|
|
129
|
+
except Exception as error:
|
|
130
|
+
self.logger.warning(f"Cannot cache the agent toolchain: {error}")
|
|
74
131
|
|
|
75
132
|
async def install(self, environment: BaseEnvironment) -> None:
|
|
76
|
-
|
|
77
|
-
await
|
|
133
|
+
archive = await self.toolchain_archive(environment)
|
|
134
|
+
if not await self.restore_toolchain(environment, archive):
|
|
135
|
+
# Reuse upstream bootstrap rather than maintaining a second installer.
|
|
136
|
+
await super().install(environment)
|
|
137
|
+
await self.save_toolchain(environment, archive)
|
|
78
138
|
setup_dir = self.logs_dir / "setup"
|
|
79
139
|
setup_dir.mkdir(parents=True, exist_ok=True)
|
|
80
140
|
with tempfile.TemporaryDirectory(prefix="mini-source-", dir=setup_dir) as temporary:
|