<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-benchmark-that-s-half-traps-and-why-that-s-brilliant-fiewjwnrs" -->

---
title: The Benchmark That's Half Traps — and Why That's Brilliant
description: An author dissects the OWASP Benchmark, a labelled Java test suite where 701 of 1,478 cases (47%) are deliberately designed decoys that look vulnerable but...
canonical: https://daily.dev/posts/the-benchmark-that-s-half-traps-and-why-that-s-brilliant-fiewjwnrs
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Benchmark That's Half Traps — and Why That's Brilliant | daily.dev
og:description: An author dissects the OWASP Benchmark, a labelled Java test suite where 701 of 1,478 cases (47%) are deliberately designed decoys that look vulnerable but...
og:url: https://daily.dev/posts/the-benchmark-that-s-half-traps-and-why-that-s-brilliant-fiewjwnrs
og:image: https://api.daily.dev/og/posts/fiEwjwNrs.png
og:image:alt: The Benchmark That's Half Traps — and Why That's Brilliant
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Benchmark That's Half Traps — and Why That's Brilliant

**[Awesome Java Newsletter](https://daily.dev/sources/java_libhunt)** · 11 min read · 1 upvotes · 0 comments

## Summary

An author dissects the OWASP Benchmark, a labelled Java test suite where 701 of 1,478 cases (47%) are deliberately designed decoys that look vulnerable but aren't. Two trap types are examined in detail: a constant-returning method disguised as tainted input, and a genuinely tainted flow neutralized by a working ESAPI sanitiser. The author's own taint-analysis scanner falls for 88% of these traps, compared to 61% for CodeQL and 65% for Semgrep, illustrating that false positives are an inherent property of taint-reachability techniques rather than a sign of sloppy engineering. The piece closes with three design principles for building better evaluation benchmarks: near-miss negatives, sufficient negative ratio, and grouping failures into recognisable families.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dev.to/alimafana/the-benchmark-thats-half-traps-and-why-thats-brilliant-5bl9>

## Questions this post answers

### What is the OWASP Benchmark and how many test cases does it contain?

The OWASP Benchmark is a generated Java application containing thousands of self-contained servlets used to test security scanners, each labelled as either a real vulnerability or a safe decoy. Across SQL injection, cross-site scripting, path traversal, and command injection categories it totals 1,478 cases, with 777 real vulnerabilities and 701 decoys (47%), designed to test whether a scanner can distinguish real bugs from code that merely looks vulnerable.

_Comparing scanner benchmarks gets easier when developers track tool evaluations like this on daily.dev._

### How do false positive rates compare between CodeQL, Semgrep, and taint-based scanners on the OWASP Benchmark decoys?

On the same set of OWASP Benchmark decoy cases, CodeQL had a 61% false-positive rate, Semgrep had 65%, and a rules-only taint-analysis scanner had 88%. Even CodeQL, which found every real bug, still flagged 427 out of 701 safe decoy cases, showing that false positives remain unsolved even in mature, freely available tools.

_Developers choosing between security scanners can weigh trade-offs like these by following tool comparisons on daily.dev._

### Why does a taint analysis security scanner flag safe code as vulnerable even when a sanitiser like ESAPI's encodeForHTML is applied?

Taint analysis tracks whether data flows from a source to a sink but often cannot reliably evaluate what a specific function does to the value along the way, such as whether ESAPI's encodeForHTML actually neutralizes HTML injection. Recognizing that a sanitiser genuinely filters the value is a semantic question, not a structural one, which pure reachability-based taint tracking is not built to answer without maintaining an exhaustive hand-built list of every sanitiser.

_Anyone building or tuning static analysis rules can follow deep dives like this via daily.dev._

## Similar posts on daily.dev

- [What Is a Vulnerability, Really? Source, Sink, and Taint](https://daily.dev/posts/what-is-a-vulnerability-really-source-sink-and-taint-csw3ozbnk) · Awesome Java Newsletter · 0 upvotes · 0 comments
- [Patterns for Building Cybersecurity Evals](https://daily.dev/posts/patterns-for-building-cybersecurity-evals-dgy414c8a) · Eugene Yan · 0 upvotes · 0 comments
- [Separating signal from noise in coding evaluations](https://daily.dev/posts/separating-signal-from-noise-in-coding-evaluations-swoud4dtk) · Hacker News · 0 upvotes · 0 comments
- [foojay – a place for friends of OpenJDK](https://daily.dev/posts/foojay-a-place-for-friends-of-openjdk-vke1bkzad) · Foojay.io · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#java](https://daily.dev/tags/java)

[View this post on daily.dev](https://daily.dev/posts/the-benchmark-that-s-half-traps-and-why-that-s-brilliant-fiewjwnrs)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Benchmark That's Half Traps — and Why That's Brilliant","url":"https://daily.dev/posts/the-benchmark-that-s-half-traps-and-why-that-s-brilliant-fiewjwnrs","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-benchmark-that-s-half-traps-and-why-that-s-brilliant-fiewjwnrs"},"datePublished":"2026-09-24T20:43:28.705Z","dateModified":"2026-09-24T20:43:55.472Z","description":"An author dissects the OWASP Benchmark, a labelled Java test suite where 701 of 1,478 cases (47%) are deliberately designed decoys that look vulnerable but...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6f6088b98ea78c2a4e47708d1f6d6e37?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6f6088b98ea78c2a4e47708d1f6d6e37?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Awesome Java Newsletter","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Awesome Java Newsletter","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/7729929f2ca649d7b13f6b04aa94d300","url":"https://daily.dev/sources/java_libhunt"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-benchmark-that-s-half-traps-and-why-that-s-brilliant-fiewjwnrs","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,java","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Awesome Java Newsletter","item":"https://daily.dev/sources/java_libhunt"},{"@type":"ListItem","position":3,"name":"The Benchmark That's Half Traps — and Why That's Brilliant"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-benchmark-that-s-half-traps-and-why-that-s-brilliant-fiewjwnrs#faq","mainEntity":[{"@type":"Question","name":"What is the OWASP Benchmark and how many test cases does it contain?","acceptedAnswer":{"@type":"Answer","text":"The OWASP Benchmark is a generated Java application containing thousands of self-contained servlets used to test security scanners, each labelled as either a real vulnerability or a safe decoy. Across SQL injection, cross-site scripting, path traversal, and command injection categories it totals 1,478 cases, with 777 real vulnerabilities and 701 decoys (47%), designed to test whether a scanner can distinguish real bugs from code that merely looks vulnerable. Comparing scanner benchmarks gets easier when developers track tool evaluations like this on daily.dev."}},{"@type":"Question","name":"How do false positive rates compare between CodeQL, Semgrep, and taint-based scanners on the OWASP Benchmark decoys?","acceptedAnswer":{"@type":"Answer","text":"On the same set of OWASP Benchmark decoy cases, CodeQL had a 61% false-positive rate, Semgrep had 65%, and a rules-only taint-analysis scanner had 88%. Even CodeQL, which found every real bug, still flagged 427 out of 701 safe decoy cases, showing that false positives remain unsolved even in mature, freely available tools. Developers choosing between security scanners can weigh trade-offs like these by following tool comparisons on daily.dev."}},{"@type":"Question","name":"Why does a taint analysis security scanner flag safe code as vulnerable even when a sanitiser like ESAPI's encodeForHTML is applied?","acceptedAnswer":{"@type":"Answer","text":"Taint analysis tracks whether data flows from a source to a sink but often cannot reliably evaluate what a specific function does to the value along the way, such as whether ESAPI's encodeForHTML actually neutralizes HTML injection. Recognizing that a sanitiser genuinely filters the value is a semantic question, not a structural one, which pure reachability-based taint tracking is not built to answer without maintaining an exhaustive hand-built list of every sanitiser. Anyone building or tuning static analysis rules can follow deep dives like this via daily.dev."}}]}
```

