Skip to content

Commit

Permalink
Skip gosec linter in 3 specfiic cases
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario committed Dec 27, 2023
1 parent dd0671e commit b3c6529
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/sandbox-bundled/bootstrap/cmd/bootstrap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func main() {
if err := os.MkdirAll(filepath.Dir(renderedManifestPath), 0755); err != nil {
log.Fatalf("failed to create destination directory: %s", err)
}
if err := os.WriteFile(renderedManifestPath, rendered, 0644); err != nil {
if err := os.WriteFile(renderedManifestPath, rendered, 0644); err != nil { //nolint:gosec
log.Fatalf("failed to write rendered manifest: %s", err)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"os"
"path/filepath"

"github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/utils"
appsv1 "k8s.io/api/apps/v1"
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/kustomize/api/types"

"github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/utils"
)

type ClusterResourceTemplatesNotFound struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"fmt"
"os"

"github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/utils"
appsv1 "k8s.io/api/apps/v1"
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/kustomize/api/types"

"github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/utils"
)

type ConfigurationNotFound struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (cl *Loader) Transform(data []byte) ([]byte, error) {

// Write base resource module
baseManifestPath := filepath.Join(workDir, "base.yaml")
if err := os.WriteFile(baseManifestPath, data, 0644); err != nil {
if err := os.WriteFile(baseManifestPath, data, 0644); err != nil { //nolint:gosec
return nil, err
}

Expand All @@ -102,7 +102,7 @@ func (cl *Loader) Transform(data []byte) ([]byte, error) {
if err != nil {
return nil, err
}
if err := os.WriteFile(filepath.Join(workDir, "kustomization.yaml"), kyaml, 0644); err != nil {
if err := os.WriteFile(filepath.Join(workDir, "kustomization.yaml"), kyaml, 0644); err != nil { //nolint:gosec
return nil, err
}

Expand Down

0 comments on commit b3c6529

Please sign in to comment.