SteelYourHeart: Catching LLMs Taking Shortcuts in Vulnerability Detection
Abstract
Large language models (LLMs) are used to detect vulnerabilities and review security patches. In both tasks, a model may judge code safe because it contains a security check, or guard, without examining whether the check can be bypassed. Many vulnerability detection benchmarks primarily evaluate the correctness of model verdicts, without assessing whether their explanations correctly characterize the effectiveness of the guard. To address this gap, we introduce SteelYourHeart, a benchmark of 195 incomplete security fixes from 136 repositories. Each case provides code after an initial fix and uses a documented bypass closed by a follow-up patch as a reference for scoring model explanations. We evaluate four LLMs on the same cases in two settings. Both provide the vulnerability class and the relevant code, while patch review also presents the changes made by the initial patch as a proposed fix. Our evaluation shows that current LLMs do not reliably verify that a guard is complete. In detection, 36.4-71.3% of responses correctly identify the code as exploitable and explain a reference bypass. Verdict-only scoring raises these rates by 7.7-23.6 percentage points. In patch review, reference-matched rates rise to 65.6-77.9%. Yet in 22 of the 421 model-case pairs answered correctly in detection, the same model approves the incomplete patch in review. These results establish SteelYourHeart as a testbed for the final step of vulnerability detection, and show that verdicts can overstate detection performance and that gains in aggregate patch-review scores can conceal regressions on individual fixes.
Additional Features