From ad8006de9c248b39cb96ab2e49bfe79d8097917c Mon Sep 17 00:00:00 2001 From: grootSH <112615049+Steven4Hooisma@users.noreply.github.com> Date: Thu, 23 Jul 2026 16:12:27 +0200 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: grootSH <112615049+Steven4Hooisma@users.noreply.github.com> --- pkg/accessreview/drivers/upcloud.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/accessreview/drivers/upcloud.go b/pkg/accessreview/drivers/upcloud.go index 83e6b26c5..a07cb38e4 100644 --- a/pkg/accessreview/drivers/upcloud.go +++ b/pkg/accessreview/drivers/upcloud.go @@ -116,10 +116,9 @@ func (d *UpCloudDriver) ListAccounts(ctx context.Context) ([]AccountRecord, erro records := make([]AccountRecord, 0, len(resp.Accounts.Account)) - for _, a := range resp.Accounts.Account { username := strings.TrimSpace(a.Username) if username == "" { - continue + return nil, fmt.Errorf("upcloud returned an account with an empty username") } fullName := username