Skip to content

Commit 9f8efe9

Browse files
committed
Fix linter issues
1 parent 1eae077 commit 9f8efe9

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

internal/pkg/auth/exchange_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func fixtureTokenExchangeResponse() string {
5050
IssuedTokeType string `json:"issued_token_type"`
5151
TokenType string `json:"token_type"`
5252
}
53-
response, _ := json.Marshal(exchangeReponse{
53+
response, _ := json.Marshal(exchangeReponse{ //nolint:gosec // just a testcase, no valid credentials
5454
AccessToken: testExchangedToken,
5555
IssuedTokeType: "urn:ietf:params:oauth:token-type:id_token",
5656
TokenType: "Bearer",

internal/pkg/auth/user_login.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,14 +351,14 @@ func openBrowser(pageUrl string) (err error) {
351351
// We need to use the windows way on WSL, otherwise we do not pass query
352352
// parameters correctly. https://github.com/microsoft/WSL/issues/3832
353353
if _, ok := os.LookupEnv("WSL_DISTRO_NAME"); !ok {
354-
err = exec.Command("xdg-open", pageUrl).Start()
354+
err = exec.Command("xdg-open", pageUrl).Start() //nolint:gosec // url is validated
355355
break
356356
}
357357
fallthrough
358358
case "windows":
359-
err = exec.Command("rundll32.exe", "url.dll,FileProtocolHandler", pageUrl).Start()
359+
err = exec.Command("rundll32.exe", "url.dll,FileProtocolHandler", pageUrl).Start() //nolint:gosec // url is validated
360360
case "darwin":
361-
err = exec.Command("open", pageUrl).Start()
361+
err = exec.Command("open", pageUrl).Start() //nolint:gosec // url is validated
362362
default:
363363
err = fmt.Errorf("unsupported platform")
364364
}

internal/pkg/auth/utils_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func TestParseWellKnownConfig(t *testing.T) {
135135
getFails: false,
136136
getResponse: `{"issuer":"https://issuer.stackit.cloud/endpoint","authorization_endpoint":"https://auth.stackit.cloud/enpoint","token_endpoint":"https://token.stackit.cloud/endpoint"}`,
137137
isValid: true,
138-
expected: &wellKnownConfig{
138+
expected: &wellKnownConfig{ //nolint:gosec // just a testcase; no credentials
139139
Issuer: "https://issuer.stackit.cloud/endpoint",
140140
AuthorizationEndpoint: "https://auth.stackit.cloud/enpoint",
141141
TokenEndpoint: "https://token.stackit.cloud/endpoint",

0 commit comments

Comments
 (0)