Skip to content

Commit

Permalink
ignore gosec findings for test-code
Browse files Browse the repository at this point in the history
  • Loading branch information
geigerj0 authored and renovate[bot] committed Jun 12, 2024
1 parent c759931 commit 1c2864e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/autoscaler/api/cmd/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var _ = Describe("Api", func() {
badfile, err := os.CreateTemp("", "bad-ap-config")
Expect(err).NotTo(HaveOccurred())
runner.configPath = badfile.Name()
// #nosec G306
err = os.WriteFile(runner.configPath, []byte("bogus"), os.ModePerm)
Expect(err).NotTo(HaveOccurred())
runner.Start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ var _ = Describe("Eventgenerator", func() {
badfile, err := os.CreateTemp("", "bad-mc-config")
Expect(err).NotTo(HaveOccurred())
runner.configPath = badfile.Name()
// #nosec G306
err = os.WriteFile(runner.configPath, []byte("bogus"), os.ModePerm)
Expect(err).NotTo(HaveOccurred())
runner.Start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ var _ = Describe("Metricsforwarder", func() {
badfile, err := os.CreateTemp("", "bad-mf-config")
Expect(err).NotTo(HaveOccurred())
runner.configPath = badfile.Name()
// #nosec G306
err = os.WriteFile(runner.configPath, []byte("bogus"), os.ModePerm)
Expect(err).NotTo(HaveOccurred())
runner.Start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ var _ = Describe("Metricsgateway", func() {
badfile, err := os.CreateTemp("", "bad-mc-config")
Expect(err).NotTo(HaveOccurred())
runner.configPath = badfile.Name()
// #nosec G306
err = os.WriteFile(runner.configPath, []byte("bogus"), os.ModePerm)
Expect(err).NotTo(HaveOccurred())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var _ = Describe("MetricsServer", func() {
badfile, err := os.CreateTemp("", "bad-ms-config")
Expect(err).NotTo(HaveOccurred())
runner.configPath = badfile.Name()
// #nosec G306
err = os.WriteFile(runner.configPath, []byte("bogus"), os.ModePerm)
Expect(err).NotTo(HaveOccurred())
runner.Start()
Expand Down
1 change: 1 addition & 0 deletions src/autoscaler/operator/cmd/operator/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var _ = Describe("Operator", Serial, func() {
badfile, err := os.CreateTemp("", "bad-pr-config")
Expect(err).NotTo(HaveOccurred())
runner.configPath = badfile.Name()
// #nosec G306
err = os.WriteFile(runner.configPath, []byte("bogus"), os.ModePerm)
Expect(err).NotTo(HaveOccurred())
runner.Start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ var _ = Describe("Main", func() {
badfile, err := os.CreateTemp("", "bad-engine-config")
Expect(err).NotTo(HaveOccurred())
runner.configPath = badfile.Name()
// #nosec G306
err = os.WriteFile(runner.configPath, []byte("bogus"), os.ModePerm)
Expect(err).NotTo(HaveOccurred())
})
Expand Down

0 comments on commit 1c2864e

Please sign in to comment.