Skip to content

Commit 2734fb6

Browse files
committed
Enable gosec linter in golangci-lint
1 parent 2b01b82 commit 2734fb6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.golangci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ linters:
88
- lll
99
- godox
1010
- wsl
11-
- gosec
1211
- whitespace
1312
- gocognit
1413
# Run with --fast=false for more extensive checks

cmd/clusterctl/clusterdeployer/clusterclient/clusterclient.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ func (c *client) kubectlApply(manifest string) error {
800800
}
801801

802802
func (c *client) kubectlManifestCmd(commandName, manifest string) error {
803-
cmd := exec.Command("kubectl", c.buildKubectlArgs(commandName)...)
803+
cmd := exec.Command("kubectl", c.buildKubectlArgs(commandName)...) //nolint:gosec
804804
cmd.Stdin = strings.NewReader(manifest)
805805
out, err := cmd.CombinedOutput()
806806
if err != nil {

test/helpers/kind/setup.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ type Cluster struct {
4949
}
5050

5151
// Setup creates a kind cluster and returns a path to the kubeconfig
52+
// nolint:gosec
5253
func (c *Cluster) Setup() {
5354
var err error
5455
c.tmpDir, err = ioutil.TempDir("", "kind-home")
@@ -63,7 +64,7 @@ func (c *Cluster) Setup() {
6364

6465
// Teardown attempts to delete the KIND cluster
6566
func (c *Cluster) Teardown() {
66-
c.run(exec.Command(*kindBinary, "delete", "cluster", "--name", c.Name))
67+
c.run(exec.Command(*kindBinary, "delete", "cluster", "--name", c.Name)) //nolint:gosec
6768
os.RemoveAll(c.tmpDir)
6869
}
6970

@@ -73,12 +74,12 @@ func (c *Cluster) LoadImage(image string) {
7374
ginkgo.GinkgoWriter,
7475
"loading image %q into Kind node\n",
7576
image)
76-
c.run(exec.Command(*kindBinary, "load", "docker-image", "--name", c.Name, image))
77+
c.run(exec.Command(*kindBinary, "load", "docker-image", "--name", c.Name, image)) //nolint:gosec
7778
}
7879

7980
// ApplyYAML applies the provided manifest to the kind cluster
8081
func (c *Cluster) ApplyYAML(manifestPath string) {
81-
c.run(exec.Command(
82+
c.run(exec.Command( //nolint:gosec
8283
*kubectlBinary,
8384
"create",
8485
"--kubeconfig="+c.kubepath,

0 commit comments

Comments
 (0)