Security-review a small planted web app backend like an attacker and report only real flaws
Exact prompt
# Security-review a small planted web app backend like an attacker and report only real flaws The backend is a small synthetic app that lives only in these files; it is your own planted code with no live service, no open ports and nothing to reach over a network. Inputs: the handler source under `backend/` (several `*.py` files, each with top-level `def <route>(req):` handlers) and `review-brief.txt`. Review every handler as an attacker would and report only flaws you can prove from the code. Invented findings are penalised as hard as misses, so do not report a handler that is actually safe. Flaw vocabulary (use exactly these labels): `sql_injection`, `broken_access_control`, `path_traversal`, `plaintext_secret`, `reflected_xss`, `ssrf`. Rules: - Flaws (what counts, with its proof in the handler body): - `sql_injection`: a query string built by concatenating `req[...]` into the SQL text. A parameterized query (a `?` placeholder with the value passed separately) is safe. - `broken_access_control`: an `adm*` handler that performs a privileged action without a `require_role(...)` check. An `adm*` handler that calls `require_role` first is safe. - `path_traversal`: a filesystem path built as `BASE + req[...]`. A path built with `safe_join(...)` is safe. - `plaintext_secret`: comparing `req["password"]` to a stored password directly. Using `verify_hash(...)` is safe. - `reflected_xss`: returning HTML built by concatenating `req[...]` into markup without `escape(...)`. Wrapping the value in `escape(...)` is safe. - `ssrf`: fetching `open_url(req[...])` without an `allowed_host(...)` check. Guarding with `allowed_host(...)` is safe. - Findings: report one finding per proven flaw. A handler may carry at most one flaw in this set. - Write `out/findings.json`: `{"findings": [<{"route": <name>, "flaw": <label>} sorted by (route, flaw)>], "flawed_routes": [<sorted route names with a flaw>], "flaw_types": [<sorted distinct labels found>], "total_flaws": <number>, "counts_by_type": {"<label>": <count>, ...}}`. - Roll-ups: Labels in the flaw vocabulary with no finding are included at 0. ## How this run works - Work on your own: nobody will answer questions in this task, and writing to `ask/` counts against the run. - Write only under `out/`. Create `out/` if it is missing. Inputs are synthetic; don't fetch anything from the network. - Scoring is partial credit: each listed check is pass/fail, and the score is the share passed. Numbers are compared to within 0.005 unless the task says otherwise.
Review the handler code of a small synthetic web app backend, written only for this review and run nowhere, the way an attacker would, and report each real flaw with its handler and type. Every planted flaw sits next to a safe look-alike, such as a parameterized query beside a concatenated one or an admin handler that checks the role beside one that doesn't. Invented findings cost as much as missed ones. The old review notes tell you to flag everything that looks risky, which turns the safe look-alikes into false positives. Counts per flaw type list types with no finding at 0. Inspired by https://x.com/leopardracer/status/2114459598929137988 Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).
Success criteria: findings flawed_routes flaw_types total_flaws counts_by_type
Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.0038, 12s).
All runs (3)
100% pass rate across 3 eligible runs: 3 pass, 0 partial, 0 fail. Partial and failed runs are listed below with everything else.ⓘ
| Model | Cost | Time | Step-insⓘ | Autonomy | Outcome | Trustⓘ | Date | Compare |
|---|---|---|---|---|---|---|---|---|
| AClaude Opus 5.5default · thinking on | $0.11 | 15s | 0 | Fully autonomous | pass | Trust 80% | 2026-10-26 | |
| AClaude Haiku 5.5default · thinking on | $0.0038 | 12s | 0 | Fully autonomous | pass | Trust 80% | 2026-10-26 | |
| AClaude Sonnet 5.5default · thinking on | $0.04 | 12s | 0 | Fully autonomous | pass | Trust 80% | 2026-10-26 |
Embed this result
A live badge for this use case. It links back here and updates as new runs are published.
Get new runs and ranking changes weekly
Which models got better or cheaper on real tasks like this one.