Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Security Report: 24 high severity findings, 140 total findings #100

Open
1 task
mend-for-github-com bot opened this issue Aug 15, 2022 · 0 comments
Open
1 task
Labels
Mend: code security findings Code security findings detected by Mend

Comments

@mend-for-github-com
Copy link

mend-for-github-com bot commented Aug 15, 2022

Code Security Report

Scan Metadata

Latest Scan: 2023-11-06 07:51pm
Total Findings: 140 | New Findings: 0 | Resolved Findings: 0
Tested Project Files: 476
Detected Programming Languages: 2 (Java, JavaScript / Node.js)

  • Check this box to manually trigger a scan

Most Relevant Findings

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

SeverityVulnerability TypeCWEFileData FlowsDate
HighSQL Injection

CWE-89

Assignment5.java:60

22023-11-06 05:24pm
Vulnerable Code

}
if (!"Larry".equals(username_login)) {
return failed(this).feedback("user.not.larry").feedbackArgs(username_login).build();
}
try (var connection = dataSource.getConnection()) {
PreparedStatement statement = connection.prepareStatement("select password from challenge_users where userid = '" + username_login + "' and password = '" + password_login + "'");

2 Data Flow/s detected
View Data Flow 1

PreparedStatement statement = connection.prepareStatement("select password from challenge_users where userid = '" + username_login + "' and password = '" + password_login + "'");

View Data Flow 2

PreparedStatement statement = connection.prepareStatement("select password from challenge_users where userid = '" + username_login + "' and password = '" + password_login + "'");

 
HighSQL Injection

CWE-89

SqlInjectionLesson5a.java:62

32022-08-15 03:41pm
Vulnerable Code

protected AttackResult injectableQuery(String accountName) {
String query = "";
try (Connection connection = dataSource.getConnection()) {
query = "SELECT * FROM user_data WHERE first_name = 'John' and last_name = '" + accountName + "'";
try (Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE)) {
ResultSet results = statement.executeQuery(query);

3 Data Flow/s detected
View Data Flow 1

query = "SELECT * FROM user_data WHERE first_name = 'John' and last_name = '" + accountName + "'";

View Data Flow 2

query = "SELECT * FROM user_data WHERE first_name = 'John' and last_name = '" + accountName + "'";

View Data Flow 3

query = "SELECT * FROM user_data WHERE first_name = 'John' and last_name = '" + accountName + "'";

 
HighSQL Injection

CWE-89

SqlInjectionLesson3.java:65

22022-08-15 03:41pm
Vulnerable Code

protected AttackResult injectableQuery(String query) {
try (Connection connection = dataSource.getConnection()) {
try (Statement statement = connection.createStatement(TYPE_SCROLL_INSENSITIVE, CONCUR_READ_ONLY)) {
Statement checkStatement = connection.createStatement(TYPE_SCROLL_INSENSITIVE,
CONCUR_READ_ONLY);
statement.executeUpdate(query);

2 Data Flow/s detected
View Data Flow 1

View Data Flow 2

 
HighSQL Injection

CWE-89

SqlInjectionLesson5b.java:58

12022-08-15 03:41pm
Vulnerable Code

}
protected AttackResult injectableQuery(String login_count, String accountName) {
String queryString = "SELECT * From user_data WHERE Login_Count = ? and userid= " + accountName;
try (Connection connection = dataSource.getConnection()) {
PreparedStatement query = connection.prepareStatement(queryString, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

1 Data Flow/s detected

protected AttackResult injectableQuery(String login_count, String accountName) {

String queryString = "SELECT * From user_data WHERE Login_Count = ? and userid= " + accountName;

PreparedStatement query = connection.prepareStatement(queryString, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

 
HighSQL Injection

CWE-89

SqlInjectionLesson10.java:63

12022-08-15 03:41pm
Vulnerable Code

String query = "SELECT * FROM access_log WHERE action LIKE '%" + action + "%'";
try (Connection connection = dataSource.getConnection()) {
try {
Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet results = statement.executeQuery(query);

1 Data Flow/s detected

String query = "SELECT * FROM access_log WHERE action LIKE '%" + action + "%'";

 
HighSQL Injection

CWE-89

SqlInjectionChallenge.java:65

12022-08-15 03:41pm
Vulnerable Code

try (Connection connection = dataSource.getConnection()) {
String checkUserQuery = "select userid from sql_challenge_users where userid = '" + username_reg + "'";
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery(checkUserQuery);

1 Data Flow/s detected

String checkUserQuery = "select userid from sql_challenge_users where userid = '" + username_reg + "'";

String checkUserQuery = "select userid from sql_challenge_users where userid = '" + username_reg + "'";

 
HighSQL Injection

CWE-89

Servers.java:71

12022-08-15 03:41pm
Vulnerable Code

@ResponseBody
public List<Server> sort(@RequestParam String column) throws Exception {
List<Server> servers = new ArrayList<>();
try (Connection connection = dataSource.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("select id, hostname, ip, mac, status, description from servers where status <> 'out of order' order by " + column)) {

1 Data Flow/s detected

PreparedStatement preparedStatement = connection.prepareStatement("select id, hostname, ip, mac, status, description from servers where status <> 'out of order' order by " + column)) {

 
HighSQL Injection

CWE-89

SqlInjectionLesson9.java:66

42022-08-15 03:41pm
Vulnerable Code

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";
try (Connection connection = dataSource.getConnection()) {
try {
Statement statement = connection.createStatement(TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE);
SqlInjectionLesson8.log(connection, query);
ResultSet results = statement.executeQuery(query);

4 Data Flow/s detected
View Data Flow 1

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

View Data Flow 2

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

View Data Flow 3

protected AttackResult injectableQueryIntegrity(String name, String auth_tan) {

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

View more Data Flows

 
HighSQL Injection

CWE-89

SqlInjectionLesson8.java:66

42022-08-15 03:41pm
Vulnerable Code

try (Connection connection = dataSource.getConnection()) {
try {
Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
log(connection, query);
ResultSet results = statement.executeQuery(query);

4 Data Flow/s detected
View Data Flow 1

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

View Data Flow 2

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

View Data Flow 3

protected AttackResult injectableQueryConfidentiality(String name, String auth_tan) {

String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

View more Data Flows

 
HighSQL Injection

CWE-89

SqlInjectionLesson2.java:62

22022-08-15 03:41pm
Vulnerable Code

}
protected AttackResult injectableQuery(String query) {
try (var connection = dataSource.getConnection()) {
Statement statement = connection.createStatement(TYPE_SCROLL_INSENSITIVE, CONCUR_READ_ONLY);
ResultSet results = statement.executeQuery(query);

2 Data Flow/s detected
View Data Flow 1

View Data Flow 2

Findings Overview

Severity Vulnerability Type CWE Language Count
High Deserialization of Untrusted Data CWE-502 Java 2
High SQL Injection CWE-89 Java 12
High Cross-Site Scripting CWE-79 Java 3
High Path/Directory Traversal CWE-22 Java 5
High Server Side Request Forgery CWE-918 Java 1
High DOM Based Cross-Site Scripting CWE-79 JavaScript / Node.js 1
Medium Weak Pseudo-Random CWE-338 JavaScript / Node.js 2
Medium Console Output CWE-209 Java 5
Medium Error Messages Information Exposure CWE-209 Java 54
Medium Weak Pseudo-Random CWE-338 Java 8
Medium Heap Inspection CWE-244 Java 33
Medium Hardcoded Password/Credentials CWE-798 Java 10
Medium XML External Entity (XXE) Injection CWE-611 Java 1
Medium Miscellaneous Dangerous Functions CWE-676 Java 2
Low Weak Hash Strength CWE-916 Java 1
@mend-for-github-com mend-for-github-com bot added the Mend: code security findings Code security findings detected by Mend label Aug 15, 2022
@mend-for-github-com mend-for-github-com bot changed the title Code Security Report: 39 high severity findings, 155 total findings Code Security Report: 24 high severity findings, 140 total findings Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mend: code security findings Code security findings detected by Mend
Projects
None yet
Development

No branches or pull requests

0 participants