securevibebench 0.2.0__tar.gz → 0.2.2__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.
Files changed (37) hide show
  1. {securevibebench-0.2.0 → securevibebench-0.2.2}/MANIFEST.in +1 -2
  2. {securevibebench-0.2.0/securevibebench.egg-info → securevibebench-0.2.2}/PKG-INFO +46 -31
  3. {securevibebench-0.2.0 → securevibebench-0.2.2}/README.md +44 -27
  4. {securevibebench-0.2.0 → securevibebench-0.2.2}/docs/README.md +20 -4
  5. securevibebench-0.2.2/docs/changeLog.md +25 -0
  6. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/cli.py +12 -2
  7. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/editable_mini.py +65 -5
  8. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/resources.json +107 -107
  9. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/run.py +187 -14
  10. {securevibebench-0.2.0 → securevibebench-0.2.2}/pyproject.toml +3 -5
  11. {securevibebench-0.2.0 → securevibebench-0.2.2/securevibebench.egg-info}/PKG-INFO +46 -31
  12. {securevibebench-0.2.0 → securevibebench-0.2.2}/securevibebench.egg-info/SOURCES.txt +3 -7
  13. {securevibebench-0.2.0 → securevibebench-0.2.2}/securevibebench.egg-info/requires.txt +0 -2
  14. {securevibebench-0.2.0 → securevibebench-0.2.2}/tests/test_package.py +127 -5
  15. {securevibebench-0.2.0 → securevibebench-0.2.2/tools}/build_backend.py +1 -1
  16. {securevibebench-0.2.0 → securevibebench-0.2.2}/tools/bundle_resources.py +1 -1
  17. {securevibebench-0.2.0 → securevibebench-0.2.2}/uv.lock +1 -525
  18. securevibebench-0.2.0/evaluation/README.md +0 -6
  19. securevibebench-0.2.0/evaluation/prepare.sh +0 -5
  20. securevibebench-0.2.0/evaluation/run.sh +0 -11
  21. securevibebench-0.2.0/evaluation/setup.sh +0 -4
  22. securevibebench-0.2.0/tools/download_dataset.py +0 -13
  23. {securevibebench-0.2.0 → securevibebench-0.2.2}/LICENSE +0 -0
  24. {securevibebench-0.2.0 → securevibebench-0.2.2/docs}/THIRD_PARTY_NOTICES.md +0 -0
  25. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/__init__.py +0 -0
  26. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/__main__.py +0 -0
  27. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/bootstrap.py +0 -0
  28. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/harbor.yaml +0 -0
  29. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/hf_verifier.py +0 -0
  30. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/mini-source.tar.gz +0 -0
  31. {securevibebench-0.2.0 → securevibebench-0.2.2}/evaluation/resources.py +0 -0
  32. {securevibebench-0.2.0 → securevibebench-0.2.2}/securevibebench.egg-info/dependency_links.txt +0 -0
  33. {securevibebench-0.2.0 → securevibebench-0.2.2}/securevibebench.egg-info/entry_points.txt +0 -0
  34. {securevibebench-0.2.0 → securevibebench-0.2.2}/securevibebench.egg-info/top_level.txt +0 -0
  35. {securevibebench-0.2.0 → securevibebench-0.2.2}/setup.cfg +0 -0
  36. {securevibebench-0.2.0 → securevibebench-0.2.2}/tests/test_bootstrap.py +0 -0
  37. {securevibebench-0.2.0 → securevibebench-0.2.2}/tools/install.py +0 -0
@@ -1,5 +1,4 @@
1
- include LICENSE THIRD_PARTY_NOTICES.md README.md uv.lock
2
- include build_backend.py
1
+ include LICENSE README.md uv.lock
3
2
  recursive-include evaluation *.py *.yaml *.sh *.md
4
3
  include evaluation/resources.json evaluation/mini-source.tar.gz
5
4
  exclude evaluation/resources.tar.gz
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: securevibebench
3
- Version: 0.2.0
3
+ Version: 0.2.2
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
@@ -16,10 +16,8 @@ Classifier: Topic :: Software Development :: Testing
16
16
  Requires-Python: >=3.12
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- License-File: THIRD_PARTY_NOTICES.md
19
+ License-File: docs/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,18 +26,23 @@ 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/HF-SecureVibeBench-FFD21F.svg?style=for-the-badge&logo=huggingface" alt="Hugging Face: SecureVibeBench"></a>
35
- <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>
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!** Try `pip install securevibebench`!
42
+ > **SecureVibeBench is now v0.2!** Just try `pip install -U securevibebench`!
41
43
  >
42
- > We refer to the original release and evaluation workflow as **v0.1**, and **results obtained with v0.2 may differ from v0.1.** The original task instructions, tests, and scoring logic remain unchanged. Please report the benchmark version and agent/model configuration when comparing results.
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
  ✨&nbsp;<a href="#nav-news">News</a>
@@ -53,7 +56,7 @@ Dynamic: license-file
53
56
 
54
57
  ## ✨ News
55
58
 
56
- - **[2026-10-29]** We updated to **v0.2**, introducing a PyPI package, Harbor-format tasks, and unified model generation and evaluation. The original version is now referred to as **v0.1**; results may differ between versions.
59
+ - **[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
60
  <!-- - **[2026-06-06]** 🏆 We released the online [Leaderboard](https://chen-junkai.github.io/securevibebench-leaderboard/) for SecureVibeBench.
58
61
  - **[2026-04-15]** 🤗 We support the usage via [Hugging Face Datasets](https://huggingface.co/datasets/iCSawyer/SecureVibeBench).
59
62
  - **[2026-04-11]** 🚀 We released code and data for SecureVibeBench. -->
@@ -64,24 +67,21 @@ Dynamic: license-file
64
67
 
65
68
  ## 🛠️ Quick Start
66
69
 
67
- Requirements: Python 3.12+, Linux x86_64, Docker Engine with Compose, and a running Docker daemon.
70
+ Requirements: Python 3.12+, Linux, and Docker.
68
71
 
69
72
  ### Install
70
73
 
71
- We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) for managing Python environments. pip also works; uv is not installed as a package dependency.
74
+ We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) for managing Python environments.
72
75
 
73
76
  ```bash
74
- # Run without installing into your current environment
75
- uvx securevibebench --help
76
-
77
- # Or install into an active virtual environment
78
- uv pip install securevibebench
79
-
77
+ uv pip install -U securevibebench
78
+ ```
79
+ ```bash
80
80
  # Or with pip
81
- pip install securevibebench
81
+ pip install -U securevibebench
82
82
  ```
83
83
 
84
- Installation downloads all 105 tasks and the original evaluator from Hugging Face. Task containers are prepared when evaluation starts.
84
+ Task containers will be prepared when the real evaluation starts.
85
85
 
86
86
  ### For development
87
87
 
@@ -91,24 +91,19 @@ cd SecureVibeBench
91
91
  uv sync # editable install + development tools
92
92
  ```
93
93
 
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
94
  ### Run evaluation
99
95
 
100
96
  ```bash
101
97
  export OPENAI_API_KEY='<your-api-key>'
102
98
  export MODEL='openai/<model-name>'
103
99
 
104
- # With uv, without a persistent installation
105
- uvx securevibebench eval --model "$MODEL" --task 992
106
-
107
- # Or after installing the package
108
100
  securevibebench eval --model "$MODEL" --task 992
101
+ # securevibebench eval --model "$MODEL" # all 105 tasks
109
102
  ```
110
103
 
111
- Omit `--task 992` to run all 105 tasks. Static analysis is disabled by default. Enable it with `--run-sast TRUE` and configure Semgrep credentials such as `SEMGREP_APP_TOKEN`. Results are saved to `runs/<job>/summary.json` under the current working directory.
104
+ Results are saved to `runs/<job>/summary.json` under the current working directory.
105
+
106
+ We disable static vulnerability analysis by default. Enable it with `--run-sast TRUE` and configure Semgrep credentials such as `SEMGREP_APP_TOKEN`.
112
107
 
113
108
  > [!NOTE]
114
109
  > 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.
@@ -138,7 +133,7 @@ To comprehensively evaluate the generated code of code agents, we conduct (i) **
138
133
 
139
134
  ## 📚 Citation
140
135
 
141
- If you find SecureVibeBench useful, please cite:
136
+ If you find our project useful, please consider citing our paper:
142
137
 
143
138
  ```bibtex
144
139
  @inproceedings{chen2026securevibebench,
@@ -160,7 +155,7 @@ If you find SecureVibeBench useful, please cite:
160
155
 
161
156
  ## 🙏 Acknowledgments
162
157
 
163
- Our work builds on [OSS-Fuzz](https://github.com/google/oss-fuzz) and [ARVO](https://arxiv.org/abs/2408.02153).
158
+ 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
159
 
165
160
  ```bibtex
166
161
  @misc{mei2024arvoatlasreproduciblevulnerabilities,
@@ -181,3 +176,23 @@ Our work builds on [OSS-Fuzz](https://github.com/google/oss-fuzz) and [ARVO](htt
181
176
  year = {2017}
182
177
  }
183
178
  ```
179
+
180
+ ```bibtex
181
+ @software{Harbor_Framework,
182
+ author = {{Harbor Framework Team}},
183
+ title = {{Harbor: A framework for evaluating and optimizing agents and models in container environments}},
184
+ year = {2026},
185
+ doi = {10.5281/zenodo.20953922},
186
+ url = {https://doi.org/10.5281/zenodo.20953922}
187
+ }
188
+ ```
189
+
190
+ ```bibtex
191
+ @inproceedings{yang2024sweagent,
192
+ title={{SWE}-agent: Agent-Computer Interfaces Enable Automated Software Engineering},
193
+ author={John Yang and Carlos E Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik R Narasimhan and Ofir Press},
194
+ booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
195
+ year={2024},
196
+ url={https://arxiv.org/abs/2405.15793}
197
+ }
198
+ ```
@@ -1,18 +1,23 @@
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/HF-SecureVibeBench-FFD21F.svg?style=for-the-badge&logo=huggingface" alt="Hugging Face: SecureVibeBench"></a>
8
- <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>
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!** Try `pip install securevibebench`!
17
+ > **SecureVibeBench is now v0.2!** Just try `pip install -U securevibebench`!
14
18
  >
15
- > We refer to the original release and evaluation workflow as **v0.1**, and **results obtained with v0.2 may differ from v0.1.** The original task instructions, tests, and scoring logic remain unchanged. Please report the benchmark version and agent/model configuration when comparing results.
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
  ✨&nbsp;<a href="#nav-news">News</a>
@@ -26,7 +31,7 @@
26
31
 
27
32
  ## ✨ News
28
33
 
29
- - **[2026-10-29]** We updated to **v0.2**, introducing a PyPI package, Harbor-format tasks, and unified model generation and evaluation. The original version is now referred to as **v0.1**; results may differ between versions.
34
+ - **[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
35
  <!-- - **[2026-06-06]** 🏆 We released the online [Leaderboard](https://chen-junkai.github.io/securevibebench-leaderboard/) for SecureVibeBench.
31
36
  - **[2026-04-15]** 🤗 We support the usage via [Hugging Face Datasets](https://huggingface.co/datasets/iCSawyer/SecureVibeBench).
32
37
  - **[2026-04-11]** 🚀 We released code and data for SecureVibeBench. -->
@@ -37,24 +42,21 @@
37
42
 
38
43
  ## 🛠️ Quick Start
39
44
 
40
- Requirements: Python 3.12+, Linux x86_64, Docker Engine with Compose, and a running Docker daemon.
45
+ Requirements: Python 3.12+, Linux, and Docker.
41
46
 
42
47
  ### Install
43
48
 
44
- We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) for managing Python environments. pip also works; uv is not installed as a package dependency.
49
+ We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) for managing Python environments.
45
50
 
46
51
  ```bash
47
- # Run without installing into your current environment
48
- uvx securevibebench --help
49
-
50
- # Or install into an active virtual environment
51
- uv pip install securevibebench
52
-
52
+ uv pip install -U securevibebench
53
+ ```
54
+ ```bash
53
55
  # Or with pip
54
- pip install securevibebench
56
+ pip install -U securevibebench
55
57
  ```
56
58
 
57
- Installation downloads all 105 tasks and the original evaluator from Hugging Face. Task containers are prepared when evaluation starts.
59
+ Task containers will be prepared when the real evaluation starts.
58
60
 
59
61
  ### For development
60
62
 
@@ -64,24 +66,19 @@ cd SecureVibeBench
64
66
  uv sync # editable install + development tools
65
67
  ```
66
68
 
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
69
  ### Run evaluation
72
70
 
73
71
  ```bash
74
72
  export OPENAI_API_KEY='<your-api-key>'
75
73
  export MODEL='openai/<model-name>'
76
74
 
77
- # With uv, without a persistent installation
78
- uvx securevibebench eval --model "$MODEL" --task 992
79
-
80
- # Or after installing the package
81
75
  securevibebench eval --model "$MODEL" --task 992
76
+ # securevibebench eval --model "$MODEL" # all 105 tasks
82
77
  ```
83
78
 
84
- Omit `--task 992` to run all 105 tasks. Static analysis is disabled by default. Enable it with `--run-sast TRUE` and configure Semgrep credentials such as `SEMGREP_APP_TOKEN`. Results are saved to `runs/<job>/summary.json` under the current working directory.
79
+ Results are saved to `runs/<job>/summary.json` under the current working directory.
80
+
81
+ We disable static vulnerability analysis by default. Enable it with `--run-sast TRUE` and configure Semgrep credentials such as `SEMGREP_APP_TOKEN`.
85
82
 
86
83
  > [!NOTE]
87
84
  > 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.
@@ -111,7 +108,7 @@ To comprehensively evaluate the generated code of code agents, we conduct (i) **
111
108
 
112
109
  ## 📚 Citation
113
110
 
114
- If you find SecureVibeBench useful, please cite:
111
+ If you find our project useful, please consider citing our paper:
115
112
 
116
113
  ```bibtex
117
114
  @inproceedings{chen2026securevibebench,
@@ -133,7 +130,7 @@ If you find SecureVibeBench useful, please cite:
133
130
 
134
131
  ## 🙏 Acknowledgments
135
132
 
136
- Our work builds on [OSS-Fuzz](https://github.com/google/oss-fuzz) and [ARVO](https://arxiv.org/abs/2408.02153).
133
+ 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
134
 
138
135
  ```bibtex
139
136
  @misc{mei2024arvoatlasreproduciblevulnerabilities,
@@ -154,3 +151,23 @@ Our work builds on [OSS-Fuzz](https://github.com/google/oss-fuzz) and [ARVO](htt
154
151
  year = {2017}
155
152
  }
156
153
  ```
154
+
155
+ ```bibtex
156
+ @software{Harbor_Framework,
157
+ author = {{Harbor Framework Team}},
158
+ title = {{Harbor: A framework for evaluating and optimizing agents and models in container environments}},
159
+ year = {2026},
160
+ doi = {10.5281/zenodo.20953922},
161
+ url = {https://doi.org/10.5281/zenodo.20953922}
162
+ }
163
+ ```
164
+
165
+ ```bibtex
166
+ @inproceedings{yang2024sweagent,
167
+ title={{SWE}-agent: Agent-Computer Interfaces Enable Automated Software Engineering},
168
+ author={John Yang and Carlos E Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik R Narasimhan and Ofir Press},
169
+ booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
170
+ year={2024},
171
+ url={https://arxiv.org/abs/2405.15793}
172
+ }
173
+ ```
@@ -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. pip/uv installs mini-swe-agent as a dependency. Docker images and container tools are prepared when evaluation starts.
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
- Downloaded data is cached in `~/.cache/securevibebench/huggingface/`; installed resources are extracted to `~/.cache/securevibebench/resources/`. Both respect `XDG_CACHE_HOME`. The package's `resources.json` records upstream commits and checksums. No `dev/` directory is required.
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
 
@@ -74,4 +90,4 @@ uv build --sdist
74
90
  uv run twine check dist/*.tar.gz
75
91
  ```
76
92
 
77
- With pip, use `python -m unittest discover -s tests -v`, `python -m build --sdist`, and `python -m twine check dist/*.tar.gz` instead. Publish the source archive (`dist/*.tar.gz`) to PyPI. Development dependencies are installed by `tools/install.py --dev`. To refresh release resources, run `python tools/bundle_resources.py` (requires Git).
93
+ With pip, use `python -m unittest discover -s tests -v`, `python -m build --sdist`, and `python -m twine check dist/*.tar.gz` instead. Pushing a `v<version>` tag publishes the source archive to PyPI through `.github/workflows/package.yml`. Development dependencies are installed by `tools/install.py --dev`. To refresh release resources, run `python tools/bundle_resources.py` (requires Git).
@@ -0,0 +1,25 @@
1
+ # Change Log
2
+
3
+ ## Roadmap
4
+
5
+ - [ ] **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.
6
+
7
+ ## v0.2.2
8
+
9
+ - Minor changes: the README install commands use `pip install -U`, the roadmap moved into this change log, and repository files were reorganized. Evaluation is unchanged.
10
+
11
+ ## v0.2.1
12
+
13
+ - **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`.
14
+ - 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>`.
15
+ - `summary.json` is updated after each task, and progress prints one line per task phase.
16
+ - 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/`.
17
+ - mini-swe-agent runs only inside task containers and is no longer installed on the host.
18
+ - Added `securevibebench --version`.
19
+
20
+ ## v0.2.0
21
+
22
+ - First PyPI release: `pip install securevibebench` installs all 105 tasks and the original evaluator from Hugging Face. The tasks use the Harbor format.
23
+ - A single command, `securevibebench eval`, generates code with mini-swe-agent and evaluates it, and works with custom OpenAI-compatible endpoints.
24
+ - SAST is disabled by default; enable it with `--run-sast TRUE`.
25
+ - 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 MiniSweAgent, MiniSweAgentOptions
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, **kwargs: Any) -> None:
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
- super().__init__(source_dir=str(self.source_dir), **kwargs)
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
- # Reuse upstream bootstrap rather than maintaining a second installer.
77
- await super().install(environment)
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: