Skip to content

Conversation

@guyerez
Copy link
Owner

@guyerez guyerez commented Sep 18, 2025

No description provided.

@guyerez
Copy link
Owner Author

guyerez commented Sep 18, 2025

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
SAST Finding SAST Findings 1 High 2 Medium
Total 1 High 2 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Comment on lines +28 to +38
const id = (event.queryStringParameters || {}).id ?? "";

try {
const rows = await sequelize.query(
`SELECT * FROM Users WHERE id = ${id}`, // SQL injection risk
{ type: sequelize.QueryTypes.SELECT }
);
return { statusCode: 200, body: JSON.stringify(rows) };
} catch (err) {
return { statusCode: 500, body: JSON.stringify({ error: err.message }) };
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium SAST Finding

SQL Injection from Untrusted Input (CWE-89)

More Details

This rule detects instances where untrusted user input is concatenated with SQL queries, leading to potential SQL injection vulnerabilities. SQL injection is a technique where malicious SQL statements are inserted into application entry points, allowing attackers to view, modify, or delete data from the database.

SQL injection presents a critical security risk as it can grant unauthorized access to sensitive data, allow data manipulation, and potentially enable further attacks on the system. Successful exploitation could lead to data breaches, data loss, and system compromise. To avoid SQL injection, user input should be properly sanitized and validated before being used in SQL queries.

Attribute Value
Impact Medium
Likelihood Medium

Rule ID: WS-I007-JAVASCRIPT-00006

Comment on lines +31 to +34
const rows = await sequelize.query(
`SELECT * FROM Users WHERE id = ${id}`, // SQL injection risk
{ type: sequelize.QueryTypes.SELECT }
);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium SAST Finding

SQL Injection from Untrusted Input (CWE-89)

More Details

This rule detects instances where untrusted user input is concatenated with SQL queries, leading to potential SQL injection vulnerabilities. SQL injection is a technique where malicious SQL statements are inserted into application entry points, allowing attackers to view, modify, or delete data from the database.

SQL injection presents a critical security risk as it can grant unauthorized access to sensitive data, allow data manipulation, and potentially enable further attacks on the system. Successful exploitation could lead to data breaches, data loss, and system compromise. To avoid SQL injection, user input should be properly sanitized and validated before being used in SQL queries.

Attribute Value
Impact Medium
Likelihood Medium

Rule ID: WS-I007-JAVASCRIPT-00006

Comment on lines +63 to +70
const id = (event.queryStringParameters || {}).id ?? "";

try {
const user = await User.findOne({ where: { id } }); // safe
return { statusCode: 200, body: JSON.stringify(user) };
} catch (err) {
return { statusCode: 500, body: JSON.stringify({ error: err.message }) };
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High SAST Finding

NoSQL Injection in findOne() Function (CWE-943)

More Details

This rule detects instances where user input is passed directly into the findOne() function of a NoSQL database without proper sanitization. This can lead to NoSQL Injection vulnerabilities, which allow attackers to execute arbitrary database queries and potentially gain unauthorized access to sensitive data or perform other malicious actions.

NoSQL Injection vulnerabilities arise when user input is not properly sanitized or validated before being used in database queries. Attackers can craft malicious input that gets interpreted as part of the query logic, allowing them to modify the intended query and potentially access or manipulate data they should not have access to. This can lead to data breaches, data loss, and other security issues.

Attribute Value
Impact High
Likelihood Medium

Rule ID: WS-I007-JAVASCRIPT-00005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants