-
Notifications
You must be signed in to change notification settings - Fork 44
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
Update main.py #1
base: main
Are you sure you want to change the base?
Conversation
KEY_SIZE = 1024 | ||
|
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.
KEY_SIZE = 1024 | ||
|
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.
KEY_SIZE = 1024 | ||
|
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.
KEY_SIZE = 1024 | ||
|
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.
SAST
External control of system or configuration setting
Source File: ExternalControlOfSystemOrConfigurationSetting1-taint3.java, Sink File: ExternalControlOfSystemOrConfigurationSetting1-taint3.java
Data Flow
ExternalControlOfSystemOrConfigurationSetting1-taint3.java
13 | String tainted = req.getParameter("input");
ExternalControlOfSystemOrConfigurationSetting1-taint3.java
14 | c.setCatalog(tainted);
How To Fix
String userInput = request.getParameter("catalogName");
if(isValidCatalogName(userInput)) {
connection.setCatalog(userInput);
}
Description
This SAST policy detects instances where user input is used in the java.sql.Connection
's setCatalog
call. This can be a potential issue as it may allow attackers to change the database during a connection, leading to disruptions or unexpected behaviors.
Vulnerable code example:
java
String userInput = request.getParameter("catalogName");
connection.setCatalog(userInput);
In the above code, the setCatalog
method uses user input catalogName
directly without any validation or sanitization. This allows an attacker to manipulate the catalogName
parameter and potentially change the database being accessed.
KEY_SIZE = 1024 | ||
|
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.
SCA
MOCK_PACKAGE_NAME 1.1.2 / ec2.tf
Total vulnerabilities: 2
Critical: 1 | High: 1 | Medium: 0 | Low: 0 |
---|
Vulnerability ID | Severity | CVSS | Fixed in | Status |
---|---|---|---|---|
CVE-2022-1650 | 9.3 | 1.1.1 |
Open | |
CVE-2020-7788 | 7.3 | 1.0.5 |
Open |
No description provided.