Skip to content

Commit

Permalink
Ignore gosec errors in end-to-end tests infra setup (rancher#2392)
Browse files Browse the repository at this point in the history
Those security warnings output by the linter are not very relevant in
this context of an ephemeral, local test setup.
  • Loading branch information
weyfonk authored May 7, 2024
1 parent 299b114 commit 00a638a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions e2e/testenv/infra/cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ var setupCmd = &cobra.Command{

_ = eventually(func() (string, error) {
SSLCfg := &tls.Config{
InsecureSkipVerify: true, // works around having to install or reference a CA cert
// works around having to install or reference a CA cert
InsecureSkipVerify: true, // nolint:gosec
}

client := http.Client{
Expand Down Expand Up @@ -267,7 +268,7 @@ func spinUpOCIRegistry(k kubectl.Command, wg *sync.WaitGroup) {
}

var err error
htpasswd := "fleet-ci:$2y$05$0WcEGGqsUKcyPhBFU7l07uJ3ND121p/FQCY90Q.dcsZjTkr.b45Lm"
htpasswd := "fleet-ci:$2y$05$0WcEGGqsUKcyPhBFU7l07uJ3ND121p/FQCY90Q.dcsZjTkr.b45Lm" // nolint: gosec
if os.Getenv("CI_OCI_USERNAME") != "" && os.Getenv("CI_OCI_PASSWORD") != "" {
p, err := bcrypt.GenerateFromPassword([]byte(os.Getenv("CI_OCI_PASSWORD")), bcrypt.MinCost)
if err != nil {
Expand Down Expand Up @@ -332,7 +333,7 @@ func spinUpHelmRegistry(k kubectl.Command, wg *sync.WaitGroup) {
}

func packageHelmChart() error {
cmd := exec.Command("helm", "package", testenv.AssetPath("gitrepo/sleeper-chart/"))
cmd := exec.Command("helm", "package", testenv.AssetPath("gitrepo/sleeper-chart/")) // nolint: gosec

_, err := cmd.Output()

Expand Down

0 comments on commit 00a638a

Please sign in to comment.