Skip to content

Code Security Report: 20 high severity findings, 33 total findings [AltoroJ-3.2] #1

Description

@mend-for-github-com

Code Security Report

Scan Metadata

Latest Scan: 2026-04-07 10:40am
Total Findings: 33 | New Findings: 0 | Resolved Findings: 0
Tested Project Files: 63
Detected Programming Languages: 2 (Java*, JavaScript / TypeScript*)

  • Check this box to manually trigger a scan

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

Most Relevant Findings

The list below presents the 10 most relevant findings that need your attention. To view information on the remaining findings, navigate to the Mend Application.

SeverityVulnerability TypeCWEFileData FlowsDetected
HighCross-Site Scripting

CWE-79

feedbacksuccess.jsp:48

12026-04-07 10:40am
Vulnerable Code

<% String email = (String) request.getParameter("email_addr");
boolean regExMatch = email!=null && email.matches(ServletUtil.EMAIL_REGEXP);
if (email != null && email.trim().length() != 0 && regExMatch) {%>
Our reply will be sent to your email: <%= ServletUtil.sanitzieHtmlWithRegex(email.toLowerCase())/*ServletUtil.sanitizeWeb(email.toLowerCase())*/%>
<% } else {%>
However, the email you gave is incorrect (<%=ServletUtil.sanitzieHtmlWithRegex(email.toLowerCase()) /*ServletUtil.sanitizeWeb(email.toLowerCase())*/%>) and you will not receive a response.

1 Data Flow/s detected

<% String email = (String) request.getParameter("email_addr");

However, the email you gave is incorrect (<%=ServletUtil.sanitzieHtmlWithRegex(email.toLowerCase()) /*ServletUtil.sanitizeWeb(email.toLowerCase())*/%>) and you will not receive a response.

public static String sanitzieHtmlWithRegex(String input) {

However, the email you gave is incorrect (<%=ServletUtil.sanitzieHtmlWithRegex(email.toLowerCase()) /*ServletUtil.sanitizeWeb(email.toLowerCase())*/%>) and you will not receive a response.

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Cross-Site Scripting Training

● Videos

   ▪ Secure Code Warrior Cross-Site Scripting Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighCross-Site Scripting

CWE-79

queryxpath.jsp:36

12026-04-07 10:40am
Vulnerable Code

<h1>Search News Articles</h1>
<form id="QueryXpath" method="get" action="<%=request.getRequestURL()%>">
Search our news articles database
<br /><br />
<input type="hidden" id=content" name="content" value="queryxpath.jsp"/>
<input type="text" id="query" name="query" width=450 value="<%=(request.getParameter("query")==null)?"Enter title (e.g. Watchfire)":request.getParameter("query")%>"/>

1 Data Flow/s detected

<input type="text" id="query" name="query" width=450 value="<%=(request.getParameter("query")==null)?"Enter title (e.g. Watchfire)":request.getParameter("query")%>"/>

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Cross-Site Scripting Training

● Videos

   ▪ Secure Code Warrior Cross-Site Scripting Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighCross-Site Scripting

CWE-79

search.jsp:44

12026-04-07 10:40am
Vulnerable Code

<h1>Search Results</h1>
<p>No results were found for the query:<br /><br />
<%= query %>

1 Data Flow/s detected

String query = request.getParameter("query");

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Cross-Site Scripting Training

● Videos

   ▪ Secure Code Warrior Cross-Site Scripting Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighSQL Injection

CWE-89

DBUtil.java:403

32026-04-07 10:40am
Vulnerable Code

String query = "SELECT * FROM TRANSACTIONS WHERE (" + acctIds.toString() + ") " + ((dateString==null)?"": "AND (" + dateString + ") ") + "ORDER BY DATE DESC" ;
ResultSet resultSet = null;
try {
resultSet = statement.executeQuery(query);

3 Data Flow/s detected
View Data Flow 1

String endString = request.getParameter("endTime");

transactions = user.getUserTransactions(startString, endString, user.getAccounts());

public Transaction[] getUserTransactions(String startDate, String endDate, Account[] accounts) throws SQLException {

transactions = DBUtil.getTransactions(startDate, endDate, accounts, -1);

public static Transaction[] getTransactions(String startDate, String endDate, Account[] accounts, int rowCount) throws SQLException {

dateString = "DATE BETWEEN '" + startDate + " 00:00:00' AND '" + endDate + " 23:59:59'";

String query = "SELECT * FROM TRANSACTIONS WHERE (" + acctIds.toString() + ") " + ((dateString==null)?"": "AND (" + dateString + ") ") + "ORDER BY DATE DESC" ;

resultSet = statement.executeQuery(query);

View Data Flow 2

String startString = request.getParameter("startTime");

transactions = user.getUserTransactions(startString, endString, user.getAccounts());

public Transaction[] getUserTransactions(String startDate, String endDate, Account[] accounts) throws SQLException {

transactions = DBUtil.getTransactions(startDate, endDate, accounts, -1);

public static Transaction[] getTransactions(String startDate, String endDate, Account[] accounts, int rowCount) throws SQLException {

dateString = "DATE BETWEEN '" + startDate + " 00:00:00' AND '" + endDate + " 23:59:59'";

String query = "SELECT * FROM TRANSACTIONS WHERE (" + acctIds.toString() + ") " + ((dateString==null)?"": "AND (" + dateString + ") ") + "ORDER BY DATE DESC" ;

resultSet = statement.executeQuery(query);

View Data Flow 3

public Response getTransactions(@PathParam("accountNo") String accountNo,

startString = (String) myJson.get("startDate");

transactions = user.getUserTransactions(startString, endString,

public Transaction[] getUserTransactions(String startDate, String endDate, Account[] accounts) throws SQLException {

transactions = DBUtil.getTransactions(startDate, endDate, accounts, -1);

public static Transaction[] getTransactions(String startDate, String endDate, Account[] accounts, int rowCount) throws SQLException {

dateString = "DATE BETWEEN '" + startDate + " 00:00:00' AND '" + endDate + " 23:59:59'";

String query = "SELECT * FROM TRANSACTIONS WHERE (" + acctIds.toString() + ") " + ((dateString==null)?"": "AND (" + dateString + ") ") + "ORDER BY DATE DESC" ;

resultSet = statement.executeQuery(query);

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior SQL Injection Training

● Videos

   ▪ Secure Code Warrior SQL Injection Video

● Further Reading

   ▪ OWASP SQL Injection Prevention Cheat Sheet

   ▪ OWASP SQL Injection

   ▪ OWASP Query Parameterization Cheat Sheet

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighSQL Injection

CWE-89

DBUtil.java:219

42026-04-07 10:40am
Vulnerable Code

return false;
Connection connection = getConnection();
Statement statement = connection.createStatement();
ResultSet resultSet =statement.executeQuery("SELECT COUNT(*)FROM PEOPLE WHERE USER_ID = '"+ user +"' AND PASSWORD='" + password + "'"); /* BAD - user input should always be sanitized */

4 Data Flow/s detected
View Data Flow 1

public static boolean isValidUser(String user, String password) throws SQLException{

ResultSet resultSet =statement.executeQuery("SELECT COUNT(*)FROM PEOPLE WHERE USER_ID = '"+ user +"' AND PASSWORD='" + password + "'"); /* BAD - user input should always be sanitized */

View Data Flow 2

if (DBUtil.isValidUser(user.getUsername(), passwd.trim().toLowerCase())) {

public static boolean isValidUser(String user, String password) throws SQLException{

ResultSet resultSet =statement.executeQuery("SELECT COUNT(*)FROM PEOPLE WHERE USER_ID = '"+ user +"' AND PASSWORD='" + password + "'"); /* BAD - user input should always be sanitized */

View Data Flow 3

password = password.trim().toLowerCase(); //in real life the password usually is case sensitive and this cast would not be done

public static boolean isValidUser(String user, String password) throws SQLException{

ResultSet resultSet =statement.executeQuery("SELECT COUNT(*)FROM PEOPLE WHERE USER_ID = '"+ user +"' AND PASSWORD='" + password + "'"); /* BAD - user input should always be sanitized */

View more Data Flows

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior SQL Injection Training

● Videos

   ▪ Secure Code Warrior SQL Injection Video

● Further Reading

   ▪ OWASP SQL Injection Prevention Cheat Sheet

   ▪ OWASP SQL Injection

   ▪ OWASP Query Parameterization Cheat Sheet

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighSQL Injection

CWE-89

DBUtil.java:471

22026-04-07 10:40am
Vulnerable Code

public static String addAccount(String username, String acctType) {
try {
Connection connection = getConnection();
Statement statement = connection.createStatement();
statement.execute("INSERT INTO ACCOUNTS (USERID,ACCOUNT_NAME,BALANCE) VALUES ('"+username+"','"+acctType+"', 0)");

2 Data Flow/s detected
View Data Flow 1

String acctType = request.getParameter("accttypes");

String error = DBUtil.addAccount(username, acctType);

public static String addAccount(String username, String acctType) {

statement.execute("INSERT INTO ACCOUNTS (USERID,ACCOUNT_NAME,BALANCE) VALUES ('"+username+"','"+acctType+"', 0)");

View Data Flow 2

String username = request.getParameter("username");

String error = DBUtil.addAccount(username, acctType);

public static String addAccount(String username, String acctType) {

statement.execute("INSERT INTO ACCOUNTS (USERID,ACCOUNT_NAME,BALANCE) VALUES ('"+username+"','"+acctType+"', 0)");

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior SQL Injection Training

● Videos

   ▪ Secure Code Warrior SQL Injection Video

● Further Reading

   ▪ OWASP SQL Injection Prevention Cheat Sheet

   ▪ OWASP SQL Injection

   ▪ OWASP Query Parameterization Cheat Sheet

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighSQL Injection

CWE-89

DBUtil.java:276

22026-04-07 10:40am
Vulnerable Code

if (username == null || username.trim().length() == 0)
return null;
Connection connection = getConnection();
Statement statement = connection.createStatement();
ResultSet resultSet =statement.executeQuery("SELECT ACCOUNT_ID, ACCOUNT_NAME, BALANCE FROM ACCOUNTS WHERE USERID = '"+ username +"' "); /* BAD - user input should always be sanitized */

2 Data Flow/s detected
View Data Flow 1

Cookie accountCookie = ServletUtil.establishSession(username,session);

public static Cookie establishSession(String username, HttpSession session){

public static User getUserInfo(String username) throws SQLException{

View remaining steps

public static Account[] getAccounts(String username) throws SQLException{

ResultSet resultSet =statement.executeQuery("SELECT ACCOUNT_ID, ACCOUNT_NAME, BALANCE FROM ACCOUNTS WHERE USERID = '"+ username +"' "); /* BAD - user input should always be sanitized */

View Data Flow 2

String accessToken = request.getHeader("Authorization").replaceAll("Bearer ", "");

String decodedToken = new String(Base64.decodeBase64(accessToken));

StringTokenizer tokenizer = new StringTokenizer(decodedToken,":");

String username = new String(Base64.decodeBase64(tokenizer.nextToken()));

View remaining steps

Account[] account = (OperationsUtil.getUser(request)).getAccounts();

public static Account[] getAccounts(String username) throws SQLException{

ResultSet resultSet =statement.executeQuery("SELECT ACCOUNT_ID, ACCOUNT_NAME, BALANCE FROM ACCOUNTS WHERE USERID = '"+ username +"' "); /* BAD - user input should always be sanitized */

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior SQL Injection Training

● Videos

   ▪ Secure Code Warrior SQL Injection Video

● Further Reading

   ▪ OWASP SQL Injection Prevention Cheat Sheet

   ▪ OWASP SQL Injection

   ▪ OWASP Query Parameterization Cheat Sheet

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighCross-Site Scripting

CWE-79

transaction.jsp:128

12026-04-07 10:40am
Vulnerable Code

<table border="0" style="padding-bottom:10px;">
<tr>
<td valign=top>After</td>
<td><input id="startDate" name="startDate" type="text" value="<%=(request.getParameter("startDate")==null)?"":request.getParameter("startDate")%>"/><br /><span class="credit">yyyy-mm-dd</span></td>
<td valign=top>Before</td>
<td><input name="endDate" id="endDate" type="text" value="<%=(request.getParameter("endDate")==null)?"":request.getParameter("endDate") %>"/><br /><span class="credit">yyyy-mm-dd</span></td>

1 Data Flow/s detected

<td><input name="endDate" id="endDate" type="text" value="<%=(request.getParameter("endDate")==null)?"":request.getParameter("endDate") %>"/><br /><span class="credit">yyyy-mm-dd</span></td>

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Cross-Site Scripting Training

● Videos

   ▪ Secure Code Warrior Cross-Site Scripting Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighSQL Injection

CWE-89

DBUtil.java:494

52026-04-07 10:40am
Vulnerable Code

public static String addUser(String username, String password, String firstname, String lastname) {
try {
Connection connection = getConnection();
Statement statement = connection.createStatement();
statement.execute("INSERT INTO PEOPLE (USER_ID,PASSWORD,FIRST_NAME,LAST_NAME,ROLE) VALUES ('"+username+"','"+password+"', '"+firstname+"', '"+lastname+"','user')");

5 Data Flow/s detected
View Data Flow 1

String firstname = request.getParameter("firstname");

String error = DBUtil.addUser(username, password1, firstname, lastname);

public static String addUser(String username, String password, String firstname, String lastname) {

statement.execute("INSERT INTO PEOPLE (USER_ID,PASSWORD,FIRST_NAME,LAST_NAME,ROLE) VALUES ('"+username+"','"+password+"', '"+firstname+"', '"+lastname+"','user')");

View Data Flow 2

String lastname = request.getParameter("lastname");

String error = DBUtil.addUser(username, password1, firstname, lastname);

public static String addUser(String username, String password, String firstname, String lastname) {

statement.execute("INSERT INTO PEOPLE (USER_ID,PASSWORD,FIRST_NAME,LAST_NAME,ROLE) VALUES ('"+username+"','"+password+"', '"+firstname+"', '"+lastname+"','user')");

View Data Flow 3

String password1 = request.getParameter("password1");

String error = DBUtil.addUser(username, password1, firstname, lastname);

public static String addUser(String username, String password, String firstname, String lastname) {

statement.execute("INSERT INTO PEOPLE (USER_ID,PASSWORD,FIRST_NAME,LAST_NAME,ROLE) VALUES ('"+username+"','"+password+"', '"+firstname+"', '"+lastname+"','user')");

View more Data Flows

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior SQL Injection Training

● Videos

   ▪ Secure Code Warrior SQL Injection Video

● Further Reading

   ▪ OWASP SQL Injection Prevention Cheat Sheet

   ▪ OWASP SQL Injection

   ▪ OWASP Query Parameterization Cheat Sheet

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighCross-Site Scripting

CWE-79

serverStatusCheckService.jsp:4

12026-04-07 10:40am
Vulnerable Code

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
{
"HostName": "<%=request.getParameter("HostName")%>",

1 Data Flow/s detected

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

"HostName": "<%=request.getParameter("HostName")%>",

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Cross-Site Scripting Training

● Videos

   ▪ Secure Code Warrior Cross-Site Scripting Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

Findings Overview

Severity Vulnerability Type CWE Language Count
High Cross-Site Scripting CWE-79 Java* 10
High SQL Injection CWE-89 Java* 8
High Command Injection CWE-78 Java* 1
High Code Injection CWE-94 JavaScript / TypeScript* 1
Medium Error Messages Information Exposure CWE-209 Java* 10
Medium Trust Boundary Violation CWE-501 Java* 2
Low Cookie Without 'HttpOnly' Flag CWE-1004 Java* 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions