Skip to content

fix: sonar security issue #961

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

Closed
wants to merge 1 commit into from
Closed

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Feb 21, 2022

No description provided.

@csviri csviri self-assigned this Feb 21, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 21 Code Smells

28.2% 28.2% Coverage
0.6% 0.6% Duplication

@@ -54,6 +54,13 @@ public void initContext(MySQLSchema primary, Context context) {
context.put(MYSQL_SECRET_USERNAME, userName);
}

private String randomPassword(int length) {
SecureRandom random = new SecureRandom(); // Compliant for security-sensitive use cases
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't need to do this, though… We need a way to exclude such false positive from Sonar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Did not find a way, not sure if possible for the security issues.

Copy link
Collaborator Author

@csviri csviri Feb 21, 2022

Choose a reason for hiding this comment

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

this seems to be working:
#962
:)

@csviri csviri closed this Feb 21, 2022
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