You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
In BenchmarkTest00104.java the following code snippet is used.
intnum = 86;
if ( (7*42) - num > 200 )
bar = "This_should_always_happen";
elsebar = param;
try {
Stringsql = "SELECT * from USERS where USERNAME='foo' and PASSWORD='" + bar + "'";
...
Find-Sec-Bugs cannot evaluate this if condition being a SAST product and hence cannot determine the fact that bar would always get set to This_should_always_happen.
In BenchmarkTest00116.java the code tries to trick the scanner by using an HashMap
Stringbar = "safe!";
java.util.HashMap<String,Object> map51005 = newjava.util.HashMap<String,Object>();
map51005.put("keyA-51005", "a_Value"); // put some stuff in the collectionmap51005.put("keyB-51005", param); // put it in a collectionmap51005.put("keyC", "another_Value"); // put some stuff in the collectionbar = (String)map51005.get("keyB-51005"); // get it back outbar = (String)map51005.get("keyA-51005"); // get safe value back out
The bar value would be set to a safe value in this case so there is no XPath injection possibility here
Let's benchmark this project using OWASP/Benchmark
As you might know that Find Sec Bugs has a great detection rate of 39% as of last test.
https://github.com/OWASP/Benchmark/blob/master/scorecard/benchmark_comparison.png
The text was updated successfully, but these errors were encountered: