Skip to content
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

🌱 Remove nolint for gosec #2406

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions controllers/serviceaccount_controller_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ import (

const (
testTargetNS = "test-pvcsi-system"
testTargetSecret = "test-pvcsi-secret" //nolint:gosec
testTargetSecret = "test-pvcsi-secret" //nolint:gosec //Non-production code.
testSystemSvcAcctNs = "test-system-svc-acct-namespace"
testSystemSvcAcctCM = "test-system-svc-acct-cm"

testSecretToken = "ZXlKaGJHY2lPaUpTVXpJMU5pSXNJbXRwWkNJNklp" //nolint:gosec
testSecretToken = "ZXlKaGJHY2lPaUpTVXpJMU5pSXNJbXRwWkNJNklp" //nolint:gosec //Non-production code.
)

var truePointer = true
Expand Down
2 changes: 1 addition & 1 deletion pkg/services/govmomi/vcenter/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
// select one of the datastores of the owning cluster of the resource pool that matched the
// requirements of the storage policy.
if datastoreRef == nil {
r := rand.New(rand.NewSource(time.Now().UnixNano())) //nolint:gosec
Ankitasw marked this conversation as resolved.
Show resolved Hide resolved
r := rand.New(rand.NewSource(time.Now().UnixNano())) //nolint:gosec // We won't need cryptographically secure randomness here.

Check warning on line 274 in pkg/services/govmomi/vcenter/clone.go

View check run for this annotation

Codecov / codecov/patch

pkg/services/govmomi/vcenter/clone.go#L274

Added line #L274 was not covered by tests
ds := result.CompatibleDatastores()[r.Intn(len(result.CompatibleDatastores()))]
datastoreRef = &types.ManagedObjectReference{Type: ds.HubType, Value: ds.HubId}
}
Expand Down
Loading