Skip to content

Commit

Permalink
Remove nolint for gosec
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankitasw committed Sep 29, 2023
1 parent e77d02c commit aa1c75e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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 @@ func Clone(ctx *context.VMContext, bootstrapData []byte, format bootstrapv1.Form
// 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
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

0 comments on commit aa1c75e

Please sign in to comment.