A coding assistant that retrieves more repository context may find the correct function signature or expected behavior while missing the defensive invariant that makes the patch safe. CASE-Bench reconstructs CVE tasks with both functional tests and exploit checks, so it can distinguish a bug fix that passes ordinary tests from one that closes the exploit…
Inspect the ClaimsCase · DiggingBeagle record
Repository retrieval improved working code more than secure code in CASE-Bench
An executable study separated functionality passes from exploit-safe passes for code assistants.
Public disclosure: Nov 4, 2026
Research benchmark with 145 CVE-derived coding tasks in 51 repositories.
Assessment profile
Assessment method- Setting
- evaluation
- Exploitation
- demonstrated
- Evidence
- Grade C
- Remediation
- not applicable
- AI role
- AGAINST AI
Basis and provenance
The paper uses executable exploit verifiers on reconstructed CVE tasks, but estimates apply only to its coding agents and selected repositories. An impact band remains unassigned because the available evidence does not establish a comparable severity score or verified numerical loss for this assessment.
Assessed Nov 8, 2026 using diggingbeagle.assessment/1.
Evidence basis: CLM-CASEBENCH-RETRIEVAL-SECURITY-GAP-01 · CLM-CASEBENCH-RETRIEVAL-SECURITY-GAP-02 · CLM-ENR-CASEBENCH-SAFEGUARDS · A.S.E. 2.0: repository context and secure code
At a glance
Retrieval quality needs a security outcome metric, because ordinary functional success can conceal a retained vulnerability.
Read the implicationsThe 145 selected tasks and six model or harness conditions are a research sample rather than an estimate of real deployed coding-agent vulnerabilities. The upper-end gains describe tested configurations, not guaranteed improvements from any retrieval system.
Limits and uncertaintyFull account
A coding assistant that retrieves more repository context may find the correct function signature or expected behavior while missing the defensive invariant that makes the patch safe. CASE-Bench reconstructs CVE tasks with both functional tests and exploit checks, so it can distinguish a bug fix that passes ordinary tests from one that closes the exploit path.
The 145 selected tasks and six model or harness conditions are a research sample rather than an estimate of real deployed coding-agent vulnerabilities. The upper-end gains describe tested configurations, not guaranteed improvements from any retrieval system.
The evaluator ran functional checks and exploit-sensitive tests on 145 CVE-derived tasks, so it could distinguish working patches from patches still vulnerable to the original flaw. Several ordinary retrieval configurations produced large correct-but-exploitable shares, while agents inspected relevant repository safeguards in only 27% to 36% of traces. A coding benchmark that records only whether tests passed would erase this difference. Security-aware context and an exploit regression check answer complementary questions, rather than making more context automatically safer.
Mechanism and trust boundary
- 01
Prepare a vulnerable repository task with executable functional and security tests.
- 02
Vary context retrieval and intentionally withhold or insert security examples.
- 03
Compare correct patches with patches still exploitable under the verifier.
Claims & evidence
CLM-ENR-CASEBENCH-SAFEGUARDSThe CASE-Bench authors report that the tested coding agents encountered relevant repository safeguards in only 27% to 36% of their trajectories.supported
Basis: reported finding
- supportsA.S.E. 2.0: repository context and secure codeprimary disclosure
Abstract; Results RQ3: Do Coding Agents Gather Security-Relevant Context?
CLM-CASEBENCH-RETRIEVAL-SECURITY-GAP-01Across CASE-Bench conditions, functionality-oriented context increased functional pass rate by up to 8.2 percentage points but secure pass rate by at most 3.7 points.supported
Basis: reported finding
- supportsA.S.E. 2.0: repository context and secure codeprimary disclosure
Abstract; Results RQ1 and context-construction comparisons
CLM-CASEBENCH-RETRIEVAL-SECURITY-GAP-02Removing a relevant repository safeguard reduced secure passes by up to 8.1 points, and adding one insecure example raised functional-but-exploitable outcomes by 6.3 points.supported
Basis: reported finding
- supportsA.S.E. 2.0: repository context and secure codeprimary disclosure
Abstract; Results RQ2 and context intervention
Implications
Retrieval quality needs a security outcome metric, because ordinary functional success can conceal a retained vulnerability.
Controls and mitigations
- Include exploit-oriented regression tests and trace whether the agent inspected relevant safeguards.
Unknowns and contradictions
- The 145 selected tasks and six model or harness conditions are a research sample rather than an estimate of real deployed coding-agent vulnerabilities. The upper-end gains describe tested configurations, not guaranteed improvements from any retrieval system.
Sources and citation
Material revision history
- Nov 8, 2026 · Canonical change recorded · new in release · revision 229