Skip to content

Commit

Permalink
chore: explicitly set token authentication when using the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSchafer committed May 15, 2024
1 parent 0e5985d commit 872b87e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion infrastructure/cli/auth/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (a *CliAuthenticationProvider) getToken(ctx context.Context) (string, error

func (a *CliAuthenticationProvider) authCmd(ctx context.Context) (*exec.Cmd, error) {
log.Info().Msg("authenticate Snyk CLI with a Snyk account")
args := []string{"auth"}
args := []string{"auth", "--auth-type=token"}
return a.buildCLICmd(ctx, args...), nil
}

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/cli/auth/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestAuth_authCmd(t *testing.T) {
authCmd, err := provider.authCmd(ctx)

assert.NoError(t, err)
assertCmd(t, []string{"auth"}, authCmd)
assertCmd(t, []string{"auth", "--auth-type=token"}, authCmd)
}

func TestConfig_configGetAPICmd(t *testing.T) {
Expand Down

0 comments on commit 872b87e

Please sign in to comment.