Skip to content
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

Fix coverity warnings #408

Merged
merged 10 commits into from
Nov 24, 2021
Merged

Fix coverity warnings #408

merged 10 commits into from
Nov 24, 2021

Conversation

dataclouder
Copy link
Contributor

@dataclouder dataclouder commented Nov 14, 2021

Fix Coverity security warnings.
Initial statistics:

Defect occurrences found       : 84 Total
                                  3 DEADCODE
                                  5 FORWARD_NULL
                                  3 REVERSE_INULL
                                  1 SQLI
                                 68 SUPPRESSED_ERROR
                                  1 UNSAFE_BASIC_AUTH
                                  3 URL_MANIPULATION

Current situation:

Defect occurrences found       : 5 Total (*)
                                 1 SQLI
                                 1 UNSAFE_BASIC_AUTH
                                 3 URL_MANIPULATION

(*) Remaining defects have been triaged as false positives

Giuseppe Maxia added 4 commits November 14, 2021 09:15
Signed-off-by: Giuseppe Maxia <[email protected]>
Signed-off-by: Giuseppe Maxia <[email protected]>
Signed-off-by: Giuseppe Maxia <[email protected]>
Giuseppe Maxia added 4 commits November 15, 2021 09:32
Methods client.vcdCheckSupportedVersion, client.checkSupportedVersionConstraint,
and client.apiVersionMatchesConstraint were returning "true" only if
error was nil. Removing the Boolean returning value makes evaluation
more streamlined.

Signed-off-by: Giuseppe Maxia <[email protected]>
Signed-off-by: Giuseppe Maxia <[email protected]>
Signed-off-by: Giuseppe Maxia <[email protected]>
Signed-off-by: Giuseppe Maxia <[email protected]>
@dataclouder dataclouder marked this pull request as ready for review November 18, 2021 07:33
Signed-off-by: Giuseppe Maxia <[email protected]>
@dataclouder dataclouder changed the title Fix coverity Fix coverity warnings Nov 18, 2021
@@ -291,10 +291,6 @@ func searchByFilter(queryByMetadata queryByMetadataFunc, queryWithMetadataFields
return nil, explanation, fmt.Errorf("search for oldest item failed. Empty dates found for items %v", emptyDatesFound)
}
}
if searchEarliest || searchLatest {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note to reviewers: dead code removed

Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

Like all the additional error messages! Just one ask.

Signed-off-by: Giuseppe Maxia <[email protected]>
Copy link
Collaborator

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

Looks good - thanks

@dataclouder dataclouder merged commit a07f243 into vmware:master Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants