You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Password hashing functions should use an unpredictable salt
<!--SONAR_ISSUE_KEY:AZESYCMCjhPobjrtMa3b-->Make this salt unpredictable. <p>See more on <a href="https://sonarcloud.io/project/issues?id=patched-codes_dvpwa&issues=AZESYCMCjhPobjrtMa3b&open=AZESYCMCjhPobjrtMa3b&pullRequest=12">SonarCloud</a></p>
Details: No violation of Rule 2 (Do not overlook possible security vulnerabilities introduced by code modifications) detected. In fact, the changes improve security by adding security options to the Redis service.
Details: Security vulnerability introduced by removing string formatting and using parameterized queries
Affected Code Snippet:
q= ("INSERT INTO students (name) ""VALUES ('%(name)s')"% {'name': name})
awaitcur.execute(q)
Start Line: 42
End Line: 44
File Changed: sqli/dao/user.py
Details: Potential violation of Rule 2 (Do not overlook possible security vulnerabilities introduced by code modifications). While the change from MD5 to scrypt is an improvement in terms of password hashing, the use of a hard-coded salt reduces the security benefits of scrypt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.scryptfunction for password hashing.