Skip to content

fix: fix security vulnerabilities reported by CodeQL #5467

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

Merged
merged 2 commits into from
Dec 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update coderd/gitauth/oauth.go
  • Loading branch information
deansheather authored Dec 19, 2022
commit 7c42d427e279619f234970a6294e8a7daabc561c
8 changes: 4 additions & 4 deletions coderd/gitauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ var scope = map[codersdk.GitProvider][]string{
// regex provides defaults for each Git provider to match their SaaS host URL.
// This is configurable by each provider.
var regex = map[codersdk.GitProvider]*regexp.Regexp{
codersdk.GitProviderAzureDevops: regexp.MustCompile(`^(https?:\/\/)?dev\.azure\.com(\/.*)?$`),
codersdk.GitProviderBitBucket: regexp.MustCompile(`^(https?:\/\/)?bitbucket\.org(\/.*)?$`),
codersdk.GitProviderGitLab: regexp.MustCompile(`^(https?:\/\/)?gitlab\.com(\/.*)?$`),
codersdk.GitProviderGitHub: regexp.MustCompile(`^(https?:\/\/)?github\.com(\/.*)?$`),
codersdk.GitProviderAzureDevops: regexp.MustCompile(`^(https?://)?dev\.azure\.com(/.*)?$`),
codersdk.GitProviderBitBucket: regexp.MustCompile(`^(https?://)?bitbucket\.org(/.*)?$`),
codersdk.GitProviderGitLab: regexp.MustCompile(`^(https?://)?gitlab\.com(/.*)?$`),
codersdk.GitProviderGitHub: regexp.MustCompile(`^(https?://)?github\.com(/.*)?$`),
}

// newJWTOAuthConfig creates a new OAuth2 config that uses a custom
Expand Down