mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-09-10 12:59:09 +08:00
@@ -22,6 +22,7 @@ linters:
|
||||
- staticcheck
|
||||
- typecheck
|
||||
- nolintlint
|
||||
- gosec
|
||||
disable-all: true
|
||||
|
||||
linters-settings:
|
||||
@@ -32,6 +33,12 @@ linters-settings:
|
||||
# The io/ioutil package has been deprecated.
|
||||
# https://go.dev/doc/go1.16#ioutil
|
||||
- io/ioutil
|
||||
gosec:
|
||||
excludes:
|
||||
- G204 # Audit use of command execution
|
||||
- G402 # TLS MinVersion too low
|
||||
config:
|
||||
G306: "0644"
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
|
@@ -37,7 +37,7 @@ func (pc *RandomPodChooser) ChoosePod(ctx context.Context) (*corev1.Pod, error)
|
||||
if randSource == nil {
|
||||
randSource = rand.NewSource(time.Now().Unix())
|
||||
}
|
||||
rnd := rand.New(randSource)
|
||||
rnd := rand.New(randSource) //nolint:gosec // no strong seeding required
|
||||
n := rnd.Int() % len(pods)
|
||||
logrus.Debugf("RandomPodChooser.ChoosePod(): len(pods)=%d, n=%d", len(pods), n)
|
||||
return pods[n], nil
|
||||
|
Reference in New Issue
Block a user