mini-bacbench / README.md
sandeep85's picture
Mini BAC-Bench: 10 of 30 BAC-Bench cases, chosen offline from existing Frame runs
22ab540 verified
|
Raw History Blame Contribute Delete
8.68 kB
---
pretty_name: Mini BAC-Bench
tags:
- benchmark
- security
- authorization
- broken-access-control
- agent-evaluation
- vulnerability-detection
- code
size_categories:
- n<1K
configs:
- config_name: default
data_files:
- split: test
path: data/tasks.jsonl
---
# Mini BAC-Bench
Ten of the 30 cases of [BAC-Bench](https://github.com/avduarte333/Absentia), the broken-access-control benchmark published with the ABSENTIA paper ([arXiv:2610.00977](https://arxiv.org/abs/2610.00977)). Use it to check a change to an authorization-flaw finder at about a quarter of the cost of the full benchmark.
Each BAC-Bench case is a disclosed advisory in an open-source web application, pinned to its vulnerable and its fixing commit. A system **detects** a case when it reports the advisory's flaw on the vulnerable commit, and **pairs** it when it also stays silent about that flaw on the fixing commit.
The subset was chosen offline, from results that already existed. No run was made to build it.
## The ten cases
| Case | Stack | CWE | Frame + Haiku 5.5 | Frame + DeepSeek V4.1 Flash | Scan time |
|---|---|---|---|---|---:|
| flowise-3prp | TS / Express | CWE-284 | paired | miss | 31 min |
| FUXA-8ghr | JS / Express | CWE-862 | detected | miss | 16 min |
| indico-q28v | Py / Flask | CWE-639 | miss (judged safe) | miss | 23 min |
| khoj-6whj | Py / FastAPI | CWE-639 | paired | miss | 14 min |
| langflow-rf6x | Py / FastAPI | CWE-639 | paired | paired | 18 min |
| rallly-4j32 | TS / Next.js tRPC | CWE-285 | paired | paired | 6 min |
| strapi-495j | TS / Koa | CWE-639 | miss (never mapped) | miss | 37 min |
| wagtail-4qvv | Py / Django | CWE-862 | detected | miss | 29 min |
| weblate-wppc | Py / DRF | CWE-862 | detected | miss | 22 min |
| wger-42cr | Py / DRF | CWE-639 | detected | miss | 18 min |
Scan time is Frame's, both commits, on an 8-core machine. The mini set takes 3.6 hours against 15.5 for the full benchmark (23%).
`data/tasks.jsonl` has one row per case: the upstream repository, both commits, the advisory URL, the expected CWE, the number of affected routes, both Frame results and the known run-to-run flips. The full case records (affected routes, root and sink files, match criteria) stay upstream in `data/authz_instances.jsonl` of the Absentia repository at commit `80e3036`. This dataset does not copy them.
## How the ten were chosen
BAC-Bench publishes no per-case results. The paper gives totals for each system, plus per-case pass rates for ABSENTIA alone on 8 small cases (its Table 3). The selection therefore uses the per-case results we already had: two full runs of [Frame](https://github.com/lambdasec/frame)'s authorization hunt, scored by its deterministic matcher, and the repeated smaller runs in [lambdasec/frame-agent-traces](https://huggingface.co/datasets/lambdasec/frame-agent-traces).
1. **Cases left out:**
- pretix and mlflow, for cost (159 and 100 minutes of scan time).
- askbot and git-proxy, because the deterministic matcher cannot score them correctly. On askbot the finding states the mechanism but sits outside the matcher's code regions. On git-proxy the matcher credits a different flaw in the same code.
2. **Difficulty:** each case is labelled by how many of the two Frame models found it (both, one or neither), the way terminal-bench-mini uses the field's pass rate.
3. **Search:** simulated annealing with seed 20261201 picks 10 of the remaining 26. It minimises the gap to the full benchmark in:
- language;
- framework family;
- CWE;
- each model's outcome mix (paired, detected only, miss);
- the difficulty labels;
- where the Haiku run's misses happened (the ground-truth code was never mapped, or it was judged safe).
4. **Constraints:** at most one case per application and a scan-time budget of 25% of the full benchmark. There is a small penalty for cases known to flip between repeated runs.
`build.py` reproduces the selection and every number on this card from the files beside it.
## How well it tracks the full benchmark
Both Frame runs were used in the selection, so their agreement below is in-sample.
| System | Full benchmark | Mini | Typical error of a random 10 (median, 90th percentile) |
|---|---|---|---|
| Frame + Haiku 5.5, detected | 83% (25/30) | 80% (8/10) | 7, 17 points |
| Frame + Haiku 5.5, paired | 40% (12/30) | 40% (4/10) | 10, 20 points |
| Frame + DeepSeek V4.1 Flash, detected | 20% (5/25) | 20% (2/10) | 9, 20 points |
| Frame + DeepSeek V4.1 Flash, paired | 20% (5/25) | 20% (2/10) | 9, 20 points |
DeepSeek ran on 25 of the 30 cases and on all 10 of the mini set.
**For a system not in the selection, expect an error of 10 to 20 points.** To measure how much fitting flatters the subset, we selected on one model's results and scored the other:
- Fitted to Haiku alone, the subset scored DeepSeek at 0% against its 20% (20 points off).
- Fitted to DeepSeek alone, the subset scored Haiku at 70% detected against 83%, and 50% paired against 40% (13 and 10 points off).
Fitting to both models fixes those two runs, not systems in general.
**Size:**
| Cases | Median error of a random subset, detected (Haiku / DeepSeek) |
|---:|---|
| 5 | 17 / 20 points |
| 10 | 7 / 8 points |
| 15 | 3 / 5 points |
| 20 | 3 / 4 points |
**One case is 10 points,** and some cases change between repeated runs:
- **FUXA:** Frame with Haiku detected it in all four runs but paired it in only one.
- **rallly:** ABSENTIA found it in 3 of 5 runs.
ABSENTIA's Table 3 also covers khoj (5 of 5) and FUXA (5 of 5). ABSENTIA's other per-case results are not published, so its score on this subset is unknown.
## Use it for / not for
- **Use it** to check whether a change to a hunt, a prompt or a model moves detection or pairing by a lot, at a quarter of the cost, and to compare setups on the same ten cases.
- **Do not use it** to rank systems that are within about 20 points of each other, to report a BAC-Bench score, or to compare against the paper's numbers. Report the full 30 for that.
- **Run it more than once.** A single run of 10 cases cannot separate a real change from a one-case flip.
## Running it with Frame
```bash
IDS=flowise-ghsa-3prp-9gf7-4rxx,frangoteam-FUXA-ghsa-8ghr-w65f-j3qr,indico-ghsa-q28v-664f-q6wj,khoj-ghsa-6whj-7qmg-86qj,langflow-ghsa-rf6x-r45m-xv3w,rallly-ghsa-4j32-25f9-qgfm,strapi-ghsa-495j-h493-42q2,wagtail-ghsa-4qvv-g3vr-m348,weblate-ghsa-wppc-7cq7-cgfv,wger-ghsa-42cr-w2gr-m54q
python benchmarks/bacbench/prepare.py --workspace WS --only $IDS
python benchmarks/bacbench/run.py --workspace WS --systems frame_hunt --only $IDS --output results/mini
python benchmarks/bacbench/score.py --workspace WS --results results/mini --json
```
`score.py` reports the other 20 cases as `not-run`. Count `paired` and `detected` in `per_case` over the ten ids.
Any other system can be scored the same way: run it on both commits of each case and apply BAC-Bench's own match criteria.
## Files
| File | Contents |
|---|---|
| `data/tasks.jsonl` | the ten cases |
| `analysis/cases.csv` | all 30 cases with their features, both Frame results, and why a case was left out |
| `analysis/fidelity.json` | the full-vs-mini comparison, the random-subset errors, the leave-one-model-out check, and the mix |
| `analysis/size_curve.csv` | median error of random subsets by size |
| `build.py`, `frame_haiku.json`, `runs.json` | reproduces the selection: `python build.py --records <Absentia checkout>/data/authz_instances.jsonl` |
## Caveats
- **Two systems, from one harness.** Both results come from Frame, with two models, scored by Frame's deterministic matcher, not the paper's LLM judge. A different system may find different cases hard.
- **The left-out cases** depend on the matcher. A system scored with an LLM judge could keep askbot and git-proxy.
- **Not represented:** CWE-863 (one case in the full benchmark) and the Payload framework (one case).
- **The case data** belongs to the BAC-Bench authors. Cite their paper when you use it:
> Absentia: Detecting Broken Access Control Vulnerabilities in Web Applications. arXiv:2610.00977.
## Related
- [BAC-Bench](https://github.com/avduarte333/Absentia): the full benchmark.
- [Frame](https://github.com/lambdasec/frame): the scanner whose runs chose this subset. Its full BAC-Bench report is [`benchmarks/bacbench/REPORT.md`](https://github.com/lambdasec/frame/blob/main/benchmarks/bacbench/REPORT.md).
- [lambdasec/frame-agent-traces](https://huggingface.co/datasets/lambdasec/frame-agent-traces): the trajectories behind those runs.
- [minibench](https://huggingface.co/collections/LocalLLaMA/minibench): small subsets of agent benchmarks, which this follows.