- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
Create vul.js #2
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
base: main
Are you sure you want to change the base?
Conversation
          Wiz Scan Summary
 To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.  | 
    
| 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 }) }; | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | |
| Likelihood | 
Rule ID: WS-I007-JAVASCRIPT-00006
| const rows = await sequelize.query( | ||
| `SELECT * FROM Users WHERE id = ${id}`, // SQL injection risk | ||
| { type: sequelize.QueryTypes.SELECT } | ||
| ); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | |
| Likelihood | 
Rule ID: WS-I007-JAVASCRIPT-00006
| 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 }) }; | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | |
| Likelihood | 
Rule ID: WS-I007-JAVASCRIPT-00005
No description provided.