fix(security): remediate SonarQube vulnerabilities#78
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
fix(security): remediate SonarQube vulnerabilities#78devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
- S1192: Define constants for duplicated string literals: - errFailedToGetGitHubClient for error message (7 occurrences) - descRepositoryOwner for 'Repository owner' description (6 occurrences) - descRepositoryName for 'Repository name' description (6 occurrences) - S3776: Reduce cognitive complexity in ListIssues (line 324): - Extract parseListIssuesOptions helper function to parse request options - S3776: Reduce cognitive complexity in AssignCopilotToIssue (line 704): - Extract copilotBotAssignee and suggestedActorsQuery types to package level - Extract issueAssigneesQuery type to package level - Extract findCopilotBotAssignee helper function - Extract getIssueAssignees helper function - Add copilotBotLogin constant Co-Authored-By: parker.duff@codeium.com <pwjduff@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Closes: N/A (SonarQube remediation task)
Summary
This PR addresses 5 CRITICAL severity SonarQube issues in
pkg/github/issues.go:S1192 - Duplicated String Literals (3 issues):
errFailedToGetGitHubClientconstant for error message duplicated 7 timesdescRepositoryOwnerconstant for description duplicated 6 timesdescRepositoryNameconstant for description duplicated 6 timesS3776 - Cognitive Complexity (2 issues):
parseListIssuesOptions()helper fromListIssueshandlerfindCopilotBotAssignee()andgetIssueAssignees()helpers fromAssignCopilotToIssuehandlercopilotBotAssignee,suggestedActorsQuery, andissueAssigneesQuerytypes to package levelHuman Review Checklist
parseListIssuesOptionsnow returns"invalid since timestamp: %w"instead of"failed to list issues: %s"- verify this is acceptableTesting
Link to Devin run: https://app.devin.ai/sessions/ea91faa87d69422893b4da1d0029adc9
Requested by: @parkerduff