-
Notifications
You must be signed in to change notification settings - Fork 1
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
PatchWork AutoFix #12
base: master
Are you sure you want to change the base?
Conversation
803bdb2
to
9f51eeb
Compare
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@@ -38,4 +38,5 @@ | |||
return User.from_raw(await cur.fetchone()) | |||
|
|||
def check_password(self, password: str): | |||
return self.pwd_hash == md5(password.encode('utf-8')).hexdigest() | |||
return self.pwd_hash == scrypt(password.encode('utf-8'), salt=b'some_salt', n=16384, r=8, p=1).hex() |
Check failure
Code scanning / SonarCloud
Password hashing functions should use an unpredictable salt High
File Changed:
|
This pull request from patched fixes 7 issues.
Fix XSS vulnerability by sanitizing user-controlled data in toast.innerHTML assignment
Escaped user-controlled data before assigning it to toast.innerHTML to prevent XSS attacks.Fix string concatenation vulnerability in console.log
Replaced the dynamic string concatenation in console.log with a constant format string to prevent format specifier injection.Fix issue with string concatenation in debug log message
Replaced string concatenation with a non-literal variable in console.log with a constant value for the format stringFix ReDoS vulnerability in class removal
Replaced RegExp with hardcoded regex pattern to avoid ReDoS vulnerabilityFix security vulnerabilities in Docker Compose file
Added 'security_opt' with 'no-new-privileges:true' to the 'redis' service. Added 'read_only: true' to the 'redis' service to prevent malicious activities.Fix SQL Injection vulnerability by using parameterized queries
Used parameterized queries instead of string concatenation in the create method to prevent SQL Injection.Replace MD5 with a secure password hashing function
Replaced the usage of MD5 with thehashlib.scrypt
function for password hashing.