mirror of https://github.com/docker/buildx.git
lint: enable gosec
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
parent
48357ee0c6
commit
5da09f0c23
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue