Repository: apache/camel-k
Pull request #2778 (2021-11-24 11:54:27)

doc: cleaning
* Changing a bit the order of the menu to reflect the user journey
* Creating a tidier menu for installation section

<!-- Description -->




<!--
Enter your extended release note in the below block. If the PR requires
additional action from users switching to the new release, include the string
"action required". If no release note is required, write "NONE". 

You can (optionally) mark this PR with labels "kind/bug" or "kind/feature" to make sure
the text is added to the right section of the release notes. 
-->

**Release Note**
```release-note
NONE
```



Patch:
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index bf87a65fa..a4a27ef7c 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -37,17 +37,15 @@ jobs:
     steps:
       - name: Check out code
         uses: actions/checkout@v2
-      - name: Cache modules
-        uses: actions/cache@v1
+      - name: Install Go
+        uses: actions/setup-go@v1
         with:
-          path: ~/go/pkg/mod
-          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
-          restore-keys: |
-            ${{ runner.os }}-go-
+          go-version: 1.16.x
       - name: golangci-lint
         uses: golangci/golangci-lint-action@v2
         env:
           GOGC: 20
         with:
-          version: v1.42
+          version: v1.43.0
+          skip-go-installation: true
           args: --verbose --deadline 15m --config .golangci.yml
diff --git a/.golangci.yml b/.golangci.yml
index 34ab8447c..d9979d79c 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -18,54 +18,46 @@
 linters-settings:
   lll:
     line-length: 170
+  goconst:
+    ignore-tests: true
 linters:
-  disable-all: true
-  enable:
-    - asciicheck
-    - bodyclose
-    - deadcode
-    - depguard
-    - dogsled
-    - durationcheck
-    - errcheck
-    - errname
-    - errorlint
-    - exportloopref
-    - forcetypeassert
-    - gocritic
-    - gofmt
+  enable-all: true
+  disable:
+    - dupl
+    - forbidigo
+    - funlen
+    - gomoddirectives
+    - godox
+    - gomnd
+    - gochecknoinits
+    - gocognit
+    - godot
+    - lll
+    - nestif
+    - cyclop
+    - exhaustivestruct
+    - gochecknoglobals
+    - testpackage
+    - goerr113
+    - varnamelen
+    - tagliatelle
+    - paralleltest
+    - wrapcheck
+    - ireturn
     - gofumpt
-    - goheader
-    - goimports
-    - gomodguard
-    - goprintffuncname
-    - gosimple
-    - govet
-    - ifshort
-    - importas
-    - ineffassign
-#    - lll
-    - makezero
-    - misspell
+    - gci
+    - wsl
+    - goconst
+    - tenv
+    - whitespace
+    - gocyclo
+    - nlreturn
+    - nilnil
+    - exhaustive
+    - noctx
     - nakedret
-    - nilerr
-    - nolintlint
-    - prealloc
-    - promlinter
-    - revive
-    - rowserrcheck
-    - sqlclosecheck
-    - staticcheck
-    - structcheck
-    - stylecheck
-    - thelper
-    - tparallel
-    - typecheck
-    - unconvert
-    - unparam
-    - unused
-    - varcheck
-    - wastedassign
+    - contextcheck
+    - maligned
 
 issues:
   exclude-rules:
diff --git a/addons/register_strimzi.go b/addons/register_strimzi.go
index 9eac79539..de9c90d29 100644
--- a/addons/register_strimzi.go
+++ b/addons/register_strimzi.go
@@ -23,5 +23,5 @@ import (
 )
 
 func init() {
-	bindings.RegisterBindingProvider(strimzi.StrimziBindingProvider{})
+	bindings.RegisterBindingProvider(strimzi.BindingProvider{})
 }
diff --git a/addons/strimzi/strimzi.go b/addons/strimzi/strimzi.go
index a8329af88..5d2413ad8 100644
--- a/addons/strimzi/strimzi.go
+++ b/addons/strimzi/strimzi.go
@@ -30,17 +30,16 @@ import (
 	"k8s.io/apimachinery/pkg/runtime/schema"
 )
 
-// StrimziBindingProvider allows to connect to a Kafka topic via KameletBinding
-// nolint: revive
-type StrimziBindingProvider struct {
+// BindingProvider allows to connect to a Kafka topic via KameletBinding
+type BindingProvider struct {
 	Client internalclientset.Interface
 }
 
-func (s StrimziBindingProvider) ID() string {
+func (s BindingProvider) ID() string {
 	return "strimzi"
 }
 
-func (s StrimziBindingProvider) Translate(ctx bindings.BindingContext, _ bindings.EndpointContext, endpoint v1alpha1.Endpoint) (*bindings.Binding, error) {
+func (s BindingProvider) Translate(ctx bindings.BindingContext, _ bindings.EndpointContext, endpoint v1alpha1.Endpoint) (*bindings.Binding, error) {
 	if endpoint.Ref == nil {
 		// React only on refs
 		return nil, nil
@@ -100,7 +99,7 @@ func (s StrimziBindingProvider) Translate(ctx bindings.BindingContext, _ binding
 	}, nil
 }
 
-func (s StrimziBindingProvider) getBootstrapServers(ctx bindings.BindingContext, clusterName string) (string, error) {
+func (s BindingProvider) getBootstrapServers(ctx bindings.BindingContext, clusterName string) (string, error) {
 	cluster, err := s.Client.KafkaV1beta2().Kafkas(ctx.Namespace).Get(ctx.Ctx, clusterName, v1.GetOptions{})
 	if err != nil {
 		return "", err
@@ -119,6 +118,6 @@ func (s StrimziBindingProvider) getBootstrapServers(ctx bindings.BindingContext,
 	return "", fmt.Errorf("cluster %q has no listeners of type %q", clusterName, v1beta2.StrimziListenerTypePlain)
 }
 
-func (s StrimziBindingProvider) Order() int {
+func (s BindingProvider) Order() int {
 	return bindings.OrderStandard
 }
diff --git a/cmd/util/doc-gen/generators/traitdocgen.go b/cmd/util/doc-gen/generators/traitdocgen.go
index f695b69f5..57bdd6f89 100644
--- a/cmd/util/doc-gen/generators/traitdocgen.go
+++ b/cmd/util/doc-gen/generators/traitdocgen.go
@@ -20,7 +20,6 @@ package generators
 import (
 	"fmt"
 	"io"
-	"io/ioutil"
 	"os"
 	"path"
 	"reflect"
@@ -28,6 +27,8 @@ import (
 	"sort"
 	"strings"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	"k8s.io/gengo/args"
 	"k8s.io/gengo/generator"
 	"k8s.io/gengo/types"
@@ -90,17 +91,15 @@ func (g *traitDocGen) GenerateType(context *generator.Context, t *types.Type, ou
 
 	g.generatedTraitFiles = append(g.generatedTraitFiles, traitFile)
 
-	file, content, err := readFile(filename)
-	if err != nil {
-		return err
-	}
-	defer file.Close()
+	return util.WithFileContent(filename, func(file *os.File, data []byte) error {
+		content := strings.Split(string(data), "\n")
 
-	writeTitle(traitID, &content)
-	writeDescription(t, traitID, &content)
-	writeFields(t, traitID, &content)
+		writeTitle(traitID, &content)
+		writeDescription(t, traitID, &content)
+		writeFields(t, traitID, &content)
 
-	return writeFile(file, content)
+		return writeFile(file, content)
+	})
 }
 
 func (g *traitDocGen) Finalize(c *generator.Context, w io.Writer) error {
@@ -112,25 +111,23 @@ func (g *traitDocGen) FinalizeNav(*generator.Context) error {
 	navPath := g.arguments.CustomArgs.(*CustomArgs).NavPath
 	filename := path.Join(docDir, navPath)
 
-	file, content, err := readFile(filename)
-	if err != nil {
-		return err
-	}
-	defer file.Close()
+	return util.WithFileContent(filename, func(file *os.File, data []byte) error {
+		content := strings.Split(string(data), "\n")
 
-	pre, post := split(content, adocNavMarkerStart, adocNavMarkerEnd)
+		pre, post := split(content, adocNavMarkerStart, adocNavMarkerEnd)
 
-	content = append([]string(nil), pre...)
-	content = append(content, adocNavMarkerStart)
-	sort.Strings(g.generatedTraitFiles)
-	for _, t := range g.generatedTraitFiles {
-		name := traitNameFromFile(t)
-		content = append(content, "** xref:traits:"+t+"["+name+"]")
-	}
-	content = append(content, adocNavMarkerEnd)
-	content = append(content, post...)
+		content = append([]string(nil), pre...)
+		content = append(content, adocNavMarkerStart)
+		sort.Strings(g.generatedTraitFiles)
+		for _, t := range g.generatedTraitFiles {
+			name := traitNameFromFile(t)
+			content = append(content, "** xref:traits:"+t+"["+name+"]")
+		}
+		content = append(content, adocNavMarkerEnd)
+		content = append(content, post...)
 
-	return writeFile(file, content)
+		return writeFile(file, content)
+	})
 }
 
 func traitNameFromFile(file string) string {
@@ -274,19 +271,6 @@ func split(doc []string, startMarker, endMarker string) (pre []string, post []st
 	return pre, post
 }
 
-func readFile(filename string) (file *os.File, content []string, err error) {
-	if file, err = os.OpenFile(filename, os.O_RDWR|os.O_CREATE, 0o777); err != nil {
-		return file, content, err
-	}
-
-	bytes, err := ioutil.ReadFile(filename)
-	if err != nil {
-		return file, content, err
-	}
-	content = strings.Split(string(bytes), "\n")
-	return file, content, nil
-}
-
 func writeFile(file *os.File, content []string) error {
 	if err := file.Truncate(0); err != nil {
 		return err
diff --git a/cmd/util/doc-gen/generators/traitmetadatagen.go b/cmd/util/doc-gen/generators/traitmetadatagen.go
index 3dffe876f..aae0da702 100644
--- a/cmd/util/doc-gen/generators/traitmetadatagen.go
+++ b/cmd/util/doc-gen/generators/traitmetadatagen.go
@@ -25,6 +25,8 @@ import (
 	"reflect"
 	"strings"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	"gopkg.in/yaml.v2"
 	"k8s.io/gengo/args"
 	"k8s.io/gengo/generator"
@@ -87,27 +89,24 @@ func (g *traitMetaDataGen) GenerateType(context *generator.Context, t *types.Typ
 	return nil
 }
 
-func (g *traitMetaDataGen) Finalize(c *generator.Context, w io.Writer) error {
+func (g *traitMetaDataGen) Finalize(c *generator.Context, w io.Writer) (err error) {
 	deployDir := g.arguments.CustomArgs.(*CustomArgs).ResourceDir
 	traitFile := "traits.yaml"
 	filename := path.Join(deployDir, traitFile)
 
-	var file *os.File
-	var err error
-	if file, err = os.OpenFile(filename, os.O_RDWR|os.O_CREATE, 0o777); err != nil {
-		return err
-	}
-	if err = file.Truncate(0); err != nil {
-		return err
-	}
-	defer file.Close()
+	return util.WithFile(filename, os.O_RDWR|os.O_CREATE, 0o777, func(file *os.File) error {
+		if err := file.Truncate(0); err != nil {
+			return err
+		}
 
-	data, err := yaml.Marshal(g.Root)
-	if err != nil {
-		fmt.Fprintf(file, "error: %v", err)
-	}
-	fmt.Fprintf(file, "%s", string(data))
-	return nil
+		data, err := yaml.Marshal(g.Root)
+		if err != nil {
+			fmt.Fprintf(file, "error: %v", err)
+		}
+		fmt.Fprintf(file, "%s", string(data))
+
+		return nil
+	})
 }
 
 func (g *traitMetaDataGen) getTraitID(t *types.Type) string {
diff --git a/cmd/util/json-schema-gen/main.go b/cmd/util/json-schema-gen/main.go
index db480781e..671bc178c 100644
--- a/cmd/util/json-schema-gen/main.go
+++ b/cmd/util/json-schema-gen/main.go
@@ -25,6 +25,8 @@ import (
 	"reflect"
 	"strings"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
 	clientscheme "k8s.io/client-go/kubernetes/scheme"
 
@@ -97,7 +99,7 @@ func generate(crdFilename, dslFilename, path string, isArray bool, destination s
 	if err != nil {
 		return err
 	}
-	return ioutil.WriteFile(destination, result, 0o666)
+	return ioutil.WriteFile(destination, result, 0o600)
 }
 
 func remapRef(ref string) string {
@@ -122,7 +124,7 @@ func rebaseRefs(schema map[string]interface{}) {
 }
 
 func loadDslSchema(filename string) (map[string]interface{}, error) {
-	bytes, err := ioutil.ReadFile(filename)
+	bytes, err := util.ReadFile(filename)
 	if err != nil {
 		return nil, err
 	}
@@ -134,7 +136,7 @@ func loadDslSchema(filename string) (map[string]interface{}, error) {
 }
 
 func loadCrdSchema(filename string) (*apiextensionsv1.JSONSchemaProps, error) {
-	bytes, err := ioutil.ReadFile(filename)
+	bytes, err := util.ReadFile(filename)
 	if err != nil {
 		return nil, err
 	}
diff --git a/cmd/util/license-check/main.go b/cmd/util/license-check/main.go
index bcf596043..417acc2c1 100644
--- a/cmd/util/license-check/main.go
+++ b/cmd/util/license-check/main.go
@@ -19,9 +19,10 @@ package main
 
 import (
 	"fmt"
-	"io/ioutil"
 	"os"
 	"strings"
+
+	"github.com/apache/camel-k/pkg/util"
 )
 
 func main() {
@@ -33,21 +34,24 @@ func main() {
 	fileName := os.Args[1]
 	licenseName := os.Args[2]
 
-	fileBin, err := ioutil.ReadFile(fileName)
+	fileBin, err := util.ReadFile(fileName)
 	if err != nil {
+		// #nosec G104
 		os.Stderr.WriteString(fmt.Sprintf("cannot read file %s: %v\n", fileName, err))
 		os.Exit(1)
 	}
 	file := string(fileBin)
 
-	licenseBin, err := ioutil.ReadFile(licenseName)
+	licenseBin, err := util.ReadFile(licenseName)
 	if err != nil {
+		// #nosec G104
 		os.Stderr.WriteString(fmt.Sprintf("cannot read file %s: %v\n", licenseName, err))
 		os.Exit(1)
 	}
 	license := string(licenseBin)
 
 	if !strings.Contains(file, license) {
+		// #nosec G104
 		os.Stderr.WriteString(fmt.Sprintf("file %s does not contain license\n", fileName))
 		os.Exit(1)
 	}
diff --git a/cmd/util/vfs-gen/main.go b/cmd/util/vfs-gen/main.go
index a3734f39b..1fd428e8c 100644
--- a/cmd/util/vfs-gen/main.go
+++ b/cmd/util/vfs-gen/main.go
@@ -29,6 +29,8 @@ import (
 	"strings"
 	"time"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	"github.com/apache/camel-k/cmd/util/vfs-gen/multifs"
 	"github.com/apache/camel-k/pkg/base"
 	"github.com/shurcooL/httpfs/filter"
@@ -139,14 +141,14 @@ limitations under the License.
 */
 
 `
-	content, err := ioutil.ReadFile(resourceFile)
+	content, err := util.ReadFile(resourceFile)
 	if err != nil {
 		log.Fatalln(err)
 	}
 	var finalContent []byte
 	finalContent = append(finalContent, []byte(header)...)
 	finalContent = append(finalContent, content...)
-	if err := ioutil.WriteFile(resourceFile, finalContent, 0o777); err != nil {
+	if err := ioutil.WriteFile(resourceFile, finalContent, 0o600); err != nil {
 		log.Fatalln(err)
 	}
 }
@@ -188,8 +190,8 @@ func BigFilesFilter(size int) func(path string, fi os.FileInfo) bool {
 func calcExclusions(root string, dirNames []string) []string {
 	var exclusions []string
 
-	for _, dirName := range dirNames {
-		dirName = filepath.Join(root, dirName)
+	for _, name := range dirNames {
+		dirName := filepath.Join(root, name)
 		if err := filepath.Walk(dirName, func(resPath string, info os.FileInfo, err error) error {
 			if info.IsDir() {
 				ignoreFileName := path.Join(resPath, ".vfsignore")
diff --git a/docs/modules/ROOT/nav-end.adoc b/docs/modules/ROOT/nav-end.adoc
index 2eeda4a6a..1512dfaf3 100644
--- a/docs/modules/ROOT/nav-end.adoc
+++ b/docs/modules/ROOT/nav-end.adoc
@@ -3,8 +3,8 @@
 ** xref:troubleshooting/operating.adoc[Operating]
 ** xref:troubleshooting/known-issues.adoc[Known Issues]
 * xref:kamelets/kamelets.adoc[Kamelets]
-** xref:kamelets/kamelets-user.adoc[Kamelets User Guide]
-** xref:kamelets/kamelets-dev.adoc[Kamelets Developer Guide]
+** xref:kamelets/kamelets-user.adoc[User Guide]
+** xref:kamelets/kamelets-dev.adoc[Developer Guide]
 * xref:architecture/architecture.adoc[Architecture]
 ** xref:architecture/operator.adoc[Operator]
 *** xref:architecture/cr/integration-platform.adoc[IntegrationPlatform]
@@ -14,7 +14,6 @@
 *** xref:architecture/cr/camel-catalog.adoc[CamelCatalog]
 ** xref:architecture/runtime.adoc[Runtime]
 ** xref:architecture/traits.adoc[Traits]
-** xref:architecture/advanced.adoc[Advanced Installation]
 * xref:apis/camel.adoc[API]
 * xref:uninstalling.adoc[Uninstalling]
 * xref:contributing/developers.adoc[Contributing]
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 223a98e39..172642a3c 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -1,12 +1,13 @@
 * xref:installation/installation.adoc[Installation]
-** xref:installation/minikube.adoc[Minikube]
-** xref:installation/crc.adoc[Red Hat CodeReady Containers (CRC)]
-** xref:installation/digitalocean.adoc[DigitalOcean Kubernetes Cluster]
-** xref:installation/gke.adoc[Google Kubernetes Engine (GKE)]
-** xref:installation/openshift.adoc[OpenShift]
-** xref:installation/iks.adoc[IBM Kubernetes Service (IKS)]
-** xref:installation/k3s.adoc[K3s]
-** xref:installation/kind.adoc[Kind]
+** Kubernetes Platform
+*** xref:installation/platform/minikube.adoc[Minikube]
+*** xref:installation/platform/crc.adoc[CRC]
+*** xref:installation/platform/digitalocean.adoc[DigitalOcean]
+*** xref:installation/platform/gke.adoc[GKE]
+*** xref:installation/platform/openshift.adoc[OpenShift]
+*** xref:installation/platform/iks.adoc[IKS]
+*** xref:installation/platform/k3s.adoc[K3s]
+*** xref:installation/platform/kind.adoc[Kind]
 ** xref:installation/registry/registry.adoc[Configuring Registry]
 *** xref:installation/registry/digitalocean.adoc[DigitalOcean]
 *** xref:installation/registry/dockerhub.adoc[Docker Hub]
@@ -14,13 +15,16 @@
 *** xref:installation/registry/gcr.adoc[Gcr.io]
 *** xref:installation/registry/icr.adoc[IBM Container Registry]
 *** xref:installation/registry/k3s.adoc[K3s]
-** xref:installation/scheduling.adoc[Pod scheduling]
-* xref:running/running.adoc[Running]
-** xref:running/dev-mode.adoc[Dev Mode]
-** xref:running/run-from-github.adoc[Run from GitHub]
-* xref:tutorials/tutorials.adoc[Tutorials]
-* xref:cli/cli.adoc[CLI]
+** Advanced
+*** xref:installation/advanced/resources.adoc[Resource management]
+*** xref:architecture/advanced/multi.adoc[Multiple Operators]
+* Command Line Interface
+** xref:cli/cli.adoc[Kamel CLI]
 ** xref:cli/modeline.adoc[Modeline]
+* xref:running/running.adoc[Run an Integration]
+** xref:running/dev-mode.adoc[Developer mode]
+** xref:running/run-from-github.adoc[Run from GitHub]
+** xref:tutorials/tutorials.adoc[Examples]
 * xref:configuration/configuration.adoc[Configuration]
 ** xref:configuration/build-time-properties.adoc[Build time properties]
 ** xref:configuration/components.adoc[Components]
diff --git a/docs/modules/ROOT/pages/cli/cli.adoc b/docs/modules/ROOT/pages/cli/cli.adoc
index 08668d0f2..c21e7442b 100644
--- a/docs/modules/ROOT/pages/cli/cli.adoc
+++ b/docs/modules/ROOT/pages/cli/cli.adoc
@@ -1,6 +1,6 @@
 = Camel K CLI (kamel)
 
-The Camel K command line interface (kamel) is the main entry point for running integrations on a Kubernetes cluster.
+The Camel K command line interface, `kamel`, is the main entry point for running integrations on a Kubernetes cluster.
 
 Releases of the Camel K CLI are available on:
 
diff --git a/docs/modules/ROOT/pages/architecture/advanced.adoc b/docs/modules/ROOT/pages/installation/advanced/multi.adoc
similarity index 93%
rename from docs/modules/ROOT/pages/architecture/advanced.adoc
rename to docs/modules/ROOT/pages/installation/advanced/multi.adoc
index 8734675b4..007574832 100644
--- a/docs/modules/ROOT/pages/architecture/advanced.adoc
+++ b/docs/modules/ROOT/pages/installation/advanced/multi.adoc
@@ -1,10 +1,3 @@
-[[advanced-installation]]
-= Advanced Installation
-
-This section provides information about special installation modes for the Camel K operator.
-These are advanced configuration options that normally are not needed by Camel K users,
- but they may be useful for particular use cases.
-
 [[advanced-installation-multiple-operators]]
 == Multiple Operators and Selective Upgrades
 
diff --git a/docs/modules/ROOT/pages/installation/scheduling.adoc b/docs/modules/ROOT/pages/installation/advanced/resources.adoc
similarity index 97%
rename from docs/modules/ROOT/pages/installation/scheduling.adoc
rename to docs/modules/ROOT/pages/installation/advanced/resources.adoc
index a28858453..47b72fee8 100644
--- a/docs/modules/ROOT/pages/installation/scheduling.adoc
+++ b/docs/modules/ROOT/pages/installation/advanced/resources.adoc
@@ -1,5 +1,5 @@
 [[scheduling-infra-pod]]
-= Scheduling infrastructure Pods and Resource managment
+= Infrastructure Pods and Resource managment
 
 During the installation procedure you will be able to provide information on how to best "operationalize" your infrastructure. Through the configuration of `--node-selector`, `--toleration` and `--operator-resources` you will be able to drive the operator `Pods` scheduling and to be able to assign resources.
 
diff --git a/docs/modules/ROOT/pages/installation/installation.adoc b/docs/modules/ROOT/pages/installation/installation.adoc
index 03c669c20..e033ed52e 100644
--- a/docs/modules/ROOT/pages/installation/installation.adoc
+++ b/docs/modules/ROOT/pages/installation/installation.adoc
@@ -51,3 +51,8 @@ You're now ready to xref:running/running.adoc[run some integrations].
 
 Camel K is also available in Helm Hub for installation.
 Follow the instructions on the https://hub.helm.sh/charts/camel-k/camel-k[Camel K] page for more information.
+
+[[advanced]]
+== Advanced configuration
+
+Camel K installation can be configured with certain special settings available for experienced users. You can manage resources such as limiting memory and CPU, provide a policy for `Pod` scheduling and `Toleration`. You can also configure the application to run multiple operators on the same namespace. Have a look at the "advanced" section under the "installation" menu.
diff --git a/docs/modules/ROOT/pages/installation/crc.adoc b/docs/modules/ROOT/pages/installation/platform/crc.adoc
similarity index 100%
rename from docs/modules/ROOT/pages/installation/crc.adoc
rename to docs/modules/ROOT/pages/installation/platform/crc.adoc
diff --git a/docs/modules/ROOT/pages/installation/digitalocean.adoc b/docs/modules/ROOT/pages/installation/platform/digitalocean.adoc
similarity index 100%
rename from docs/modules/ROOT/pages/installation/digitalocean.adoc
rename to docs/modules/ROOT/pages/installation/platform/digitalocean.adoc
diff --git a/docs/modules/ROOT/pages/installation/gke.adoc b/docs/modules/ROOT/pages/installation/platform/gke.adoc
similarity index 100%
rename from docs/modules/ROOT/pages/installation/gke.adoc
rename to docs/modules/ROOT/pages/installation/platform/gke.adoc
diff --git a/docs/modules/ROOT/pages/installation/iks.adoc b/docs/modules/ROOT/pages/installation/platform/iks.adoc
similarity index 100%
rename from docs/modules/ROOT/pages/installation/iks.adoc
rename to docs/modules/ROOT/pages/installation/platform/iks.adoc
diff --git a/docs/modules/ROOT/pages/installation/k3s.adoc b/docs/modules/ROOT/pages/installation/platform/k3s.adoc
similarity index 100%
rename from docs/modules/ROOT/pages/installation/k3s.adoc
rename to docs/modules/ROOT/pages/installation/platform/k3s.adoc
diff --git a/docs/modules/ROOT/pages/installation/kind.adoc b/docs/modules/ROOT/pages/installation/platform/kind.adoc
similarity index 100%
rename from docs/modules/ROOT/pages/installation/kind.adoc
rename to docs/modules/ROOT/pages/installation/platform/kind.adoc
diff --git a/docs/modules/ROOT/pages/installation/minikube.adoc b/docs/modules/ROOT/pages/installation/platform/minikube.adoc
similarity index 100%
rename from docs/modules/ROOT/pages/installation/minikube.adoc
rename to docs/modules/ROOT/pages/installation/platform/minikube.adoc
diff --git a/docs/modules/ROOT/pages/installation/openshift.adoc b/docs/modules/ROOT/pages/installation/platform/openshift.adoc
similarity index 100%
rename from docs/modules/ROOT/pages/installation/openshift.adoc
rename to docs/modules/ROOT/pages/installation/platform/openshift.adoc
diff --git a/docs/modules/ROOT/pages/running/dev-mode.adoc b/docs/modules/ROOT/pages/running/dev-mode.adoc
index 023652e54..7f266f730 100644
--- a/docs/modules/ROOT/pages/running/dev-mode.adoc
+++ b/docs/modules/ROOT/pages/running/dev-mode.adoc
@@ -1,5 +1,5 @@
 [[dev-mode]]
-= Running in Dev Mode
+= Running an Integration in Dev Mode
 
 Camel K provides a specific flag for quickly iterating on integrations during development and have fast feedbacks on the code you're writing.
 It's called *dev mode*.
diff --git a/docs/modules/ROOT/pages/running/run-from-github.adoc b/docs/modules/ROOT/pages/running/run-from-github.adoc
index cce64a761..2cc744996 100644
--- a/docs/modules/ROOT/pages/running/run-from-github.adoc
+++ b/docs/modules/ROOT/pages/running/run-from-github.adoc
@@ -1,9 +1,9 @@
 [[run-from-github]]
-= Run from GitHub
+= Run an Integration from GitHub
 
 It is possible to run integrations from a GitHub repository or Gist with dedicated URL syntax:
 
-== Repository
+== Integration code stored in a Github repository
 
 .Syntax
 [source]
@@ -30,7 +30,7 @@ but does not require to type the full GitHub RAW URL.
 
 Declaring the branch query param is not required and defaults to `master` if not explicit set.
 
-== Gist
+== Integration code stored in a Gist
 
 .Syntax
 [source]
@@ -39,7 +39,7 @@ kamel run https://gist.github.com/${user-id}/${gist-id}
 kamel run gist:${gist-id}
 ----
 
-camel-k will add any file that is part of the Gist as a source.
+Camel k will add any file that is part of the Gist as a source.
 
 As example, assuming there are two files listed as part of a Gist, beans.yaml and routes.yaml, then the following command
 
diff --git a/docs/modules/ROOT/pages/running/running.adoc b/docs/modules/ROOT/pages/running/running.adoc
index 31287f9d9..93f655f1b 100644
--- a/docs/modules/ROOT/pages/running/running.adoc
+++ b/docs/modules/ROOT/pages/running/running.adoc
@@ -1,8 +1,8 @@
-[[running]]
-= Running
+[[running-integration]]
+= Running an Integration
 
 After completing the xref:installation/installation.adoc[installation] you should be connected to a Kubernetes/OpenShift cluster
-and have the "kamel" CLI correctly configured.
+and have the `kamel` CLI correctly configured.
 
 Ensure you're connected to the cluster by executing a simple command using the Kubernetes CLI:
 
@@ -28,15 +28,31 @@ You can run it on the cluster by executing:
 kamel run hello.groovy
 ```
 
-Integrations can be written in multiple languages. We provide an archive with common examples in the https://github.com/apache/camel-k/releases[release page].
+Integrations can be written in multiple languages. We are collecting examples in our https://github.com/apache/camel-k/[Github repository].
 
-You can change the content of the `hello.groovy` file and execute the command again to see the changes, or use the xref:running/dev-mode.adoc[dev mode] to have even quicker turnaround times.
-
-== Monitoring the Status
+[[monitoring-integration]]
+== Monitoring the application status
 
 Camel K integrations follow a lifecycle composed of several steps before getting into the `Running` state.
+
 You can check the status of all integrations by executing the following command:
 
 ```
 kamel get
 ```
+
+[[logging-integration]]
+== Log the standard output
+
+Camel K integrations follow a lifecycle composed of several steps before getting into the `Running` state.
+
+You can check the status of all integrations by executing the following command:
+
+```
+kamel logs hello
+```
+
+[[dev-mode-integration]]
+== Running an Integration in Development mode
+
+Camel K provide a very nice **dev mode** feature that will allow you to apply any change to your Integration code reactively. Check out the xref:running/dev-mode.adoc[Camel K dev mode]
\ No newline at end of file
diff --git a/pkg/builder/image.go b/pkg/builder/image.go
index 68ee0eb77..3a200beff 100644
--- a/pkg/builder/image.go
+++ b/pkg/builder/image.go
@@ -87,7 +87,7 @@ func executableDockerfile(ctx *builderContext) error {
 		USER nonroot
 	`)
 
-	err := ioutil.WriteFile(path.Join(ctx.Path, ContextDir, "Dockerfile"), dockerfile, 0o777)
+	err := ioutil.WriteFile(path.Join(ctx.Path, ContextDir, "Dockerfile"), dockerfile, 0o400)
 	if err != nil {
 		return err
 	}
@@ -111,7 +111,7 @@ func jvmDockerfile(ctx *builderContext) error {
 		USER 1000
 	`)
 
-	err := ioutil.WriteFile(path.Join(ctx.Path, ContextDir, "Dockerfile"), dockerfile, 0o777)
+	err := ioutil.WriteFile(path.Join(ctx.Path, ContextDir, "Dockerfile"), dockerfile, 0o400)
 	if err != nil {
 		return err
 	}
@@ -161,7 +161,7 @@ func imageContext(ctx *builderContext, selector artifactsSelector) error {
 
 	contextDir := path.Join(ctx.Path, ContextDir)
 
-	err = os.MkdirAll(contextDir, 0o777)
+	err = os.MkdirAll(contextDir, 0o700)
 	if err != nil {
 		return err
 	}
@@ -175,7 +175,8 @@ func imageContext(ctx *builderContext, selector artifactsSelector) error {
 
 	for _, entry := range ctx.Resources {
 		filePath, fileName := path.Split(entry.Target)
-		if err := util.WriteFileWithContent(path.Join(contextDir, filePath), fileName, entry.Content); err != nil {
+		fullPath := path.Join(contextDir, filePath, fileName)
+		if err := util.WriteFileWithContent(fullPath, entry.Content); err != nil {
 			return err
 		}
 	}
diff --git a/pkg/builder/project.go b/pkg/builder/project.go
index dbe8a076e..609769dda 100644
--- a/pkg/builder/project.go
+++ b/pkg/builder/project.go
@@ -65,7 +65,7 @@ func cleanUpBuildDir(ctx *builderContext) error {
 		return err
 	}
 
-	return os.MkdirAll(ctx.Build.BuildDir, 0o777)
+	return os.MkdirAll(ctx.Build.BuildDir, 0o700)
 }
 
 func generateJavaKeystore(ctx *builderContext) error {
diff --git a/pkg/builder/s2i.go b/pkg/builder/s2i.go
index 00a6fdf3f..2f7f4882e 100644
--- a/pkg/builder/s2i.go
+++ b/pkg/builder/s2i.go
@@ -30,6 +30,8 @@ import (
 	"strings"
 	"time"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	"github.com/pkg/errors"
 
 	corev1 "k8s.io/api/core/v1"
@@ -171,7 +173,7 @@ func (t *s2iTask) Do(ctx context.Context) v1.BuildStatus {
 		return status.Failed(errors.Wrap(err, "cannot tar context directory"))
 	}
 
-	resource, err := ioutil.ReadFile(archive)
+	resource, err := util.ReadFile(archive)
 	if err != nil {
 		return status.Failed(errors.Wrap(err, "cannot read tar file "+archive))
 	}
@@ -321,7 +323,7 @@ func tarDir(src string, writers ...io.Writer) error {
 			return err
 		}
 
-		f, err := os.Open(file)
+		f, err := util.Open(file)
 		if err != nil {
 			return err
 		}
@@ -332,8 +334,6 @@ func tarDir(src string, writers ...io.Writer) error {
 
 		// manually close here after each file operation; deferring would cause each file close
 		// to wait until all operations have completed.
-		f.Close()
-
-		return nil
+		return f.Close()
 	})
 }
diff --git a/pkg/builder/spectrum.go b/pkg/builder/spectrum.go
index 95d3fa98b..a7c149ec1 100644
--- a/pkg/builder/spectrum.go
+++ b/pkg/builder/spectrum.go
@@ -20,12 +20,15 @@ package builder
 import (
 	"bufio"
 	"context"
+	"io"
 	"io/ioutil"
 	"os"
 	"path"
 	"path/filepath"
 	"strings"
 
+	"go.uber.org/multierr"
+
 	spectrum "github.com/container-tools/spectrum/pkg/builder"
 
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -104,6 +107,7 @@ func (t *spectrumTask) Do(ctx context.Context) v1.BuildStatus {
 	}
 
 	newStdR, newStdW, pipeErr := os.Pipe()
+	// #nosec G307
 	defer newStdW.Close()
 
 	if pipeErr != nil {
@@ -136,7 +140,7 @@ func (t *spectrumTask) Do(ctx context.Context) v1.BuildStatus {
 	return status
 }
 
-func readSpectrumLogs(newStdOut *os.File) {
+func readSpectrumLogs(newStdOut io.Reader) {
 	scanner := bufio.NewScanner(newStdOut)
 
 	for scanner.Scan() {
@@ -153,13 +157,17 @@ func mountSecret(ctx context.Context, c client.Client, namespace, name string) (
 
 	secret, err := c.CoreV1().Secrets(namespace).Get(ctx, name, metav1.GetOptions{})
 	if err != nil {
-		os.RemoveAll(dir)
+		if removeErr := os.RemoveAll(dir); removeErr != nil {
+			err = multierr.Append(err, removeErr)
+		}
 		return "", err
 	}
 
 	for file, content := range secret.Data {
 		if err := ioutil.WriteFile(filepath.Join(dir, remap(file)), content, 0o600); err != nil {
-			os.RemoveAll(dir)
+			if removeErr := os.RemoveAll(dir); removeErr != nil {
+				err = multierr.Append(err, removeErr)
+			}
 			return "", err
 		}
 	}
diff --git a/pkg/client/client.go b/pkg/client/client.go
index f38f43a61..3d34f1ee0 100644
--- a/pkg/client/client.go
+++ b/pkg/client/client.go
@@ -23,6 +23,8 @@ import (
 	"os"
 	"path/filepath"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	camelv1 "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1"
 	camelv1alpha1 "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1"
 	user "github.com/mitchellh/go-homedir"
@@ -197,7 +199,10 @@ func initialize(kubeconfig string) {
 			panic(err)
 		}
 	}
-	os.Setenv(kubeConfigEnvVar, kubeconfig)
+
+	if err := os.Setenv(kubeConfigEnvVar, kubeconfig); err != nil {
+		panic(err)
+	}
 }
 
 func getDefaultKubeConfigFile() (string, error) {
@@ -231,7 +236,7 @@ func GetCurrentNamespace(kubeconfig string) (string, error) {
 		return "default", nil
 	}
 
-	data, err := ioutil.ReadFile(kubeconfig)
+	data, err := util.ReadFile(kubeconfig)
 	if err != nil {
 		return "", err
 	}
diff --git a/pkg/cmd/bind.go b/pkg/cmd/bind.go
index 0a1b36e77..355f00d68 100644
--- a/pkg/cmd/bind.go
+++ b/pkg/cmd/bind.go
@@ -220,7 +220,7 @@ func (o *bindCmdOptions) run(cmd *cobra.Command, args []string) error {
 	return nil
 }
 
-func showOutput(cmd *cobra.Command, binding *v1alpha1.KameletBinding, outputFormat string, scheme *runtime.Scheme) error {
+func showOutput(cmd *cobra.Command, binding *v1alpha1.KameletBinding, outputFormat string, scheme runtime.ObjectTyper) error {
 	printer := printers.NewTypeSetter(scheme)
 	printer.Delegate = &kubernetes.CLIPrinter{
 		Format: outputFormat,
diff --git a/pkg/cmd/builder/builder.go b/pkg/cmd/builder/builder.go
index 5b23e2d5d..73447c469 100644
--- a/pkg/cmd/builder/builder.go
+++ b/pkg/cmd/builder/builder.go
@@ -107,6 +107,7 @@ func exitOnError(err error, msg string) {
 }
 
 func writeTerminationMessage(message string) {
+	// #nosec G306
 	err := ioutil.WriteFile(terminationMessagePath, []byte(message), 0o644)
 	if err != nil {
 		log.Error(err, "cannot write termination message")
diff --git a/pkg/cmd/debug.go b/pkg/cmd/debug.go
index fd3c3a7b9..e0702c40a 100644
--- a/pkg/cmd/debug.go
+++ b/pkg/cmd/debug.go
@@ -132,7 +132,7 @@ func (o *debugCmdOptions) run(cmd *cobra.Command, args []string) error {
 }
 
 // nolint: unparam
-func (o *debugCmdOptions) toggleDebug(c *camelv1.CamelV1Client, it *v1.Integration, active bool) (*v1.Integration, error) {
+func (o *debugCmdOptions) toggleDebug(c camelv1.IntegrationsGetter, it *v1.Integration, active bool) (*v1.Integration, error) {
 	if it.Spec.Traits == nil {
 		it.Spec.Traits = make(map[string]v1.TraitSpec)
 	}
diff --git a/pkg/cmd/dump.go b/pkg/cmd/dump.go
index 9ffba00e7..c0d8f4ed3 100644
--- a/pkg/cmd/dump.go
+++ b/pkg/cmd/dump.go
@@ -24,6 +24,8 @@ import (
 	"io"
 	"os"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	"github.com/spf13/cobra"
 	v1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -54,29 +56,21 @@ type dumpCmdOptions struct {
 	LogLines int `mapstructure:"logLines"`
 }
 
-func (o *dumpCmdOptions) dump(cmd *cobra.Command, args []string) error {
+func (o *dumpCmdOptions) dump(cmd *cobra.Command, args []string) (err error) {
 	c, err := o.GetCmdClient()
 	if err != nil {
-		return err
+		return
 	}
+
 	if len(args) == 1 {
-		fileName := args[0]
-		writer, err := os.OpenFile(fileName, os.O_RDWR|os.O_CREATE, 0o777)
-		if err != nil {
-			return err
-		}
-		err = dumpNamespace(o.Context, c, o.Namespace, writer, o.LogLines)
-		if err != nil {
-			return err
-		}
-		defer writer.Close()
+		err = util.WithFile(args[0], os.O_RDWR|os.O_CREATE, 0o644, func(file *os.File) error {
+			return dumpNamespace(o.Context, c, o.Namespace, file, o.LogLines)
+		})
 	} else {
-		err := dumpNamespace(o.Context, c, o.Namespace, cmd.OutOrStdout(), o.LogLines)
-		if err != nil {
-			return err
-		}
+		err = dumpNamespace(o.Context, c, o.Namespace, cmd.OutOrStdout(), o.LogLines)
 	}
-	return nil
+
+	return
 }
 
 func dumpNamespace(ctx context.Context, c client.Client, ns string, out io.Writer, logLines int) error {
diff --git a/pkg/cmd/get.go b/pkg/cmd/get.go
index 8d963edba..7898ba887 100644
--- a/pkg/cmd/get.go
+++ b/pkg/cmd/get.go
@@ -88,7 +88,6 @@ func (o *getCmdOptions) run(cmd *cobra.Command, args []string) error {
 		}
 		fmt.Fprintf(w, "%s\t%s\t%s\n", integration.Name, string(integration.Status.Phase), kit)
 	}
-	w.Flush()
 
-	return nil
+	return w.Flush()
 }
diff --git a/pkg/cmd/init.go b/pkg/cmd/init.go
index 7c48947fd..0a2f06c07 100644
--- a/pkg/cmd/init.go
+++ b/pkg/cmd/init.go
@@ -24,6 +24,8 @@ import (
 	"strings"
 	"text/template"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/pkg/resources"
 	"github.com/spf13/cobra"
@@ -98,13 +100,10 @@ func (o *initCmdOptions) writeFromTemplate(language v1.Language, fileName string
 	if err != nil {
 		return err
 	}
-	out, err := os.OpenFile(fileName, os.O_RDWR|os.O_CREATE, 0o777)
-	if err != nil {
-		return err
-	}
-	defer out.Close()
 
-	return tmpl.Execute(out, params)
+	return util.WithFile(fileName, os.O_RDWR|os.O_CREATE, 0o644, func(file *os.File) error {
+		return tmpl.Execute(file, params)
+	})
 }
 
 func (o *initCmdOptions) extractLanguage(fileName string) *v1.Language {
diff --git a/pkg/cmd/kamelet_get.go b/pkg/cmd/kamelet_get.go
index d08234159..5fb19f0ae 100644
--- a/pkg/cmd/kamelet_get.go
+++ b/pkg/cmd/kamelet_get.go
@@ -133,7 +133,6 @@ func (command *kameletGetCommandOptions) run(cmd *cobra.Command) error {
 			readOnly,
 			kl.Spec.Definition.Title)
 	}
-	w.Flush()
 
-	return nil
+	return w.Flush()
 }
diff --git a/pkg/cmd/kit_get.go b/pkg/cmd/kit_get.go
index b3063cf22..ac6788223 100644
--- a/pkg/cmd/kit_get.go
+++ b/pkg/cmd/kit_get.go
@@ -90,7 +90,6 @@ func (command *kitGetCommandOptions) run(cmd *cobra.Command) error {
 			fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", ctx.Name, string(ctx.Status.Phase), t, ctx.Status.Image)
 		}
 	}
-	w.Flush()
 
-	return nil
+	return w.Flush()
 }
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 1d9063ef0..261c5305c 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -21,7 +21,6 @@ import (
 	"context"
 	"encoding/json"
 	"fmt"
-	"io/ioutil"
 	"os"
 	"os/signal"
 	"path"
@@ -754,7 +753,7 @@ func (o *runCmdOptions) configureTraits(integration *v1.Integration, options []s
 }
 
 func loadPropertyFile(fileName string) (*properties.Properties, error) {
-	file, err := ioutil.ReadFile(fileName)
+	file, err := util.ReadFile(fileName)
 	if err != nil {
 		return nil, err
 	}
diff --git a/pkg/cmd/uninstall.go b/pkg/cmd/uninstall.go
index 43fbff444..2cc76d95b 100644
--- a/pkg/cmd/uninstall.go
+++ b/pkg/cmd/uninstall.go
@@ -359,12 +359,11 @@ func (o *uninstallCmdOptions) removeSubjectFromClusterRoleBindings(ctx context.C
 	}
 
 	// Remove the subject corresponding to this operator install
-	for _, clusterRoleBinding := range clusterRoleBindings.Items {
+	for crbIndex, clusterRoleBinding := range clusterRoleBindings.Items {
 		for i, subject := range clusterRoleBinding.Subjects {
 			if subject.Name == "camel-k-operator" && subject.Namespace == namespace {
 				clusterRoleBinding.Subjects = append(clusterRoleBinding.Subjects[:i], clusterRoleBinding.Subjects[i+1:]...)
-				crb := &clusterRoleBinding
-				_, err = api.ClusterRoleBindings().Update(ctx, crb, metav1.UpdateOptions{})
+				_, err = api.ClusterRoleBindings().Update(ctx, &clusterRoleBindings.Items[crbIndex], metav1.UpdateOptions{})
 				if err != nil {
 					return err
 				}
@@ -470,10 +469,10 @@ func (o *uninstallCmdOptions) uninstallKamelets(ctx context.Context, c client.Cl
 		return err
 	}
 
-	for _, kamelet := range kameletList.Items {
+	for i := range kameletList.Items {
 		// remove only platform Kamelets (use-defined Kamelets should be skipped)
-		if kamelet.Labels[v1alpha1.KameletBundledLabel] == "true" {
-			err := c.Delete(ctx, &kamelet)
+		if kameletList.Items[i].Labels[v1alpha1.KameletBundledLabel] == "true" {
+			err := c.Delete(ctx, &kameletList.Items[i])
 			if err != nil {
 				return err
 			}
diff --git a/pkg/cmd/util_config.go b/pkg/cmd/util_config.go
index 72a35c265..9c4239eb9 100644
--- a/pkg/cmd/util_config.go
+++ b/pkg/cmd/util_config.go
@@ -139,7 +139,7 @@ func (cfg *Config) Delete(path string) {
 func (cfg *Config) Save() error {
 	root := filepath.Dir(cfg.location)
 	if _, err := os.Stat(root); os.IsNotExist(err) {
-		if e := os.MkdirAll(root, 0o700); e != nil {
+		if e := os.MkdirAll(root, 0o600); e != nil {
 			return e
 		}
 	}
@@ -148,7 +148,7 @@ func (cfg *Config) Save() error {
 	if err != nil {
 		return err
 	}
-	return ioutil.WriteFile(cfg.location, data, 0o644)
+	return ioutil.WriteFile(cfg.location, data, 0o600)
 }
 
 func (cfg *Config) navigate(values map[string]interface{}, prefix string, create bool) map[string]interface{} {
diff --git a/pkg/cmd/util_content.go b/pkg/cmd/util_content.go
index 84edd4c19..289621e73 100644
--- a/pkg/cmd/util_content.go
+++ b/pkg/cmd/util_content.go
@@ -25,6 +25,8 @@ import (
 	"os"
 	"regexp"
 	"strings"
+
+	"github.com/apache/camel-k/pkg/util"
 )
 
 const (
@@ -50,7 +52,7 @@ func loadRawContent(source string) ([]byte, string, error) {
 	}
 
 	if ok {
-		content, err = ioutil.ReadFile(source)
+		content, err = util.ReadFile(source)
 	} else {
 		var u *url.URL
 		u, err = url.Parse(source)
@@ -98,7 +100,7 @@ func loadTextContent(source string, base64Compression bool) (string, string, boo
 	return string(content), contentType, false, nil
 }
 
-func loadContentHTTP(u *url.URL) ([]byte, error) {
+func loadContentHTTP(u fmt.Stringer) ([]byte, error) {
 	resp, err := http.Get(u.String())
 	if err != nil {
 		return []byte{}, err
diff --git a/pkg/cmd/util_dependencies.go b/pkg/cmd/util_dependencies.go
index 2a54fc939..351091f68 100644
--- a/pkg/cmd/util_dependencies.go
+++ b/pkg/cmd/util_dependencies.go
@@ -394,7 +394,7 @@ func updateIntegrationProperties(properties []string, propertyFiles []string, ha
 		// Output list of properties to property file if any CLI properties were given.
 		if len(properties) > 0 {
 			propertyFilePath := path.Join(util.GetLocalPropertiesDir(), "CLI.properties")
-			err = ioutil.WriteFile(propertyFilePath, []byte(strings.Join(properties, "\n")), 0o777)
+			err = ioutil.WriteFile(propertyFilePath, []byte(strings.Join(properties, "\n")), 0o600)
 			if err != nil {
 				return nil, err
 			}
diff --git a/pkg/cmd/util_sources.go b/pkg/cmd/util_sources.go
index 3be66dead..fc9e62497 100644
--- a/pkg/cmd/util_sources.go
+++ b/pkg/cmd/util_sources.go
@@ -20,7 +20,6 @@ package cmd
 import (
 	"context"
 	"fmt"
-	"io/ioutil"
 	"net/http"
 	"net/url"
 	"os"
@@ -206,7 +205,7 @@ func ResolveLocalSource(location string, compress bool) (Source, error) {
 		Local:    true,
 	}
 
-	content, err := ioutil.ReadFile(location)
+	content, err := util.ReadFile(location)
 	if err != nil {
 		return Source{}, err
 	}
diff --git a/pkg/controller/integration/build_kit.go b/pkg/controller/integration/build_kit.go
index eb392af89..0feddc951 100644
--- a/pkg/controller/integration/build_kit.go
+++ b/pkg/controller/integration/build_kit.go
@@ -107,8 +107,9 @@ func (action *buildKitAction) Handle(ctx context.Context, integration *v1.Integr
 kits:
 	for _, kit := range env.IntegrationKits {
 		kit := kit
-		for i, k := range existingKits {
-			match, err := kitMatches(&kit, &k)
+		for i := range existingKits {
+			k := &existingKits[i]
+			match, err := kitMatches(&kit, k)
 			if err != nil {
 				return nil, err
 			}
@@ -116,7 +117,7 @@ kits:
 				if integrationKit == nil ||
 					integrationKit.Status.Phase != v1.IntegrationKitPhaseReady && k.Status.Phase == v1.IntegrationKitPhaseReady ||
 					integrationKit.Status.Phase == v1.IntegrationKitPhaseReady && k.Status.Phase == v1.IntegrationKitPhaseReady && k.HasHigherPriorityThan(integrationKit) {
-					integrationKit = &existingKits[i]
+					integrationKit = k
 				}
 
 				continue kits
diff --git a/pkg/controller/integration/integration_controller.go b/pkg/controller/integration/integration_controller.go
index bfd7fbe57..342db8caa 100644
--- a/pkg/controller/integration/integration_controller.go
+++ b/pkg/controller/integration/integration_controller.go
@@ -139,8 +139,9 @@ func add(mgr manager.Manager, c client.Client, r reconcile.Reconciler) error {
 					return requests
 				}
 
-				for _, integration := range list.Items {
-					if match, err := integrationMatches(&integration, kit); err != nil {
+				for i := range list.Items {
+					integration := &list.Items[i]
+					if match, err := integrationMatches(integration, kit); err != nil {
 						log.Errorf(err, "Error matching integration %q with kit %q", integration.Name, kit.Name)
 
 						continue
diff --git a/pkg/controller/integration/kits.go b/pkg/controller/integration/kits.go
index f28723ddb..f31fabf8e 100644
--- a/pkg/controller/integration/kits.go
+++ b/pkg/controller/integration/kits.go
@@ -67,14 +67,15 @@ func lookupKitsForIntegration(ctx context.Context, c ctrl.Reader, integration *v
 	}
 
 	kits := make([]v1.IntegrationKit, 0)
-	for _, kit := range list.Items {
-		match, err := integrationMatches(integration, &kit)
+	for i := range list.Items {
+		kit := &list.Items[i]
+		match, err := integrationMatches(integration, kit)
 		if err != nil {
 			return nil, err
 		} else if !match {
 			continue
 		}
-		kits = append(kits, kit)
+		kits = append(kits, *kit)
 	}
 
 	return kits, nil
diff --git a/pkg/controller/integration/monitor.go b/pkg/controller/integration/monitor.go
index 2c59130a5..492cb97ab 100644
--- a/pkg/controller/integration/monitor.go
+++ b/pkg/controller/integration/monitor.go
@@ -369,16 +369,17 @@ func (action *monitorAction) updateIntegrationPhaseAndReadyCondition(ctx context
 	// Finally, call the readiness probes of the non-ready Pods directly,
 	// to retrieve insights from the Camel runtime.
 	var runtimeNotReadyMessages []string
-	for _, pod := range unreadyPods {
-		if ready := kubernetes.GetPodCondition(pod, corev1.PodReady); ready.Reason != "ContainersNotReady" {
+	for i := range unreadyPods {
+		pod := &unreadyPods[i]
+		if ready := kubernetes.GetPodCondition(*pod, corev1.PodReady); ready.Reason != "ContainersNotReady" {
 			continue
 		}
-		container := getIntegrationContainer(environment, &pod)
+		container := getIntegrationContainer(environment, pod)
 		if container == nil {
 			return fmt.Errorf("integration container not found in Pod %s/%s", pod.Namespace, pod.Name)
 		}
 		if probe := container.ReadinessProbe; probe != nil && probe.HTTPGet != nil {
-			body, err := proxyGetHTTPProbe(ctx, action.client, probe, &pod, container)
+			body, err := proxyGetHTTPProbe(ctx, action.client, probe, pod, container)
 			if err == nil {
 				continue
 			}
diff --git a/pkg/event/manager.go b/pkg/event/manager.go
index 19d1861e5..0f03c5bc7 100644
--- a/pkg/event/manager.go
+++ b/pkg/event/manager.go
@@ -82,10 +82,10 @@ const (
 )
 
 // NotifyIntegrationError automatically generates error events when the integration reconcile cycle phase has an error
-func NotifyIntegrationError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1.Integration, err error) {
+func NotifyIntegrationError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1.Integration, err error) {
 	it := old
-	if new != nil {
-		it = new
+	if newResource != nil {
+		it = newResource
 	}
 	if it == nil {
 		return
@@ -94,8 +94,8 @@ func NotifyIntegrationError(ctx context.Context, c client.Client, recorder recor
 }
 
 // NotifyIntegrationUpdated automatically generates events when the integration changes
-func NotifyIntegrationUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1.Integration) {
-	if new == nil {
+func NotifyIntegrationUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1.Integration) {
+	if newResource == nil {
 		return
 	}
 	oldPhase := ""
@@ -104,15 +104,15 @@ func NotifyIntegrationUpdated(ctx context.Context, c client.Client, recorder rec
 		oldPhase = string(old.Status.Phase)
 		oldConditions = old.Status.GetConditions()
 	}
-	if new.Status.Phase != v1.IntegrationPhaseNone {
-		notifyIfConditionUpdated(recorder, new, oldConditions, new.Status.GetConditions(), "Integration", new.Name, ReasonIntegrationConditionChanged)
+	if newResource.Status.Phase != v1.IntegrationPhaseNone {
+		notifyIfConditionUpdated(recorder, newResource, oldConditions, newResource.Status.GetConditions(), "Integration", newResource.Name, ReasonIntegrationConditionChanged)
 	}
-	notifyIfPhaseUpdated(ctx, c, recorder, new, oldPhase, string(new.Status.Phase), "Integration", new.Name, ReasonIntegrationPhaseUpdated, "")
+	notifyIfPhaseUpdated(ctx, c, recorder, newResource, oldPhase, string(newResource.Status.Phase), "Integration", newResource.Name, ReasonIntegrationPhaseUpdated, "")
 }
 
 // NotifyIntegrationKitUpdated automatically generates events when an integration kit changes
-func NotifyIntegrationKitUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1.IntegrationKit) {
-	if new == nil {
+func NotifyIntegrationKitUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1.IntegrationKit) {
+	if newResource == nil {
 		return
 	}
 	oldPhase := ""
@@ -121,17 +121,17 @@ func NotifyIntegrationKitUpdated(ctx context.Context, c client.Client, recorder
 		oldPhase = string(old.Status.Phase)
 		oldConditions = old.Status.GetConditions()
 	}
-	if new.Status.Phase != v1.IntegrationKitPhaseNone {
-		notifyIfConditionUpdated(recorder, new, oldConditions, new.Status.GetConditions(), "Integration Kit", new.Name, ReasonIntegrationKitConditionChanged)
+	if newResource.Status.Phase != v1.IntegrationKitPhaseNone {
+		notifyIfConditionUpdated(recorder, newResource, oldConditions, newResource.Status.GetConditions(), "Integration Kit", newResource.Name, ReasonIntegrationKitConditionChanged)
 	}
-	notifyIfPhaseUpdated(ctx, c, recorder, new, oldPhase, string(new.Status.Phase), "Integration Kit", new.Name, ReasonIntegrationKitPhaseUpdated, "")
+	notifyIfPhaseUpdated(ctx, c, recorder, newResource, oldPhase, string(newResource.Status.Phase), "Integration Kit", newResource.Name, ReasonIntegrationKitPhaseUpdated, "")
 }
 
 // NotifyIntegrationKitError automatically generates error events when the integration kit reconcile cycle phase has an error
-func NotifyIntegrationKitError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1.IntegrationKit, err error) {
+func NotifyIntegrationKitError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1.IntegrationKit, err error) {
 	kit := old
-	if new != nil {
-		kit = new
+	if newResource != nil {
+		kit = newResource
 	}
 	if kit == nil {
 		return
@@ -140,8 +140,8 @@ func NotifyIntegrationKitError(ctx context.Context, c client.Client, recorder re
 }
 
 // NotifyIntegrationPlatformUpdated automatically generates events when an integration platform changes
-func NotifyIntegrationPlatformUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1.IntegrationPlatform) {
-	if new == nil {
+func NotifyIntegrationPlatformUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1.IntegrationPlatform) {
+	if newResource == nil {
 		return
 	}
 	oldPhase := ""
@@ -150,17 +150,17 @@ func NotifyIntegrationPlatformUpdated(ctx context.Context, c client.Client, reco
 		oldPhase = string(old.Status.Phase)
 		oldConditions = old.Status.GetConditions()
 	}
-	if new.Status.Phase != v1.IntegrationPlatformPhaseNone {
-		notifyIfConditionUpdated(recorder, new, oldConditions, new.Status.GetConditions(), "Integration Platform", new.Name, ReasonIntegrationPlatformConditionChanged)
+	if newResource.Status.Phase != v1.IntegrationPlatformPhaseNone {
+		notifyIfConditionUpdated(recorder, newResource, oldConditions, newResource.Status.GetConditions(), "Integration Platform", newResource.Name, ReasonIntegrationPlatformConditionChanged)
 	}
-	notifyIfPhaseUpdated(ctx, c, recorder, new, oldPhase, string(new.Status.Phase), "Integration Platform", new.Name, ReasonIntegrationPlatformPhaseUpdated, "")
+	notifyIfPhaseUpdated(ctx, c, recorder, newResource, oldPhase, string(newResource.Status.Phase), "Integration Platform", newResource.Name, ReasonIntegrationPlatformPhaseUpdated, "")
 }
 
 // NotifyIntegrationPlatformError automatically generates error events when the integration Platform reconcile cycle phase has an error
-func NotifyIntegrationPlatformError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1.IntegrationPlatform, err error) {
+func NotifyIntegrationPlatformError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1.IntegrationPlatform, err error) {
 	p := old
-	if new != nil {
-		p = new
+	if newResource != nil {
+		p = newResource
 	}
 	if p == nil {
 		return
@@ -169,8 +169,8 @@ func NotifyIntegrationPlatformError(ctx context.Context, c client.Client, record
 }
 
 // NotifyKameletUpdated automatically generates events when a Kamelet changes
-func NotifyKameletUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1alpha1.Kamelet) {
-	if new == nil {
+func NotifyKameletUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1alpha1.Kamelet) {
+	if newResource == nil {
 		return
 	}
 	oldPhase := ""
@@ -179,17 +179,17 @@ func NotifyKameletUpdated(ctx context.Context, c client.Client, recorder record.
 		oldPhase = string(old.Status.Phase)
 		oldConditions = old.Status.GetConditions()
 	}
-	if new.Status.Phase != v1alpha1.KameletPhaseNone {
-		notifyIfConditionUpdated(recorder, new, oldConditions, new.Status.GetConditions(), "Kamelet", new.Name, ReasonKameletConditionChanged)
+	if newResource.Status.Phase != v1alpha1.KameletPhaseNone {
+		notifyIfConditionUpdated(recorder, newResource, oldConditions, newResource.Status.GetConditions(), "Kamelet", newResource.Name, ReasonKameletConditionChanged)
 	}
-	notifyIfPhaseUpdated(ctx, c, recorder, new, oldPhase, string(new.Status.Phase), "Kamelet", new.Name, ReasonKameletPhaseUpdated, "")
+	notifyIfPhaseUpdated(ctx, c, recorder, newResource, oldPhase, string(newResource.Status.Phase), "Kamelet", newResource.Name, ReasonKameletPhaseUpdated, "")
 }
 
 // NotifyKameletError automatically generates error events when the kamelet reconcile cycle phase has an error
-func NotifyKameletError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1alpha1.Kamelet, err error) {
+func NotifyKameletError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1alpha1.Kamelet, err error) {
 	k := old
-	if new != nil {
-		k = new
+	if newResource != nil {
+		k = newResource
 	}
 	if k == nil {
 		return
@@ -198,8 +198,8 @@ func NotifyKameletError(ctx context.Context, c client.Client, recorder record.Ev
 }
 
 // NotifyKameletBindingUpdated automatically generates events when a KameletBinding changes
-func NotifyKameletBindingUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1alpha1.KameletBinding) {
-	if new == nil {
+func NotifyKameletBindingUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1alpha1.KameletBinding) {
+	if newResource == nil {
 		return
 	}
 	oldPhase := ""
@@ -208,17 +208,17 @@ func NotifyKameletBindingUpdated(ctx context.Context, c client.Client, recorder
 		oldPhase = string(old.Status.Phase)
 		oldConditions = old.Status.GetConditions()
 	}
-	if new.Status.Phase != v1alpha1.KameletBindingPhaseNone {
-		notifyIfConditionUpdated(recorder, new, oldConditions, new.Status.GetConditions(), "KameletBinding", new.Name, ReasonKameletBindingConditionChanged)
+	if newResource.Status.Phase != v1alpha1.KameletBindingPhaseNone {
+		notifyIfConditionUpdated(recorder, newResource, oldConditions, newResource.Status.GetConditions(), "KameletBinding", newResource.Name, ReasonKameletBindingConditionChanged)
 	}
-	notifyIfPhaseUpdated(ctx, c, recorder, new, oldPhase, string(new.Status.Phase), "KameletBinding", new.Name, ReasonKameletBindingPhaseUpdated, "")
+	notifyIfPhaseUpdated(ctx, c, recorder, newResource, oldPhase, string(newResource.Status.Phase), "KameletBinding", newResource.Name, ReasonKameletBindingPhaseUpdated, "")
 }
 
 // NotifyKameletBindingError automatically generates error events when the kameletBinding reconcile cycle phase has an error
-func NotifyKameletBindingError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1alpha1.KameletBinding, err error) {
+func NotifyKameletBindingError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1alpha1.KameletBinding, err error) {
 	k := old
-	if new != nil {
-		k = new
+	if newResource != nil {
+		k = newResource
 	}
 	if k == nil {
 		return
@@ -227,8 +227,8 @@ func NotifyKameletBindingError(ctx context.Context, c client.Client, recorder re
 }
 
 // NotifyBuildUpdated automatically generates events when a build changes
-func NotifyBuildUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1.Build) {
-	if new == nil {
+func NotifyBuildUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1.Build) {
+	if newResource == nil {
 		return
 	}
 	oldPhase := ""
@@ -237,23 +237,23 @@ func NotifyBuildUpdated(ctx context.Context, c client.Client, recorder record.Ev
 		oldPhase = string(old.Status.Phase)
 		oldConditions = old.Status.GetConditions()
 	}
-	if new.Status.Phase != v1.BuildPhaseNone {
-		notifyIfConditionUpdated(recorder, new, oldConditions, new.Status.GetConditions(), "Build", new.Name, ReasonBuildConditionChanged)
+	if newResource.Status.Phase != v1.BuildPhaseNone {
+		notifyIfConditionUpdated(recorder, newResource, oldConditions, newResource.Status.GetConditions(), "Build", newResource.Name, ReasonBuildConditionChanged)
 	}
 	info := ""
-	if new.Status.Failure != nil {
-		attempt := new.Status.Failure.Recovery.Attempt
-		attemptMax := new.Status.Failure.Recovery.AttemptMax
+	if newResource.Status.Failure != nil {
+		attempt := newResource.Status.Failure.Recovery.Attempt
+		attemptMax := newResource.Status.Failure.Recovery.AttemptMax
 		info = fmt.Sprintf(" (recovery %d of %d)", attempt, attemptMax)
 	}
-	notifyIfPhaseUpdated(ctx, c, recorder, new, oldPhase, string(new.Status.Phase), "Build", new.Name, ReasonBuildPhaseUpdated, info)
+	notifyIfPhaseUpdated(ctx, c, recorder, newResource, oldPhase, string(newResource.Status.Phase), "Build", newResource.Name, ReasonBuildPhaseUpdated, info)
 }
 
 // NotifyBuildError automatically generates error events when the build reconcile cycle phase has an error
-func NotifyBuildError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, new *v1.Build, err error) {
+func NotifyBuildError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1.Build, err error) {
 	p := old
-	if new != nil {
-		p = new
+	if newResource != nil {
+		p = newResource
 	}
 	if p == nil {
 		return
@@ -262,7 +262,7 @@ func NotifyBuildError(ctx context.Context, c client.Client, recorder record.Even
 }
 
 // nolint:lll
-func notifyIfPhaseUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, new ctrl.Object, oldPhase, newPhase string, resourceType, name, reason, info string) {
+func notifyIfPhaseUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, newResource ctrl.Object, oldPhase, newPhase string, resourceType, name, reason, info string) {
 	if oldPhase == newPhase {
 		return
 	}
@@ -272,10 +272,10 @@ func notifyIfPhaseUpdated(ctx context.Context, c client.Client, recorder record.
 	if phase == "" {
 		phase = "[none]"
 	}
-	recorder.Eventf(new, corev1.EventTypeNormal, reason, "%s %q in phase %q%s", resourceType, name, phase, info)
+	recorder.Eventf(newResource, corev1.EventTypeNormal, reason, "%s %q in phase %q%s", resourceType, name, phase, info)
 
-	if creatorRef, creator := getCreatorObject(ctx, c, new); creatorRef != nil && creator != nil {
-		if namespace := new.GetNamespace(); namespace == creatorRef.Namespace {
+	if creatorRef, creator := getCreatorObject(ctx, c, newResource); creatorRef != nil && creator != nil {
+		if namespace := newResource.GetNamespace(); namespace == creatorRef.Namespace {
 			recorder.Eventf(creator, corev1.EventTypeNormal, ReasonRelatedObjectChanged, "%s %q, created by %s %q, changed phase to %q%s", resourceType, name, creatorRef.Kind, creatorRef.Name, phase, info)
 		} else {
 			recorder.Eventf(creator, corev1.EventTypeNormal, ReasonRelatedObjectChanged, "%s \"%s/%s\", created by %s %q, changed phase to %q%s", resourceType, namespace, name, creatorRef.Kind, creatorRef.Name, phase, info)
@@ -283,24 +283,24 @@ func notifyIfPhaseUpdated(ctx context.Context, c client.Client, recorder record.
 	}
 }
 
-func notifyIfConditionUpdated(recorder record.EventRecorder, new runtime.Object, oldConditions, newConditions []v1.ResourceCondition, resourceType, name, reason string) {
+func notifyIfConditionUpdated(recorder record.EventRecorder, newResource runtime.Object, oldConditions, newConditions []v1.ResourceCondition, resourceType, name, reason string) {
 	// Update information about changes in conditions
 	for _, cond := range getCommonChangedConditions(oldConditions, newConditions) {
 		tail := ""
 		if cond.GetMessage() != "" {
 			tail = fmt.Sprintf(": %s", cond.GetMessage())
 		}
-		recorder.Eventf(new, corev1.EventTypeNormal, reason, "Condition %q is %q for %s %s%s", cond.GetType(), cond.GetStatus(), resourceType, name, tail)
+		recorder.Eventf(newResource, corev1.EventTypeNormal, reason, "Condition %q is %q for %s %s%s", cond.GetType(), cond.GetStatus(), resourceType, name, tail)
 	}
 }
 
-func getCommonChangedConditions(old, new []v1.ResourceCondition) (res []v1.ResourceCondition) {
+func getCommonChangedConditions(oldConditions, newConditions []v1.ResourceCondition) (res []v1.ResourceCondition) {
 	oldState := make(map[string]v1.ResourceCondition)
-	for _, c := range old {
+	for _, c := range oldConditions {
 		oldState[c.GetType()] = c
 	}
 
-	for _, newCond := range new {
+	for _, newCond := range newConditions {
 		oldCond := oldState[newCond.GetType()]
 		if oldCond == nil || oldCond.GetStatus() != newCond.GetStatus() || oldCond.GetMessage() != newCond.GetMessage() {
 			res = append(res, newCond)
diff --git a/pkg/install/kamelets.go b/pkg/install/kamelets.go
index a8a4dfe7f..2134a48a4 100644
--- a/pkg/install/kamelets.go
+++ b/pkg/install/kamelets.go
@@ -25,6 +25,8 @@ import (
 	"path"
 	"strings"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	"github.com/pkg/errors"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/types"
@@ -66,7 +68,7 @@ func KameletCatalog(ctx context.Context, c client.Client, namespace string) erro
 			continue
 		}
 
-		content, err := ioutil.ReadFile(path.Join(kameletDir, file.Name()))
+		content, err := util.ReadFile(path.Join(kameletDir, file.Name()))
 		if err != nil {
 			return err
 		}
diff --git a/pkg/install/secret.go b/pkg/install/secret.go
index 6d403bf13..c4a2f8bb7 100644
--- a/pkg/install/secret.go
+++ b/pkg/install/secret.go
@@ -19,8 +19,8 @@ package install
 
 import (
 	"context"
-	"io/ioutil"
 
+	"github.com/apache/camel-k/pkg/util"
 	v1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
@@ -43,7 +43,7 @@ func RegistrySecretOrCollect(ctx context.Context, c client.Client, namespace str
 
 // RegistrySecretFromFileOrCollect generates a secret from a docker-config.json file and creates it on the cluster (or appends it to the collection)
 func RegistrySecretFromFileOrCollect(ctx context.Context, c client.Client, namespace string, file string, collection *kubernetes.Collection, force bool) (string, error) {
-	secretData, err := ioutil.ReadFile(file)
+	secretData, err := util.ReadFile(file)
 	if err != nil {
 		return "", err
 	}
diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go
index f486ed705..c2859948f 100644
--- a/pkg/resources/resources.go
+++ b/pkg/resources/resources.go
@@ -138,9 +138,9 @@ var assets = func() http.FileSystem {
 		"/crd/bases/camel.apache.org_integrationplatforms.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "camel.apache.org_integrationplatforms.yaml",
 			modTime:          time.Time{},
-			uncompressedSize: 25962,
+			uncompressedSize: 26080,
 
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5c\xdf\x93\xe2\xb8\xf1\x7f\xe7\xaf\xe8\x5a\x1e\xf6\xae\x6a\x30\x77\xdf\x6f\x52\x49\xc8\x43\x8a\x63\x77\x2b\x64\x76\x67\xa8\x81\xbd\xcb\x3d\x0a\xbb\x01\x1d\xb2\xe4\x48\xf2\xb0\x5c\x2a\xff\x7b\xaa\x25\x1b\xec\xc1\xbf\x98\x99\xab\x24\x77\xd6\xcb\xee\x60\xa9\xd5\xdd\xea\x9f\xf2\x07\x86\x30\x7a\xbd\x31\x18\xc2\x47\x1e\xa2\x34\x18\x81\x55\x60\x77\x08\xd3\x84\x85\x3b\x84\xa5\xda\xd8\x03\xd3\x08\x1f\x54\x2a\x23\x66\xb9\x92\xf0\xd5\x74\xf9\xe1\x6b\x48\x65\x84\x1a\x94\x44\x50\x1a\x62\xa5\x71\x30\x84\x50\x49\xab\xf9\x3a\xb5\x4a\x83\xf0\x04\x81\x6d\x35\x62\x8c\xd2\x9a\x00\x60\x89\xe8\xa8\xdf\xdd\xaf\xe6\xb3\xf7\xb0\xe1\x02\x21\xe2\xc6\x2f\xc2\x08\x0e\xdc\xee\x06\x43\xb0\x3b\x6e\xe0\xa0\xf4\x1e\x36\x4a\x03\x8b\x22\x4e\x1b\x33\x01\x5c\x6e\x94\x8e\x3d\x1b\x1a\xb7\x4c\x47\x5c\x6e\x21\x54\xc9\x51\xf3\xed\xce\x82\x3a\x48\xd4\x66\xc7\x93\x60\x30\x84\x15\x89\xb1\xfc\x90\x73\x62\x3c\x59\xb7\xa7\x55\xf0\xa3\x4a\x33\x19\x0a\xe2\x66\x5a\xb8\x81\xef\x51\x1b\xda\xe4\xff\x82\x6f\x06\x43\xf8\x8a\xa6\xbc\xc9\x1e\xbe\xf9\xfa\xcf\x70\x54\x29\xc4\xec\x08\x52\x59\x48\x0d\x16\x28\xe3\x97\x10\x13\x0b\x5c\x42\xa8\xe2\x44\x70\x26\x43\x3c\x8b\x75\xda\x21\x00\xc7\x00\xd1\x50\x6b\xcb\xb8\x04\xe6\xc4\x00\xb5\x29\x4e\x03\x66\x07\xc3\xc1\x10\xdc\xd8\x59\x9b\x4c\xc6\xe3\xc3\xe1\x10\x30\xc7\x6e\xa0\xf4\x76\x9c\x4b\x37\xfe\x38\x9f\xbd\xbf\x5b\xbe\x1f\x39\x96\x07\x43\xf8\x2c\x05\x1a\x03\x1a\xff\x91\x72\x8d\x11\xac\x8f\xc0\x92\x44\xf0\x90\xad\x05\x82\x60\x07\x3a\x38\x77\x3a\xee\xd0\xb9\x84\x83\xe6\x96\xcb\xed\x0d\x98\xec\xd4\x07\xc3\xd2\xe9\x9c\xd5\x95\xb3\xc7\x4d\x69\x82\x92\xc0\x24\xbc\x99\x2e\x61\xbe\x7c\x03\xdf\x4d\x97\xf3\xe5\xcd\x60\x08\x3f\xcc\x57\x7f\xbd\xff\xbc\x82\x1f\xa6\x0f\x0f\xd3\xbb\xd5\xfc\xfd\x12\xee\x1f\x60\x76\x7f\xf7\x6e\xbe\x9a\xdf\xdf\x2d\xe1\xfe\x03\x4c\xef\x7e\x84\xdb\xf9\xdd\xbb\x1b\x40\x6e\x77\xa8\x01\xbf\x24\x9a\xf8\x57\x1a\x38\x29\x12\x23\x3a\xd3\xdc\x80\x72\x06\xc8\x3e\xe8\x6f\x93\x60\xc8\x37\x3c\x04\xc1\xe4\x36\x65\x5b\x84\xad\x7a\x44\x2d\xc9\x3c\x12\xd4\x31\x37\x74\x9c\x06\x98\x8c\x06\x43\x10\x3c\xe6\xd6\x59\x91\xb9\x14\x8a\xb6\x79\x4d\xdf\x1a\xb0\x84\x67\xe6\x34\x01\x96\x70\xfc\x62\x51\x3a\x6e\x82\xfd\x1f\x4d\xc0\xd5\xf8\xf1\xdb\xc1\x9e\xcb\x68\x02\xb3\xd4\x58\x15\x3f\xa0\x51\xa9\x0e\xf1\x1d\x6e\xb8\x74\x96\x3f\x88\xd1\xb2\x88\x59\x36\x19\x00\x30\x29\x55\xc6\x3c\xfd\x09\xde\xeb\x94\x10\xa8\x47\x5b\x94\xc1\x3e\x5d\xe3\x3a\xe5\x22\x42\xed\x88\xe7\x5b\x3f\x7e\x13\xfc\x2e\xf8\x76\x00\x10\x6a\x74\xcb\x57\x3c\x46\x63\x59\x9c\x4c\x40\xa6\x42\x0c\x00\x04\x5b\xa3\xc8\xa8\xb2\x24\x99\x40\xc8\x62\x14\xa3\xfd\x00\x40\xb2\x18\x27\xc0\xa5\xc5\xad\x76\xab\x13\xc1\x2c\x39\xa3\x09\xdc\xa4\x82\x49\x0e\xe8\x30\x88\xc8\x56\xab\x34\x27\x52\x7c\xee\xa9\xe5\xdc\x33\x8b\x5b\xa5\x79\xfe\xf7\x08\xf6\x34\x3f\xfb\x7f\x78\xfa\xbf\xd7\xd0\xfc\xcc\xc0\x22\x63\xc0\x3d\x15\xdc\xd8\xdb\xba\x19\x1f\xb9\xb1\x6e\x56\x22\x52\xcd\x44\xb5\x18\x6e\x82\xd9\x29\x6d\xef\xce\xcc\x8d\x80\x27\xfe\x01\x97\xdb\x54\x30\x5d\xb9\x76\x00\x60\x42\x95\xe0\x04\xdc\xd2\x84\x85\x18\x0d\x00\x32\xcd\x3b\x52\xa3\x42\x14\x5b\x68\xa2\xa1\x67\x4a\xa4\xb1\x3c\x6d\x14\xa1\x09\x35\x4f\xac\x3b\x2b\x0a\x5d\x85\x8d\x20\xdf\x09\x92\x1d\x33\x38\xf0\xf1\xe0\x27\xa3\xe4\x82\xd9\xdd\x04\x02\x63\x99\x4d\x4d\x50\x7c\xea\x0f\x6c\x51\xf8\xc4\x1e\x89\x45\xf2\x56\xb9\x1d\x9c\xa7\x3c\x7e\xeb\x25\x0c\x77\x18\xb3\x49\x36\x57\x25\x28\xa7\x8b\xf9\xf7\xff\xbf\x2c\x7d\x0c\x65\x36\x2b\x74\x4d\x21\x81\x9c\xc9\xaf\x3b\xf9\x67\xad\xc6\xfd\x98\x2e\xe6\xa7\xbf\x12\xad\x12\xd4\xf6\x64\x10\x7e\x14\x9c\xa8\xf0\xe9\x13\x7e\xde\x12\xcb\x59\xe4\x8e\xc8\x7b\xd0\x33\x93\x9d\x04\x46\x99\x94\x3e\xca\x72\x0a\x8e\x14\x64\x50\x7a\x7f\x2a\x11\x06\x9a\xc4\x24\xa8\xf5\x4f\x18\xda\x00\x96\xa8\x89\x0c\x99\x48\x2a\x22\x72\xba\x47\xd4\x16\x34\x86\x6a\x2b\xf9\xcf\x27\xda\x26\xcf\xa0\x82\x59\xcc\xec\xee\x3c\xdc\xc9\x53\x26\x7b\x64\x22\xc5\x1b\x8a\x47\x2e\x09\x68\xa4\x5d\x20\x95\x05\x7a\x6e\x8a\x09\xe0\x93\xd2\xe8\x32\xdf\xc4\xa5\x00\x33\x19\x8f\xb7\xdc\xe6\xc1\x23\x54\x71\x9c\x4a\x6e\x8f\xe3\x42\xf6\x35\xe3\x08\x1f\x51\x8c\x0d\xdf\x8e\x98\x0e\x77\xdc\x62\x68\x53\x8d\x63\x96\xf0\x91\x63\x5d\xba\x00\x12\xc4\xd1\x50\x67\xe1\xc6\xbc\x2d\xf1\x7a\x61\x2d\x7e\x38\x37\x6c\x38\x01\x72\x42\xb2\x01\x96\x2d\xf5\x52\x9c\x15\x4d\x1f\x91\x76\x1e\xde\x2f\x57\x90\x6f\xed\x0e\xe3\xa9\xf6\x9d\xde\xcf\x0b\xcd\xf9\x08\x48\x61\x5c\x6e\x5c\xd8\xa6\xbc\xab\x55\xec\x68\xa2\x8c\x12\xc5\xa5\x75\x7f\x84\x82\xa3\x7c\xaa\x7e\x93\xae\x63\x6e\x7d\x52\x44\x63\xe9\xac\x02\x98\xb9\x88\x0a\x6b\x84\x34\x89\x98\xc5\x28\x80\xb9\x84\x19\x45\x9e\x19\xa3\x54\xfd\x0b\x1f\x00\x69\xda\x8c\x48\xb1\xdd\x8e\xa0\x98\x0c\x9e\x4e\xf6\x5a\x2b\x3c\xc8\x63\x71\xcd\x79\x55\x78\xf0\x32\xc1\xb0\xe4\x3d\x11\x1a\x57\x40\x50\x90\x41\xf2\x8a\xba\x20\x9c\x8f\x6a\x0f\xa6\xe1\xf2\xd2\xd3\x0f\xdb\x59\xfa\x8e\x96\x39\xbe\x48\xc5\x8c\x4b\x73\x8e\x88\x1a\xc9\xd1\xa2\x0b\x9a\xd9\x66\xc5\x92\xf1\x62\x4e\x3d\xa3\x6e\x3d\x33\x38\x8f\xd9\x16\xab\x1e\xd6\x9e\x4e\x69\xf7\xa5\xd5\x94\xde\x8e\xd5\x14\x4a\x62\x7f\x57\x9c\x9f\xd7\x33\x68\x60\xa7\x0e\xee\x14\xdc\xf3\x3c\xfa\xac\xa9\xd0\xc4\x30\xad\x16\x1c\x00\x65\x1a\x57\xef\x39\x02\xad\x52\xcb\x25\xd6\x3c\x4d\x54\x35\xc5\x16\x69\xc9\x2f\x16\x5a\x7d\x39\x2e\x31\xd4\x68\x9f\xa5\xb1\x3d\x93\x7c\xaf\x9c\x9c\x33\xaa\x15\x9a\x88\xac\x95\x12\xc8\x2e\x4f\x14\x20\x66\x8f\x28\x3b\xe8\xfb\x13\xcd\x73\x36\x35\x1a\x55\xce\x6e\x36\x0e\x70\xa5\x4b\x93\xb4\x17\x3b\x52\x52\xf7\x0b\x5c\xe6\x75\xb1\x7f\x8f\xc7\x9b\xdc\xa8\xf3\xd0\x38\x9b\x42\x48\x1b\x6f\x38\xd5\x46\x5f\x99\xaf\x6b\xc9\x03\x35\x1f\xae\x7a\x0f\x95\x94\x14\x2e\xad\x02\x8d\xb1\xb2\xe8\xe5\xa3\xf0\xa9\x0c\xb7\xae\xbe\x0a\x60\x6e\x21\x64\x32\xdf\xaf\x81\xec\xdf\x83\xdf\x7f\xf3\xa7\x22\x17\xc6\xa7\xaa\xc5\xed\x6c\x39\xfc\x03\x78\x8f\xa2\x8a\xbf\x30\x05\xc2\x1d\x79\x66\xd0\x40\x76\x0a\x7f\xbb\x5d\x16\x56\xef\xf1\x68\xac\x0b\xae\x06\x58\x6a\x15\xb9\x69\xc8\x84\x38\xfa\x1a\xd5\x8b\xe6\x66\x34\x10\xad\x54\x99\x67\x37\x54\x72\xc3\xb7\xa9\xf6\x84\x28\xc0\x93\xba\x18\x65\x27\xab\x53\x53\xe7\x3d\x7e\x94\x09\x52\xfb\x44\x3b\x79\xb5\x52\xcc\x67\x32\x32\x01\xdc\x91\xae\xed\x8e\xf9\xa4\xa3\x95\x7a\x9a\x72\x8a\xa3\xcc\xa6\x01\x6a\xac\x99\x30\x8a\x3a\x1c\xa5\x49\x5e\x2e\xb3\xea\x21\x57\x40\xae\xa2\x7a\xb5\xb6\xdb\x29\x8d\x3d\xd6\x04\xa1\x7c\x5c\x98\xea\x1e\x4f\xdd\xa8\xf1\x56\x4b\x87\x81\x82\xcc\x8c\x52\x6e\x00\xf0\x29\xbd\x28\x70\x9e\x8e\x35\x02\xa3\x1a\x80\x47\x39\x95\x3d\x1e\x9b\x6c\xa4\x35\x4c\xe4\xc3\x55\xaf\xdd\x45\x7a\x4b\xb5\x79\x2e\x90\xc6\x0d\x6a\x94\xb6\x32\xb7\x53\x03\xa5\x25\x5a\x74\xe9\x3d\x52\xa1\xa1\xcc\x4e\x6d\xbd\x19\x53\x53\xf9\xc8\xf1\x30\x3e\x28\xbd\xe7\x72\x3b\xa2\xd6\x7e\xe4\xb3\xae\x19\xbb\xb6\x66\x3c\x74\xff\xb4\xe8\x65\x75\xff\xee\x7e\x02\xd3\x28\x02\xe5\xda\xdd\xd4\xe0\x26\x15\xb0\xe1\x28\xc8\xac\xce\xe5\xee\x8d\x2b\xb9\x6e\x20\xe5\xd1\x5f\xde\xbe\x86\xde\x54\xe2\xdb\x90\x2b\x74\xb7\x74\xd9\xe8\x08\x87\x1d\x3a\x66\xed\x39\x92\x51\x7b\x6e\x8d\x33\x96\xb8\x93\x35\xf8\xca\xa2\xc9\xf1\xda\x63\xbc\x1f\xf9\xcd\x46\xbd\x20\x23\xe2\xab\xf6\x69\x4d\xc5\x54\x1c\xa7\x5e\xbd\x63\x88\xf7\xd1\xc1\x17\x1e\xe7\x3e\xff\x64\x59\x2e\x37\x15\x2f\x6f\xb6\x29\x8f\xd0\x8c\x63\x2e\xb9\xff\xff\x28\xa5\x4e\x73\x54\xb8\x23\xd8\xd9\x58\xd4\x6e\xce\x2d\xc6\x8d\x6e\x7f\xc9\xdd\x94\xe2\x0f\x0b\x6d\x5d\xda\xf3\xa3\x5b\x50\x01\x60\x19\xb5\x79\xc3\x29\xf8\xd1\xd1\x3a\xb3\x5b\x83\x57\xa4\xf7\x58\xd5\x36\x3e\x9b\x5e\xbb\xd1\xb9\x66\xff\xa4\x96\xc6\x69\x99\xa8\x4d\xc9\xad\xdd\x46\xf3\x49\x4c\x6b\x56\x67\xec\x42\x85\x4c\x3c\xe4\xb5\x40\x43\x26\xb8\xc8\x02\x09\xb3\xbb\x3c\x6a\x3a\x2a\x4f\x0b\x8b\x86\x60\xde\x41\xa5\x5d\xec\xac\x78\x73\xd2\xc5\x2a\x3b\x9d\xe4\x85\xa0\x5e\xac\x33\x3f\x6d\x62\x35\x9e\x49\xb1\xec\xaa\x67\xf5\x3a\xef\x3d\x1f\xdf\xeb\xb8\x2e\x7f\x3d\x17\x6b\x4f\xc5\x57\x10\xd3\x28\x90\x99\x36\xee\x6b\x95\xb3\x50\x82\x87\x2d\x2a\x82\x2b\xd4\x44\x23\xdc\x61\xb8\x37\x69\xec\x69\xb7\xcf\xbf\x42\x5a\x70\xdd\x1a\x5b\x8b\xe6\x90\x52\xa6\xdb\x96\x19\xf3\xe1\xef\x33\x7e\x11\xae\xbb\xc4\x41\x70\x41\x2e\x93\xae\x93\x79\xb4\x04\x3a\x1a\x46\xb2\xc4\xec\x94\xed\xed\xa3\x9e\xee\x6f\xd9\x3e\x52\xdd\x52\xd9\xbe\x72\xaa\xe7\xcd\x29\x3e\xd5\xf5\xd5\xdb\xab\xa5\x77\x83\xd6\x72\xb9\x6d\xb0\xd4\x92\x33\x4c\xf3\xfe\x27\xc4\xfc\xb2\x7a\xe6\x3a\xe5\x4f\x2c\xa1\x82\x7e\x79\x6a\xd4\x5c\x67\xdb\xd4\x23\xe7\xd7\x71\xe7\xd6\x38\xe7\xe5\xa5\x0d\x6b\x98\x73\x74\x8b\xc7\x07\xdc\x5c\xd3\xad\xb8\x1e\x95\x9a\xfc\xac\x85\x65\x67\xf1\x9a\x3b\xcf\xee\x3e\xdf\xda\x4e\x5f\x70\x95\xb7\xd4\xa7\x26\xba\x99\x15\xb8\xce\xdd\xba\x64\xe0\xff\xee\x86\x18\x9e\xd1\x14\x77\x20\xd9\xde\x36\xc3\x75\x9a\xee\xd6\x3e\x43\x97\x16\xba\xe4\x74\xdc\x76\xd1\x50\xde\x67\x77\xed\xa4\xe1\xaa\x9c\xd0\x2d\x68\x37\x77\xd5\xd0\x3d\x58\xfb\x0b\xa1\xd7\xf0\x6f\x4f\xe9\x3f\xef\xdc\x2f\xbf\x2f\x83\xe7\xdd\x99\x41\x1f\x2e\x7e\xf5\xe1\xe2\xe2\xc6\xad\x83\x3c\xbf\x92\x58\xd1\x61\x92\xe5\x31\xaa\xb4\xeb\xbb\x98\xb7\xef\x30\xd1\x18\x32\x8b\xd1\xc4\x21\xb8\x2a\xde\x3a\x06\x74\x08\x81\x7b\x1f\x15\xac\x3c\xf5\x06\x49\xb8\x34\x16\x59\x54\x6f\x3c\xad\x46\xd3\x22\x64\x42\xb6\x6c\x2c\x4a\xfb\xbd\x12\x69\x8c\x33\xc1\x78\xcd\x4b\xbe\x96\xad\x92\x74\x2d\xb8\xd9\x5d\xf1\x72\xb2\xee\x9d\xec\xa2\x4c\xc9\xbd\x77\x44\xfa\x7f\x9d\xfb\x32\x21\x1c\x9c\xcb\x21\x02\x31\xca\x59\x21\x5e\x89\x02\xaf\x59\xd8\x22\x90\xc6\x2d\x37\xb6\xee\x5e\xeb\x49\x23\xe8\xa7\xba\x37\x7f\x89\x56\x8f\x3c\xca\x5e\x73\xe7\x2f\x8b\x3c\xe2\x26\x07\xae\x64\x15\x2e\xea\xda\x9b\x1e\x4f\xaf\xf2\x71\x7b\xca\x61\x51\xa4\xd1\x34\x64\xa4\x0e\xa1\x26\x64\x2f\x5a\xce\xa5\xc1\x30\xd5\x0d\xf9\xa0\x4b\x50\x50\x7a\xcb\x24\xff\xd9\x29\xef\x45\xec\x98\x96\x57\xaa\x2f\x75\x23\x9d\x4a\x0a\x15\x0b\x7f\xf4\xba\x8b\xc9\x94\x57\xd4\x5d\x1d\xb4\xd9\xa8\xa7\x52\x09\x62\xea\x48\xa2\x31\xc4\x35\xae\x6d\xd0\x49\x28\x52\x63\xab\xf4\xd0\x16\x00\x66\x7e\x61\x0e\xf8\xa2\x0c\x4b\xe5\x81\xd2\xe1\x0e\x9d\x3b\x57\x21\x2e\x4e\xfb\xb9\x35\x49\x01\x34\x46\xf1\x93\x09\x91\xbd\x03\xad\x91\xa0\x52\xbc\x92\xe3\x5e\xca\x51\x7b\xcb\x5a\x12\x70\x56\x24\x52\x0f\x0b\x68\xf3\xe8\x1c\xd1\x74\x5b\x5f\x42\xb6\x1a\x70\x4e\xe3\x93\x4a\xa5\x5d\x28\x2e\x6b\xbd\xa1\x33\xa9\x15\x4d\x7c\x2e\x11\xfb\x92\xc5\x0e\xfe\xf5\xcc\xd5\x4d\x25\xc6\xc8\x2d\xae\x7c\xe0\xb6\xac\x72\x9f\xa6\xc0\x50\x7f\xc9\xe2\xe0\xa8\x55\x11\xa9\xcd\x41\x6e\xfd\xc2\x3a\x63\x6a\x36\xa5\xf6\x37\x08\x8d\x6f\x0f\x3a\xf2\x76\xbe\x16\x6d\x42\xc2\x74\xeb\x9d\x52\xcd\x5f\xf8\x56\xa6\xb5\xca\x6b\xba\x09\x6b\x58\x9c\x68\xb5\xe1\xa2\xc2\x0a\xcb\x3d\x9c\x66\xdc\x2e\xfc\xd4\x02\xec\xd0\x41\x8b\x8d\x6b\x7c\x68\x82\xf1\x60\x0f\xa6\xb1\xe1\xe2\xf2\x02\x95\x9e\x05\x37\x77\x04\xe3\x02\x16\xf6\x9a\x30\x77\xc2\x69\x5e\x6f\x89\x39\xa2\xdc\x5c\x8d\xa1\x3b\x6d\x7a\x8d\xbe\xbd\xa2\x2e\xd9\xec\xfa\x22\xef\xc9\x65\xa5\x3b\x98\x32\xe7\x97\xf5\x9a\xbb\x06\x70\x1b\x3f\x23\x6a\xb7\x64\x90\x0a\xae\x1c\x4f\xa5\x9c\x51\xef\x3c\x1d\x9a\x97\x2f\xa3\x73\xd3\x3c\x72\x96\xa7\x1f\x71\x94\xca\xbd\x54\x07\x39\xf2\x0d\xed\x04\xac\xae\x8c\x6b\xcd\x61\xb2\x24\xdb\xf3\xa2\x62\xc5\xc3\x3a\xb4\xa9\xc3\xa1\x5f\x89\x37\x75\x6b\x4a\x88\x53\xb5\x76\x0a\xe8\x21\xa7\x95\xc7\xd1\x43\x4e\xdd\xe8\x21\xa7\x95\xa3\x87\x9c\x96\x46\x0f\x39\xed\x21\xa7\x3d\xe4\xd4\x8d\x1e\x72\xda\x2a\x49\x0f\x39\xed\x21\xa7\xaf\x40\xaf\x87\x9c\xf6\x90\xd3\x0e\x82\xf6\x90\xd3\x8b\xd1\x43\x4e\xb3\xd1\x43\x0a\x2f\x46\x0f\x39\x2d\x8c\xde\x3e\x2e\x46\x0f\x39\x85\x1e\x72\x5a\x3d\x7a\xc8\x69\x0f\x39\xad\x1e\xbf\x31\x0c\x59\x0f\x39\xed\x21\xa7\x55\xa3\x87\x9c\xf6\xe1\xa2\x87\x9c\x5e\x39\xa9\x87\x9c\x76\xde\xaa\x87\x9c\xf6\x90\xd3\xf3\xe8\x21\xa7\x97\xa3\x87\x9c\xfe\x6f\x41\x4e\xfd\x05\x71\x85\x1b\x75\xc3\x9b\x56\x49\x97\x13\xcd\x66\xae\xb3\x28\x91\x83\x60\x2a\xcf\x80\x9d\x7f\x44\x8f\x59\x60\xee\x65\x2f\xe3\x12\xdc\x0f\xe1\x55\x15\x70\x6d\x01\x42\x30\x63\x57\x9a\x49\xc3\xf3\xdf\x08\xed\x04\x88\xfa\xc8\x8c\x75\xd6\x92\x87\xb0\x4c\x14\x7b\x22\x85\x91\xff\xa5\x3e\x25\x31\xc3\x09\xd5\x3b\x9c\x02\x26\x5d\x81\x55\x57\x82\xfa\x17\xfa\x13\x88\x98\xc5\x11\x6d\x5b\x97\xa2\xdb\x5c\x97\xc4\xfd\xec\xee\xa4\x3a\x8b\xba\x72\x3f\xee\x78\x16\x97\x9b\x82\xbc\x07\x66\x4e\x3f\x23\xf8\x4b\xf3\x1e\xa3\x31\xb5\x58\xa1\x8b\x0b\x98\x5d\x1a\x33\x39\xd2\xc8\x22\xf7\x03\xc0\xd9\x62\xe0\x32\xe2\x21\x73\xbf\xcb\x18\xa1\x65\x5c\x18\x60\xeb\xa6\xba\x83\xce\xf7\x7c\xaa\x75\x42\x76\x80\x26\x33\xd3\x15\x6c\xe7\xca\x7f\x9a\x5e\xcc\x91\x5e\xe1\x6f\x4d\x76\x16\x2f\xe7\xa8\x0a\xbc\x56\xc3\x51\x86\x59\xcb\x5a\x93\x13\x33\x37\xfe\xf7\xb0\x37\xb0\xd2\x29\xde\xc0\x07\x26\x0c\xde\xc0\x67\x0f\xe3\x7b\x36\x5f\x4d\xf8\xeb\xb2\x9e\x8e\x89\xdb\xbd\xf8\xcb\xb1\x27\xde\x9e\xb9\x7d\x33\xb8\xb0\xd6\x8f\x6b\xe1\xd9\xcf\x04\x61\xf7\x18\xff\x1e\xe3\x5f\x7c\xd0\x63\xfc\x7b\x8c\x7f\x99\xfb\x1d\x33\x6d\x08\xff\x0a\x1d\xb9\xdf\xc7\xae\xd2\x49\x83\x28\xfd\xd7\x09\xfa\xaf\x13\xf4\x5f\x27\x78\xd5\xaf\x13\x34\x40\xa6\x6a\x4d\xb8\x92\xd8\xc5\x87\xfe\x8b\x04\x05\x61\x8d\x55\x9a\x8a\xe6\xc2\x27\xe9\xfa\xc2\x19\xb2\x5a\x10\xfe\xf9\xaf\xc1\xbf\x03\x00\x00\xff\xff\x78\x08\x72\x7e\x6a\x65\x00\x00"),
+			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x3c\x4b\x93\xe3\xb6\xd1\x77\xfd\x8a\xae\xd5\x61\xed\xaa\x11\x65\x7f\x8f\x4a\xa2\x1c\x52\xb2\x76\xb7\xa2\xec\xee\xcc\xd4\x4a\x6b\xc7\x47\x88\x6c\x49\xb0\x48\x80\x01\xc0\xd1\xca\xa9\xfc\xf7\x54\x37\x48\x89\x1a\xf1\xa5\x99\x71\x25\xb6\x89\xcb\x8c\x44\xa0\xd1\xef\x07\xd0\xe2\x10\x46\x2f\x37\x06\x43\xf8\x20\x43\x54\x16\x23\x70\x1a\xdc\x16\x61\x9a\x8a\x70\x8b\xb0\xd0\x6b\xb7\x17\x06\xe1\x9d\xce\x54\x24\x9c\xd4\x0a\xbe\x9a\x2e\xde\x7d\x0d\x99\x8a\xd0\x80\x56\x08\xda\x40\xa2\x0d\x0e\x86\x10\x6a\xe5\x8c\x5c\x65\x4e\x1b\x88\x3d\x40\x10\x1b\x83\x98\xa0\x72\x36\x00\x58\x20\x32\xf4\xdb\xbb\xe5\x7c\xf6\x16\xd6\x32\x46\x88\xa4\xf5\x8b\x30\x82\xbd\x74\xdb\xc1\x10\xdc\x56\x5a\xd8\x6b\xb3\x83\xb5\x36\x20\xa2\x48\xd2\xc6\x22\x06\xa9\xd6\xda\x24\x1e\x0d\x83\x1b\x61\x22\xa9\x36\x10\xea\xf4\x60\xe4\x66\xeb\x40\xef\x15\x1a\xbb\x95\x69\x30\x18\xc2\x92\xc8\x58\xbc\x2b\x30\xb1\x1e\x2c\xef\xe9\x34\xfc\xa8\xb3\x9c\x86\x12\xb9\x39\x17\x6e\xe0\x7b\x34\x96\x36\xf9\x9f\xe0\x9b\xc1\x10\xbe\xa2\x29\xaf\xf2\x87\xaf\xbe\xfe\x33\x1c\x74\x06\x89\x38\x80\xd2\x0e\x32\x8b\x25\xc8\xf8\x25\xc4\xd4\x81\x54\x10\xea\x24\x8d\xa5\x50\x21\x9e\xc8\x3a\xee\x10\x00\x23\x40\x30\xf4\xca\x09\xa9\x40\x30\x19\xa0\xd7\xe5\x69\x20\xdc\x60\x38\x18\x02\x8f\xad\x73\xe9\x64\x3c\xde\xef\xf7\x81\x60\x74\x03\x6d\x36\xe3\x82\xba\xf1\x87\xf9\xec\xed\xed\xe2\xed\x88\x51\x1e\x0c\xe1\xb3\x8a\xd1\x5a\x30\xf8\x8f\x4c\x1a\x8c\x60\x75\x00\x91\xa6\xb1\x0c\xc5\x2a\x46\x88\xc5\x9e\x04\xc7\xd2\x61\xa1\x4b\x05\x7b\x23\x9d\x54\x9b\x1b\xb0\xb9\xd4\x07\xc3\x33\xe9\x9c\xd8\x55\xa0\x27\xed\xd9\x04\xad\x40\x28\x78\x35\x5d\xc0\x7c\xf1\x0a\xbe\x9b\x2e\xe6\x8b\x9b\xc1\x10\x7e\x98\x2f\xff\x7a\xf7\x79\x09\x3f\x4c\x3f\x7d\x9a\xde\x2e\xe7\x6f\x17\x70\xf7\x09\x66\x77\xb7\x6f\xe6\xcb\xf9\xdd\xed\x02\xee\xde\xc1\xf4\xf6\x47\x78\x3f\xbf\x7d\x73\x03\x28\xdd\x16\x0d\xe0\x97\xd4\x10\xfe\xda\x80\x24\x46\x62\x44\x32\x2d\x14\xa8\x40\x80\xf4\x83\x3e\xdb\x14\x43\xb9\x96\x21\xc4\x42\x6d\x32\xb1\x41\xd8\xe8\x07\x34\x8a\xd4\x23\x45\x93\x48\x4b\xe2\xb4\x20\x54\x34\x18\x42\x2c\x13\xe9\x58\x8b\xec\x25\x51\xb4\xcd\x4b\xda\xd6\x40\xa4\x32\x57\xa7\x09\x88\x54\xe2\x17\x87\x8a\xb1\x09\x76\x7f\xb4\x81\xd4\xe3\x87\x6f\x07\x3b\xa9\xa2\x09\xcc\x32\xeb\x74\xf2\x09\xad\xce\x4c\x88\x6f\x70\x2d\x15\x6b\xfe\x20\x41\x27\x22\xe1\xc4\x64\x00\x20\x94\xd2\x39\xf2\xf4\x11\xbc\xd5\xe9\x38\x46\x33\xda\xa0\x0a\x76\xd9\x0a\x57\x99\x8c\x23\x34\x0c\xbc\xd8\xfa\xe1\x9b\xe0\xff\x82\x6f\x07\x00\xa1\x41\x5e\xbe\x94\x09\x5a\x27\x92\x74\x02\x2a\x8b\xe3\x01\x40\x2c\x56\x18\xe7\x50\x45\x9a\x4e\x20\x14\x09\xc6\xa3\xdd\x00\x40\x89\x04\x27\x20\x95\xc3\x8d\xe1\xd5\x69\x2c\x1c\x19\xa3\x0d\x78\x52\x49\x25\x07\x24\x0c\x02\xb2\x31\x3a\x2b\x80\x94\x9f\x7b\x68\x05\xf6\xc2\xe1\x46\x1b\x59\x7c\x1e\xc1\x8e\xe6\xe7\xff\x87\xc7\xff\x3d\x87\xe6\x27\x04\xee\x73\x04\xf8\x69\x2c\xad\x7b\x5f\x37\xe3\x83\xb4\x8e\x67\xa5\x71\x66\x44\x5c\x4d\x06\x4f\xb0\x5b\x6d\xdc\xed\x09\xb9\x11\xc8\xd4\x3f\x90\x6a\x93\xc5\xc2\x54\xae\x1d\x00\xd8\x50\xa7\x38\x01\x5e\x9a\x8a\x10\xa3\x01\x40\xce\x79\x06\x35\x2a\x79\xb1\x7b\x43\x30\xcc\x4c\xc7\x59\xa2\x8e\x1b\x45\x68\x43\x23\x53\xc7\xb2\x22\xd7\x55\xda\x08\x8a\x9d\x20\xdd\x0a\x8b\x03\xef\x0f\x7e\xb2\x5a\xdd\x0b\xb7\x9d\x40\x60\x9d\x70\x99\x0d\xca\x4f\xbd\xc0\xee\x4b\xdf\xb8\x03\xa1\x48\xd6\xaa\x36\x83\xd3\x94\x87\x6f\x3d\x85\xe1\x16\x13\x31\xc9\xe7\xea\x14\xd5\xf4\x7e\xfe\xfd\xff\x2e\xce\xbe\x86\x73\x34\x2b\x78\x4d\x2e\x81\x8c\xc9\xaf\x3b\xda\x67\x2d\xc7\xfd\x98\xde\xcf\x8f\x9f\x52\xa3\x53\x34\xee\xa8\x10\x7e\x94\x8c\xa8\xf4\xed\x23\x7c\x5e\x13\xca\xb9\xe7\x8e\xc8\x7a\xd0\x23\x93\x4b\x02\xa3\x9c\x4a\xef\x65\x25\x39\x47\x72\x32\xa8\xbc\x3d\x9d\x01\x06\x9a\x24\x14\xe8\xd5\x4f\x18\xba\x00\x16\x68\x08\x0c\xa9\x48\x16\x47\x64\x74\x0f\x68\x1c\x18\x0c\xf5\x46\xc9\x9f\x8f\xb0\x6d\x11\x41\x63\xe1\x30\xd7\xbb\xd3\x60\xc9\x53\x24\x7b\x10\x71\x86\x37\xe4\x8f\x38\x08\x18\xa4\x5d\x20\x53\x25\x78\x3c\xc5\x06\xf0\x51\x1b\xe4\xc8\x37\xe1\x10\x60\x27\xe3\xf1\x46\xba\xc2\x79\x84\x3a\x49\x32\x25\xdd\x61\x5c\x8a\xbe\x76\x1c\xe1\x03\xc6\x63\x2b\x37\x23\x61\xc2\xad\x74\x18\xba\xcc\xe0\x58\xa4\x72\xc4\xa8\x2b\x76\x20\x41\x12\x0d\x4d\xee\x6e\xec\xeb\x33\x5c\x2f\xb4\xc5\x0f\x36\xc3\x06\x09\x90\x11\x92\x0e\x88\x7c\xa9\xa7\xe2\xc4\x68\xfa\x8a\xb8\xf3\xe9\xed\x62\x09\xc5\xd6\x2c\x8c\xc7\xdc\x67\xbe\x9f\x16\xda\x93\x08\x88\x61\x52\xad\xd9\x6d\x53\xdc\x35\x3a\x61\x98\xa8\xa2\x54\x4b\xe5\xf8\x43\x18\x4b\x54\x8f\xd9\x6f\xb3\x55\x22\x9d\x0f\x8a\x68\x1d\xc9\x2a\x80\x19\x7b\x54\x58\x21\x64\x69\x24\x1c\x46\x01\xcc\x15\xcc\xc8\xf3\xcc\x04\x85\xea\x5f\x58\x00\xc4\x69\x3b\x22\xc6\x76\x13\x41\x39\x18\x3c\x9e\xec\xb9\x56\x7a\x50\xf8\xe2\x1a\x79\x55\x58\xf0\x22\xc5\xf0\xcc\x7a\x22\xb4\x9c\x40\x90\x93\x41\xb2\x8a\x3a\x27\x5c\x8c\x6a\x0b\xa6\xc1\x71\xe9\xf1\x97\xed\x28\x7d\x47\xcb\x18\x2f\x62\xb1\x90\xca\x9e\x3c\xa2\x41\x32\xb4\xe8\x02\x66\xbe\x59\x39\x65\xbc\x98\x53\x8f\x28\xaf\x17\x16\xe7\x89\xd8\x60\xd5\xc3\x5a\xe9\x9c\xed\xbe\x70\x86\xc2\xdb\xa1\x1a\xc2\x19\xd9\xdf\x95\xe7\x17\xf9\x0c\x5a\xd8\xea\x3d\x4b\x81\x9f\x17\xde\x67\x45\x89\x26\x86\x59\x35\xe1\x00\xa8\xb2\xa4\x7a\xcf\x11\x18\x9d\x39\xa9\xb0\xe6\x69\xaa\xab\x21\xb6\x50\x4b\x76\x71\x6f\xf4\x97\xc3\x02\x43\x83\xee\x49\x1c\xdb\x09\x25\x77\x9a\xe9\x9c\x51\xae\xd0\x04\x64\xa5\x75\x8c\xe2\x52\xa2\x00\x89\x78\x40\xd5\x81\xdf\x1f\x69\x1e\xeb\xd4\x68\x54\x39\xbb\x59\x39\x80\x53\x97\x26\x6a\x2f\x76\xa4\xa0\xee\x17\x70\xe4\x65\xdf\xbf\xc3\xc3\x4d\xa1\xd4\x85\x6b\x9c\x4d\x21\xa4\x8d\xd7\x92\x72\xa3\xaf\xec\xd7\xb5\xe0\x81\x8a\x0f\xce\xde\x43\xad\x14\xb9\x4b\xa7\xc1\x60\xa2\x1d\x7a\xfa\xc8\x7d\x6a\x2b\x1d\xe7\x57\x01\xcc\x1d\x84\x42\x15\xfb\x35\x80\xfd\x7b\xf0\xff\xdf\xfc\xa9\x8c\x85\xf5\xa1\xea\xfe\xfd\x6c\x31\xfc\x03\x78\x8b\xa2\x8c\xbf\x34\x05\xc2\x2d\x59\x66\xd0\x00\x76\x0a\x7f\x7b\xbf\x28\xad\xde\xe1\xc1\x3a\x76\xae\x16\x44\xe6\x34\x99\x69\x28\xe2\xf8\xe0\x73\x54\x4f\x1a\xcf\x68\x00\x5a\xc9\x32\x8f\x6e\xa8\xd5\x5a\x6e\x32\xe3\x01\x91\x83\x27\x76\x09\x8a\x4e\xce\x64\xb6\xce\x7a\xfc\x38\x07\x48\xe5\x13\xed\xe4\xd9\x4a\x3e\x5f\xa8\xc8\x06\x70\x4b\xbc\x76\x5b\xe1\x83\x8e\xd1\xfa\x71\xc8\x29\x8f\x73\x34\x2d\x50\x61\x2d\x62\xab\xa9\xc2\xd1\x86\xe8\x95\x2a\xcf\x1e\x0a\x06\x14\x2c\xaa\x67\x6b\xbb\x9e\xd2\xd8\x61\x8d\x13\x2a\xc6\x85\xaa\xee\xf0\x58\x8d\x5a\xaf\xb5\x24\x0c\x8c\x49\xcd\x28\xe4\x06\x00\x1f\xb3\x8b\x04\xe7\xf1\x58\x21\x08\xca\x01\x64\x54\x40\xd9\xe1\xa1\x49\x47\x5a\xdd\x44\x31\x38\x7b\xed\x4e\xd2\x6b\xca\xcd\x0b\x82\x0c\xae\xd1\xa0\x72\x95\xb1\x9d\x0a\x28\xa3\xd0\x21\x87\xf7\x48\x87\x96\x22\x3b\x95\xf5\x76\x4c\x45\xe5\x83\xc4\xfd\x78\xaf\xcd\x4e\xaa\xcd\x88\x4a\xfb\x91\x8f\xba\x76\xcc\x65\xcd\x78\xc8\x7f\x5a\xf8\xb2\xbc\x7b\x73\x37\x81\x69\x14\x81\xe6\x72\x37\xb3\xb8\xce\x62\x58\x4b\x8c\x49\xad\x4e\xe9\xee\x0d\xa7\x5c\x37\x90\xc9\xe8\x2f\xaf\x5f\x82\x6f\x3a\xf5\x65\xc8\x15\xbc\x5b\x70\x34\x3a\xc0\x7e\x8b\x8c\xac\x3b\x79\x32\x2a\xcf\x9d\x65\x65\x49\x3a\x69\x83\xcf\x2c\x9a\x0c\xaf\xdd\xc7\xfb\x51\x9c\x6c\xd4\x13\x32\x22\xbc\x6a\x9f\xd6\x64\x4c\xe5\x71\xac\xd5\x3b\xba\x78\xef\x1d\x7c\xe2\x71\xaa\xf3\x8f\x9a\xc5\xb1\xa9\x7c\x78\xb3\xc9\x64\x84\x76\x9c\x48\x25\xfd\xff\xa3\x8c\x2a\xcd\x51\xe9\x8c\x60\xeb\x92\xb8\x76\x73\xe9\x30\x69\x34\xfb\x4b\xec\xa6\xe4\x7f\x44\xe8\xea\xc2\x9e\x1f\xdd\x9c\x0a\x80\xc8\xa1\xcd\x1b\xa4\xe0\x47\x47\xed\xcc\x4f\x0d\x5e\x10\xde\x43\x55\xd9\xf8\x64\x78\xed\x4a\xc7\xc5\xfe\x91\x2d\x8d\xd3\x72\x52\x9b\x82\x5b\xbb\x8e\x16\x93\x84\x31\xa2\x4e\xd9\x63\x1d\x8a\xf8\x53\x91\x0b\x34\x44\x82\x8b\x28\x90\x0a\xb7\x2d\xbc\x26\x43\x79\x9c\x58\x34\x38\xf3\x0e\x2c\xed\xa2\x67\xe5\x93\x93\x2e\x5a\xd9\x49\x92\x17\x84\x7a\xb2\x4e\xf8\xb4\x91\xd5\x28\x93\x72\xda\x55\x8f\xea\x75\xd6\x7b\x12\xdf\xcb\x98\xae\x7c\x39\x13\x6b\x0f\xc5\x57\x00\x33\x18\xa3\xb0\x6d\xd8\xd7\x32\xe7\x5e\xc7\x32\x6c\x61\x11\x5c\xc1\x26\x1a\xe1\x16\xc3\x9d\xcd\x12\x0f\xbb\x7d\xfe\x15\xd4\x02\x57\x6b\x62\x15\x37\xbb\x94\x73\xb8\x6d\x91\xb1\x18\xfe\x3c\xe3\x17\xc1\xba\x8b\x1f\x04\x76\x72\x39\x75\x9d\xd4\xa3\xc5\xd1\xd1\xb0\x4a\xa4\x76\xab\x5d\xaf\x1f\xf5\x70\x7f\xcf\xfa\x91\x99\x96\xcc\xf6\x85\x43\xbd\x6c\x0e\xf1\x99\xa9\xcf\xde\x5e\x2c\xbc\x5b\x74\x4e\xaa\x4d\x83\xa6\x9e\x19\xc3\xb4\xa8\x7f\x42\x2c\x0e\xab\x67\x5c\x29\x7f\x14\x29\x25\xf4\x8b\x63\xa1\xc6\x95\x6d\x53\x8d\x5c\x1c\xc7\x9d\x4a\xe3\x02\x97\xe7\x16\xac\x61\x81\xd1\x7b\x3c\x7c\xc2\xf5\x35\xd5\x0a\xd7\xa8\x54\xe4\xe7\x25\xac\x38\x91\xd7\x5c\x79\x76\xb7\xf9\xd6\x72\xfa\x02\xab\xa2\xa4\x3e\x16\xd1\xcd\xa8\xc0\x75\xe6\xd6\x25\x02\xff\x77\x17\xc4\xf0\x84\xa2\xb8\x03\xc8\xf6\xb2\x19\xae\xe3\x74\xb7\xf2\x19\xba\x94\xd0\x67\x46\x27\x5d\x17\x0e\x15\x75\x76\xd7\x4a\x1a\xae\x8a\x09\xdd\x9c\x76\x73\x55\x0d\xdd\x9d\xb5\x3f\x10\x7a\x09\xfb\xf6\x90\xfe\xf3\xc6\xfd\xfc\xf3\x32\x78\xda\x99\x19\xf4\xee\xe2\x37\xef\x2e\x2e\x4e\xdc\x3a\xd0\xf3\x1b\xf1\x15\x1d\x26\x39\x99\xa0\xce\xba\xde\xc5\xbc\x7e\x83\xa9\xc1\x50\x38\x8c\x26\xdc\xc1\x55\x71\xeb\x18\x90\x10\x02\xbe\x8f\x0a\x96\x1e\x7a\x03\x25\x52\x59\x87\x22\xaa\x57\x9e\x56\xa5\x69\x21\x32\x25\x5d\xb6\x0e\x95\xfb\x5e\xc7\x59\x82\xb3\x58\xc8\x9a\x4b\xbe\x96\xad\xd2\x6c\x15\x4b\xbb\xbd\xe2\x72\xb2\xee\x4e\xf6\xfe\x1c\x12\xdf\x3b\x22\xfd\x5f\x67\xbe\x22\x8e\xb9\x9d\x8b\x3b\x02\x31\x2a\x50\x21\x5c\x09\x82\xac\x59\xd8\x42\x90\xc1\x8d\xb4\xae\xee\x5c\xeb\x51\x21\xe8\xa7\xf2\xcd\x5f\x6a\xf4\x83\x8c\xf2\x6b\xee\xe2\xb2\xc8\x77\xdc\x14\x8d\x2b\x79\x86\x8b\xa6\xf6\xa4\xc7\xc3\xab\x7c\xdc\x1e\x72\x44\x14\x19\xb4\x0d\x11\xa9\x83\xab\x09\xc5\xb3\x96\x4b\x65\x31\xcc\x4c\x43\x3c\xe8\xe2\x14\xb4\xd9\x08\x25\x7f\x66\xe6\x3d\x0b\x1d\xdb\x72\xa5\xfa\x5c\x33\x32\x99\x22\x57\x71\xef\x45\x6f\xba\xa8\xcc\xf9\x8a\xba\xa3\x83\x36\x1d\xf5\x50\x2a\x9b\x98\x3a\x82\x68\x74\x71\x8d\x6b\x1b\x78\x12\xc6\x99\x75\x55\x7c\x68\x73\x00\x33\xbf\xb0\x68\xf8\xa2\x08\x4b\xe9\x81\x36\xe1\x16\xd9\x9c\xab\x3a\x2e\x8e\xfb\xf1\x9a\xb4\xd4\x34\x46\xfe\x53\xc4\x71\x7e\x07\x5a\x43\x41\x25\x79\x67\x86\x7b\x49\x47\xed\x29\xeb\x19\x81\xb3\x32\x90\xfa\xb6\x80\x36\x8b\x2e\x3a\x9a\xde\xd7\xa7\x90\xad\x0a\x5c\xc0\xf8\xa8\x33\xe5\xee\xb5\x54\xb5\xd6\xd0\x19\xd4\x92\x26\x3e\x15\x88\x7b\xce\x62\x6e\xff\x7a\xe2\xea\xa6\x14\x63\xc4\x8b\x2b\x1f\xf0\x96\x55\xe6\xd3\xe4\x18\xea\x0f\x59\xb8\x1d\xb5\xca\x23\xb5\x19\xc8\x7b\xbf\xb0\x4e\x99\x9a\x55\xa9\xfd\x06\xa1\xf1\xf6\xa0\x23\x6e\xa7\x63\xd1\xa6\x4e\x98\x6e\xb5\x53\x66\xe4\x33\x6f\x65\x5a\xb3\xbc\xa6\x93\xb0\x86\xc5\xa9\xd1\x6b\x19\x57\x68\xe1\x79\x0d\x67\x84\x74\xf7\x7e\x6a\xa9\xed\x90\x5b\x8b\x2d\x17\x3e\x34\xc1\xfa\x66\x0f\x61\xb0\xe1\xe0\xf2\xa2\x2b\x3d\x77\x6e\x2c\x82\x71\xa9\x17\xf6\x1a\x37\x77\xec\xd3\xbc\x5e\x13\x8b\x8e\x72\x7b\x75\x0f\xdd\x71\xd3\x6b\xf8\xed\x19\x75\x89\x66\xd7\x8b\xbc\x47\x87\x95\x2c\x98\x73\xcc\x2f\xf3\x35\x3e\x06\xe0\x8d\x9f\xe0\xb5\x5b\x22\x48\x05\x56\x8c\xd3\x59\xcc\xa8\x37\x9e\x0e\xc5\xcb\x97\xd1\xa9\x68\x1e\xb1\xe6\x99\x07\x1c\x65\x6a\xa7\xf4\x5e\x8d\x7c\x41\x3b\x01\x67\x2a\xfd\x5a\xb3\x9b\x3c\xa3\xed\x69\x5e\xb1\xe2\x61\x5d\xb7\x29\xf7\xa1\x5f\xd9\x6f\xca\x6b\xce\x3a\x4e\xf5\x8a\x19\xd0\xb7\x9c\x56\x8a\xa3\x6f\x39\xe5\xd1\xb7\x9c\x56\x8e\xbe\xe5\xf4\x6c\xf4\x2d\xa7\x7d\xcb\x69\xdf\x72\xca\xa3\x6f\x39\x6d\xa5\xa4\x6f\x39\xed\x5b\x4e\x5f\x00\x5e\xdf\x72\xda\xb7\x9c\x76\x20\xb4\x6f\x39\xbd\x18\x7d\xcb\x69\x3e\xfa\x96\xc2\x8b\xd1\xb7\x9c\x96\x46\xaf\x1f\x17\xa3\x6f\x39\x85\xbe\xe5\xb4\x7a\xf4\x2d\xa7\x7d\xcb\x69\xf5\xf8\x9d\xf5\x90\xf5\x2d\xa7\x7d\xcb\x69\xd5\xe8\x5b\x4e\x7b\x77\xd1\xb7\x9c\x5e\x39\xa9\x6f\x39\xed\xbc\x55\xdf\x72\xda\xb7\x9c\x9e\x46\xdf\x72\x7a\x39\xfa\x96\xd3\x5f\x57\xcb\xa9\x3f\x20\xae\x30\xa3\x6e\xfd\xa6\x55\xd4\x15\x40\xf3\x99\xab\xdc\x4b\x14\x4d\x30\x95\x32\x10\xa7\x97\xe8\x09\x07\x82\x2f\x7b\x85\x54\xc0\x2f\xc2\xab\x4a\xe0\xda\x1c\x44\x2c\xac\x5b\x1a\xa1\xac\x2c\xde\x11\xda\xa9\x21\xea\x83\xb0\x8e\xb5\xa5\x70\x61\x39\x29\xee\x08\x0a\x23\xff\xa6\x3e\xad\x30\xef\x13\xaa\x37\x38\x0d\x42\x71\x82\x55\x97\x82\xfa\x0b\xfd\x09\x44\xc2\xe1\x88\xb6\xad\x0b\xd1\x6d\xa6\x4b\xe4\x7e\xe6\x33\xa9\xce\xa4\x2e\xf9\xe5\x8e\x27\x72\xa5\x2d\xd1\xbb\x17\xf6\xf8\x1a\xc1\x5f\x1a\xf7\x04\xad\xad\xed\x15\xba\x38\x80\xd9\x66\x89\x50\x23\x83\x22\xe2\x17\x00\xe7\x8b\x41\xaa\x48\x86\x82\xdf\xcb\x18\xa1\x13\x32\xb6\x20\x56\x4d\x79\x07\xc9\xf7\x24\xd5\x3a\x22\x3b\xb4\x26\x0b\xdb\xb5\xd9\x8e\xd3\x7f\x9a\x5e\x8e\x91\x9e\xe1\xaf\x6d\x2e\x8b\xe7\x63\x54\xd5\xbc\x56\x83\x51\xde\xb3\x96\x97\x26\x47\x64\x6e\xfc\xfb\xb0\xd7\xb0\x34\x19\xde\xc0\x3b\x11\x5b\xbc\x81\xcf\xbe\x8d\xef\xc9\x78\x35\xf5\x5f\x9f\xf3\xe9\x90\xf2\xee\xe5\x37\xc7\x1e\x71\x7b\xe2\xf6\xcd\xcd\x85\xb5\x76\x5c\xdb\x9e\xfd\xc4\x26\xec\xbe\xc7\xbf\xef\xf1\x2f\x3f\x78\xe1\x1e\x7f\x3e\x4d\xb8\x98\xdf\xf5\x16\xf8\xa9\x79\x50\xff\xcb\x82\x5f\xfd\x2f\x0b\xb6\xc2\xb6\xfd\xae\xa0\x82\x47\xfc\x56\xee\x2a\x9e\x34\x90\xd2\xff\x88\xa1\xff\x11\x43\xff\x23\x86\x17\xfd\x11\x43\x43\xa3\x56\xad\x0a\x57\x02\xbb\xf8\xd2\xff\x7c\xa1\x44\xac\x75\xda\x50\xaa\x5e\xfa\x26\x5b\x5d\x18\x43\x9e\x81\xc2\x3f\xff\x35\xf8\x77\x00\x00\x00\xff\xff\x9b\x5d\xe6\x28\xe0\x65\x00\x00"),
 		},
 		"/crd/bases/camel.apache.org_integrations.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "camel.apache.org_integrations.yaml",
diff --git a/pkg/trait/environment.go b/pkg/trait/environment.go
index b4ebfa8de..ead510f28 100644
--- a/pkg/trait/environment.go
+++ b/pkg/trait/environment.go
@@ -48,7 +48,7 @@ const (
 	//   pkg/trait/environment.go:41: G101: Potential hardcoded credentials (gosec)
 	//	   envVarMountPathSecrets     = "CAMEL_K_MOUNT_PATH_SECRETS"
 	//
-	// nolint: gosec
+	// #nosec G101
 	envVarMountPathSecrets = "CAMEL_K_MOUNT_PATH_SECRETS"
 )
 
diff --git a/pkg/trait/openapi.go b/pkg/trait/openapi.go
index 36a43e9a2..6a7a9edd1 100644
--- a/pkg/trait/openapi.go
+++ b/pkg/trait/openapi.go
@@ -192,7 +192,7 @@ func (t *openAPITrait) createNewOpenAPIConfigMap(e *Environment, resource v1.Res
 	in := path.Join(tmpDir, resource.Name)
 	out := path.Join(tmpDir, "openapi-dsl.xml")
 
-	err = ioutil.WriteFile(in, content, 0o644)
+	err = ioutil.WriteFile(in, content, 0o400)
 	if err != nil {
 		return err
 	}
@@ -239,7 +239,7 @@ func (t *openAPITrait) createNewOpenAPIConfigMap(e *Environment, resource v1.Res
 		return err
 	}
 
-	content, err = ioutil.ReadFile(out)
+	content, err = util.ReadFile(out)
 	if err != nil {
 		return err
 	}
diff --git a/pkg/util/camel/catalog.go b/pkg/util/camel/catalog.go
index 97c71a4c6..531e7914e 100644
--- a/pkg/util/camel/catalog.go
+++ b/pkg/util/camel/catalog.go
@@ -23,6 +23,8 @@ import (
 	"os"
 	"path"
 
+	"github.com/apache/camel-k/pkg/util"
+
 	yaml2 "gopkg.in/yaml.v2"
 
 	k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
@@ -137,7 +139,7 @@ func GenerateCatalogCommon(
 		return nil, err
 	}
 
-	content, err := ioutil.ReadFile(path.Join(tmpDir, "catalog.yaml"))
+	content, err := util.ReadFile(path.Join(tmpDir, "catalog.yaml"))
 	if err != nil {
 		return nil, err
 	}
diff --git a/pkg/util/digest/digest.go b/pkg/util/digest/digest.go
index 6b2bf599f..1e62e0236 100644
--- a/pkg/util/digest/digest.go
+++ b/pkg/util/digest/digest.go
@@ -18,14 +18,14 @@ limitations under the License.
 package digest
 
 import (
-	// nolint: gosec
+	// this is needed to generate an SHA1 sum for Jars
+	// #nosec G505
 	"crypto/sha1"
 	"crypto/sha256"
 	"encoding/base64"
 	"encoding/json"
 	"fmt"
 	"io"
-	"os"
 	"path"
 	"sort"
 	"strconv"
@@ -263,17 +263,21 @@ func sortedTraitAnnotationsKeys(it *v1.Integration) []string {
 func ComputeSHA1(elem ...string) (string, error) {
 	file := path.Join(elem...)
 
-	f, err := os.Open(file)
-	if err != nil {
-		return "", err
-	}
-	defer f.Close()
-
-	// nolint: gosec
+	// #nosec G401
 	h := sha1.New()
-	if _, err := io.Copy(h, f); err != nil {
-		return "", err
-	}
 
-	return base64.StdEncoding.EncodeToString(h.Sum(nil)), nil
+	err := util.WithFileReader(file, func(file io.Reader) error {
+		if _, err := io.Copy(h, file); err != nil {
+			return err
+		}
+
+		return nil
+	})
+
+	var sum string
+
+	if err != nil {
+		sum = base64.StdEncoding.EncodeToString(h.Sum(nil))
+	}
+	return sum, err
 }
diff --git a/pkg/util/kubernetes/log/annotation_scraper.go b/pkg/util/kubernetes/log/annotation_scraper.go
index 08dfebf02..ff5924ade 100644
--- a/pkg/util/kubernetes/log/annotation_scraper.go
+++ b/pkg/util/kubernetes/log/annotation_scraper.go
@@ -26,6 +26,8 @@ import (
 	"sync/atomic"
 	"time"
 
+	"go.uber.org/multierr"
+
 	klog "github.com/apache/camel-k/pkg/util/log"
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -61,8 +63,9 @@ func (s *SelectorScraper) Start(ctx context.Context) *bufio.Reader {
 	bufPipeIn := bufio.NewReader(pipeIn)
 	bufPipeOut := bufio.NewWriter(pipeOut)
 	closeFun := func() error {
-		bufPipeOut.Flush()
-		return pipeOut.Close()
+		return multierr.Append(
+			bufPipeOut.Flush(),
+			pipeOut.Close())
 	}
 	go s.periodicSynchronize(ctx, bufPipeOut, closeFun)
 	return bufPipeIn
@@ -152,7 +155,10 @@ func (s *SelectorScraper) addPodScraper(ctx context.Context, podName string, out
 				s.L.Error(err, "Cannot write to output")
 				return
 			}
-			out.Flush()
+			if err := out.Flush(); err != nil {
+				s.L.Error(err, "Cannot flush output")
+				return
+			}
 			if podCtx.Err() != nil {
 				return
 			}
diff --git a/pkg/util/kubernetes/log/pod_scraper.go b/pkg/util/kubernetes/log/pod_scraper.go
index 19164a900..202c812d6 100644
--- a/pkg/util/kubernetes/log/pod_scraper.go
+++ b/pkg/util/kubernetes/log/pod_scraper.go
@@ -23,6 +23,8 @@ import (
 	"io"
 	"time"
 
+	"go.uber.org/multierr"
+
 	klog "github.com/apache/camel-k/pkg/util/log"
 	"github.com/pkg/errors"
 	corev1 "k8s.io/api/core/v1"
@@ -65,8 +67,9 @@ func (s *PodScraper) Start(ctx context.Context) *bufio.Reader {
 	bufPipeIn := bufio.NewReader(pipeIn)
 	bufPipeOut := bufio.NewWriter(pipeOut)
 	closeFun := func() error {
-		bufPipeOut.Flush()
-		return pipeOut.Close()
+		return multierr.Append(
+			bufPipeOut.Flush(),
+			pipeOut.Close())
 	}
 	go s.doScrape(ctx, bufPipeOut, closeFun)
 	return bufPipeIn
@@ -101,7 +104,11 @@ func (s *PodScraper) doScrape(ctx context.Context, out *bufio.Writer, clientClos
 		if err != nil {
 			break
 		}
-		out.Flush()
+
+		err = out.Flush()
+		if err != nil {
+			break
+		}
 	}
 
 	s.handleAndRestart(ctx, err, 5*time.Second, out, clientCloser)
diff --git a/pkg/util/kubernetes/sanitize.go b/pkg/util/kubernetes/sanitize.go
index c7f5fed0b..7e35f5740 100644
--- a/pkg/util/kubernetes/sanitize.go
+++ b/pkg/util/kubernetes/sanitize.go
@@ -47,6 +47,6 @@ func SanitizeLabel(name string) string {
 	return name
 }
 
-func isDisallowedStartEndChar(rune rune) bool {
-	return !unicode.IsLetter(rune) && !unicode.IsNumber(rune)
+func isDisallowedStartEndChar(r rune) bool {
+	return !unicode.IsLetter(r) && !unicode.IsNumber(r)
 }
diff --git a/pkg/util/maven/maven_command.go b/pkg/util/maven/maven_command.go
index b4ec58ec2..e42d9cd90 100644
--- a/pkg/util/maven/maven_command.go
+++ b/pkg/util/maven/maven_command.go
@@ -198,7 +198,7 @@ func generateProjectStructure(context Context, project Project) error {
 	}
 
 	if context.SettingsContent != nil {
-		if err := util.WriteFileWithContent(context.Path, "settings.xml", context.SettingsContent); err != nil {
+		if err := util.WriteFileWithContent(path.Join(context.Path, "settings.xml"), context.SettingsContent); err != nil {
 			return err
 		}
 	}
@@ -221,7 +221,7 @@ func generateProjectStructure(context Context, project Project) error {
 		if len(bytes) > 0 {
 			Log.Infof("write entry: %s (%d bytes)", k, len(bytes))
 
-			err = util.WriteFileWithContent(context.Path, k, bytes)
+			err = util.WriteFileWithContent(path.Join(context.Path, k), bytes)
 			if err != nil {
 				return err
 			}
diff --git a/pkg/util/maven/maven_log.go b/pkg/util/maven/maven_log.go
index 2d5fc7213..c7f6b6b74 100644
--- a/pkg/util/maven/maven_log.go
+++ b/pkg/util/maven/maven_log.go
@@ -47,10 +47,9 @@ const (
 
 var mavenLogger = log.WithName("maven.build")
 
-func parseLog(line string) (mavenLog mavenLog, error error) {
-	error = json.Unmarshal([]byte(line), &mavenLog)
-
-	return mavenLog, error
+func parseLog(line string) (l mavenLog, err error) {
+	err = json.Unmarshal([]byte(line), &l)
+	return
 }
 
 func normalizeLog(mavenLog mavenLog) {
diff --git a/pkg/util/olm/operator.go b/pkg/util/olm/operator.go
index 23ca3fd07..9028dc6c9 100644
--- a/pkg/util/olm/operator.go
+++ b/pkg/util/olm/operator.go
@@ -27,6 +27,8 @@ import (
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/kubectl/pkg/cmd/set/env"
 
+	k8sclient "k8s.io/client-go/kubernetes"
+
 	runtime "sigs.k8s.io/controller-runtime/pkg/client"
 
 	operatorsv1 "github.com/operator-framework/api/pkg/operators/v1"
@@ -344,7 +346,7 @@ func findOperatorGroup(ctx context.Context, client client.Client, namespace stri
 	return nil, nil
 }
 
-func fillDefaults(o Options, client client.Client) (Options, error) {
+func fillDefaults(o Options, client k8sclient.Interface) (Options, error) {
 	if o.OperatorName == "" {
 		o.OperatorName = DefaultOperatorName
 	}
diff --git a/pkg/util/util.go b/pkg/util/util.go
index 97b93b385..745ac7c1b 100644
--- a/pkg/util/util.go
+++ b/pkg/util/util.go
@@ -26,10 +26,13 @@ import (
 	"io/ioutil"
 	"os"
 	"path"
+	"path/filepath"
 	"regexp"
 	"sort"
 	"strings"
 
+	"go.uber.org/multierr"
+
 	yaml2 "gopkg.in/yaml.v2"
 
 	"github.com/pkg/errors"
@@ -207,67 +210,56 @@ func EncodeXML(content interface{}) ([]byte, error) {
 	return w.Bytes(), nil
 }
 
-func CopyFile(src, dst string) (int64, error) {
+func CopyFile(src, dst string) (nBytes int64, err error) {
 	stat, err := os.Stat(src)
 	if err != nil {
-		return 0, err
+		return
 	}
 
 	if !stat.Mode().IsRegular() {
-		return 0, fmt.Errorf("%s is not a regular file", src)
+		err = fmt.Errorf("%s is not a regular file", src)
+		return
 	}
 
-	source, err := os.Open(src)
+	source, err := Open(src)
 	if err != nil {
-		return 0, err
+		return
 	}
-	defer source.Close()
 
-	err = os.MkdirAll(path.Dir(dst), 0o777)
+	defer func() {
+		err = Close(err, source)
+	}()
+
+	// we need to have group and other to be able to access the directory as the user
+	// in the container may not be the same as the one owning the files
+	//
+	// #nosec G301
+	err = os.MkdirAll(path.Dir(dst), 0o755)
 	if err != nil {
-		return 0, err
+		return
 	}
 
-	destination, err := os.OpenFile(dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, stat.Mode())
+	destination, err := OpenFile(dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, stat.Mode())
 	if err != nil {
-		return 0, err
+		return
 	}
 
-	defer destination.Close()
-	nBytes, err := io.Copy(destination, source)
+	defer func() {
+		err = Close(err, destination)
+	}()
 
-	return nBytes, err
-}
+	nBytes, err = io.Copy(destination, source)
 
-func WriteFileWithContent(buildDir string, relativePath string, content []byte) error {
-	filePath := path.Join(buildDir, relativePath)
-	fileDir := path.Dir(filePath)
-	// Create dir if not present
-	err := os.MkdirAll(fileDir, 0o777)
-	if err != nil {
-		return errors.Wrap(err, "could not create dir for file "+relativePath)
-	}
-	// Create file
-	file, err := os.Create(filePath)
-	if err != nil {
-		return errors.Wrap(err, "could not create file "+relativePath)
-	}
-	defer file.Close()
-
-	_, err = file.Write(content)
-	if err != nil {
-		return errors.Wrap(err, "could not write to file "+relativePath)
-	}
-	return nil
+	return
 }
 
-func WriteFileWithBytesMarshallerContent(buildDir string, relativePath string, content BytesMarshaller) error {
+func WriteFileWithBytesMarshallerContent(basePath string, filePath string, content BytesMarshaller) error {
 	data, err := content.MarshalBytes()
 	if err != nil {
 		return err
 	}
 
-	return WriteFileWithContent(buildDir, relativePath, data)
+	return WriteFileWithContent(path.Join(basePath, filePath), data)
 }
 
 func FindAllDistinctStringSubmatch(data string, regexps ...*regexp.Regexp) []string {
@@ -319,18 +311,22 @@ func DirectoryExists(directory string) (bool, error) {
 	return info.IsDir(), nil
 }
 
-func DirectoryEmpty(directory string) (bool, error) {
-	f, err := os.Open(directory)
+func DirectoryEmpty(directory string) (ok bool, err error) {
+	f, err := Open(directory)
 	if err != nil {
-		return false, err
+		return
 	}
-	defer f.Close()
+
+	defer func() {
+		err = Close(err, f)
+	}()
 
 	_, err = f.Readdirnames(1)
 	if errors.Is(err, io.EOF) {
-		return true, nil
+		ok = true
 	}
-	return false, err
+
+	return
 }
 
 func CreateDirectory(directory string) error {
@@ -342,7 +338,8 @@ func CreateDirectory(directory string) error {
 		}
 
 		if !directoryExists {
-			err := os.MkdirAll(directory, 0o777)
+			// #nosec G301
+			err := os.MkdirAll(directory, 0o755)
 			if err != nil {
 				return err
 			}
@@ -434,7 +431,7 @@ func MapToYAML(src map[string]interface{}) ([]byte, error) {
 }
 
 func WriteToFile(filePath string, fileContents string) error {
-	err := ioutil.WriteFile(filePath, []byte(fileContents), 0o777)
+	err := ioutil.WriteFile(filePath, []byte(fileContents), 0o400)
 	if err != nil {
 		return errors.Errorf("error writing file: %v", filePath)
 	}
@@ -486,7 +483,7 @@ func CreateLocalPropertiesDirectory() error {
 	}
 
 	if !directoryExists {
-		err := os.MkdirAll(GetLocalPropertiesDir(), 0o777)
+		err := os.MkdirAll(GetLocalPropertiesDir(), 0o700)
 		if err != nil {
 			return err
 		}
@@ -506,7 +503,7 @@ func CreateLocalDependenciesDirectory() error {
 	}
 
 	if !directoryExists {
-		err := os.MkdirAll(GetLocalDependenciesDir(), 0o777)
+		err := os.MkdirAll(GetLocalDependenciesDir(), 0o700)
 		if err != nil {
 			return err
 		}
@@ -526,7 +523,7 @@ func CreateLocalRoutesDirectory() error {
 	}
 
 	if !directoryExists {
-		err := os.MkdirAll(GetLocalRoutesDir(), 0o777)
+		err := os.MkdirAll(GetLocalRoutesDir(), 0o700)
 		if err != nil {
 			return err
 		}
@@ -546,7 +543,7 @@ func CreateLocalQuarkusDirectory() error {
 	}
 
 	if !directoryExists {
-		err := os.MkdirAll(GetLocalQuarkusDir(), 0o777)
+		err := os.MkdirAll(GetLocalQuarkusDir(), 0o700)
 		if err != nil {
 			return err
 		}
@@ -566,7 +563,7 @@ func CreateLocalAppDirectory() error {
 	}
 
 	if !directoryExists {
-		err := os.MkdirAll(GetLocalAppDir(), 0o777)
+		err := os.MkdirAll(GetLocalAppDir(), 0o700)
 		if err != nil {
 			return err
 		}
@@ -586,7 +583,7 @@ func CreateLocalLibDirectory() error {
 	}
 
 	if !directoryExists {
-		err := os.MkdirAll(GetLocalLibDir(), 0o777)
+		err := os.MkdirAll(GetLocalLibDir(), 0o700)
 		if err != nil {
 			return err
 		}
@@ -761,3 +758,81 @@ func CopyAppFile(localDependenciesDirectory string, localAppDirectory string) er
 
 	return nil
 }
+
+// Open a safe wrapper of os.Open.
+func Open(name string) (*os.File, error) {
+	return os.Open(filepath.Clean(name))
+}
+
+// OpenFile a safe wrapper of os.OpenFile.
+func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) {
+	// #nosec G304
+	return os.OpenFile(filepath.Clean(name), flag, perm)
+}
+
+// ReadFile a safe wrapper of os.ReadFile.
+func ReadFile(filename string) ([]byte, error) {
+	return os.ReadFile(filepath.Clean(filename))
+}
+
+func Close(err error, closer io.Closer) error {
+	return multierr.Append(err, closer.Close())
+}
+
+// WithFile a safe wrapper to process a file.
+func WithFile(name string, flag int, perm os.FileMode, consumer func(file *os.File) error) error {
+	// #nosec G304
+	file, err := os.OpenFile(filepath.Clean(name), flag, perm)
+	if err == nil {
+		err = consumer(file)
+	}
+
+	return Close(err, file)
+}
+
+// WithFileReader a safe wrapper to process a file.
+func WithFileReader(name string, consumer func(reader io.Reader) error) error {
+	// #nosec G304
+	file, err := os.Open(filepath.Clean(name))
+	if err == nil {
+		err = consumer(file)
+	}
+
+	return Close(err, file)
+}
+
+// WithFileContent a safe wrapper to process a file content.
+func WithFileContent(name string, consumer func(file *os.File, data []byte) error) error {
+	return WithFile(name, os.O_RDWR|os.O_CREATE, 0o644, func(file *os.File) error {
+		content, err := ReadFile(name)
+		if err != nil {
+			return err
+		}
+
+		return consumer(file, content)
+	})
+}
+
+// WriteFileWithContent a safe wrapper to write content to a file.
+func WriteFileWithContent(filePath string, content []byte) error {
+	fileDir := path.Dir(filePath)
+
+	// Create dir if not present
+	err := os.MkdirAll(fileDir, 0o700)
+	if err != nil {
+		return errors.Wrap(err, "could not create dir for file "+filePath)
+	}
+
+	// Create file
+	file, err := os.Create(filePath)
+	if err != nil {
+		return errors.Wrap(err, "could not create file "+filePath)
+	}
+
+	_, err = file.Write(content)
+	if err != nil {
+		err = errors.Wrap(err, "could not write to file "+filePath)
+	}
+
+	return Close(err, file)
+}


Test patch:
diff --git a/addons/strimzi/strimzi_test.go b/addons/strimzi/strimzi_test.go
index 34b9d0894..1ef679d04 100644
--- a/addons/strimzi/strimzi_test.go
+++ b/addons/strimzi/strimzi_test.go
@@ -58,7 +58,7 @@ func TestStrimziDirect(t *testing.T) {
 		}),
 	}
 
-	binding, err := StrimziBindingProvider{}.Translate(bindingContext, bindings.EndpointContext{
+	binding, err := BindingProvider{}.Translate(bindingContext, bindings.EndpointContext{
 		Type: v1alpha1.EndpointTypeSink,
 	}, endpoint)
 	assert.NoError(t, err)
@@ -100,7 +100,7 @@ func TestStrimziLookup(t *testing.T) {
 	}
 
 	client := fake.NewSimpleClientset(&cluster, &topic)
-	provider := StrimziBindingProvider{
+	provider := BindingProvider{
 		Client: client,
 	}
 
diff --git a/pkg/cmd/modeline_test.go b/pkg/cmd/modeline_test.go
index cc18d2929..966a73772 100644
--- a/pkg/cmd/modeline_test.go
+++ b/pkg/cmd/modeline_test.go
@@ -37,7 +37,7 @@ func TestModelineRunSimple(t *testing.T) {
 		// camel-k: dependency=mvn:org.my:lib:1.0
 	`
 	fileName := path.Join(dir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -68,7 +68,7 @@ func TestModelineRunChain(t *testing.T) {
 		// camel-k: dependency=mvn:org.my:lib:2.0
 	`
 	fileName := path.Join(dir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", "-d", "mvn:org.my:lib2:1.0", fileName})
@@ -86,14 +86,14 @@ func TestModelineRunMultipleFiles(t *testing.T) {
 		// camel-k: dependency=mvn:org.my:lib1:3.0
 	`
 	fileName := path.Join(dir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	file2 := `
 		// camel-k: dependency=mvn:org.my:lib2:3.0
 	`
 	fileName2 := path.Join(dir, "ext.groovy")
-	err = ioutil.WriteFile(fileName2, []byte(file2), 0o777)
+	err = ioutil.WriteFile(fileName2, []byte(file2), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName, fileName2})
@@ -108,14 +108,14 @@ func TestModelineRunProperty(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: property=my-prop=my-val
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -130,7 +130,7 @@ func TestModelineRunDuplicatedProperties(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
@@ -139,7 +139,7 @@ func TestModelineRunDuplicatedProperties(t *testing.T) {
 		// camel-k: property=foo=bar
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName, "-p", "prop1=true", "--property", "prop2=true"})
@@ -154,7 +154,7 @@ func TestModelineRunDuplicatedBuildProperties(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
@@ -163,7 +163,7 @@ func TestModelineRunDuplicatedBuildProperties(t *testing.T) {
 		// camel-k: build-property=foo=bar
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{
@@ -184,21 +184,21 @@ func TestModelineRunPropertyFiles(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: property=file:application.properties
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	propFile := `
 		a=b
 	`
 	propFileName := path.Join(subDir, "application.properties")
-	err = ioutil.WriteFile(propFileName, []byte(propFile), 0o777)
+	err = ioutil.WriteFile(propFileName, []byte(propFile), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -213,14 +213,14 @@ func TestModelineRunBuildProperty(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: build-property=my-build-prop=my-val
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -235,21 +235,21 @@ func TestModelineRunBuildPropertyFiles(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: build-property=file:application.properties
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	propFile := `
 		a=b
 	`
 	propFileName := path.Join(subDir, "application.properties")
-	err = ioutil.WriteFile(propFileName, []byte(propFile), 0o777)
+	err = ioutil.WriteFile(propFileName, []byte(propFile), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -264,7 +264,7 @@ func TestModelineRunDuplicateTraits(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
@@ -273,7 +273,7 @@ func TestModelineRunDuplicateTraits(t *testing.T) {
 		// camel-k: trait=foo=bar
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName, "-t", "trait1=true", "--trait", "trait2=true"})
@@ -288,14 +288,14 @@ func TestModelineRunConfigConfigmap(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: config=configmap:my-cm
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -310,14 +310,14 @@ func TestModelineRunConfigSecret(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: config=secret:my-secret
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -332,21 +332,21 @@ func TestModelineRunConfigFile(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: config=file:application.properties
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	propFile := `
 		a=b
 	`
 	propFileName := path.Join(subDir, "application.properties")
-	err = ioutil.WriteFile(propFileName, []byte(propFile), 0o777)
+	err = ioutil.WriteFile(propFileName, []byte(propFile), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -361,14 +361,14 @@ func TestModelineRunResourceConfigmap(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: resource=configmap:my-cm
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -383,14 +383,14 @@ func TestModelineRunResourceSecret(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: resource=secret:my-secret
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -405,21 +405,21 @@ func TestModelineRunResourceFile(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	subDir := path.Join(dir, "sub")
-	err = os.Mkdir(subDir, 0o777)
+	err = os.Mkdir(subDir, 0o700)
 	assert.NoError(t, err)
 
 	file := `
 		// camel-k: resource=file:application.properties
 	`
 	fileName := path.Join(subDir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	propFile := `
 		a=b
 	`
 	propFileName := path.Join(subDir, "application.properties")
-	err = ioutil.WriteFile(propFileName, []byte(propFile), 0o777)
+	err = ioutil.WriteFile(propFileName, []byte(propFile), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
@@ -437,7 +437,7 @@ func TestModelineInspectSimple(t *testing.T) {
 		// camel-k: dependency=mvn:org.my:lib:1.0
 	`
 	fileName := path.Join(dir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "local", "inspect", fileName})
@@ -456,7 +456,7 @@ func TestModelineInspectMultipleDeps(t *testing.T) {
 		// camel-k: dependency=camel-k:camel-dep
 	`
 	fileName := path.Join(dir, "simple.groovy")
-	err = ioutil.WriteFile(fileName, []byte(file), 0o777)
+	err = ioutil.WriteFile(fileName, []byte(file), 0o400)
 	assert.NoError(t, err)
 
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "local", "inspect", fileName})
diff --git a/pkg/cmd/run_help_test.go b/pkg/cmd/run_help_test.go
index 11645ff73..0763c063e 100644
--- a/pkg/cmd/run_help_test.go
+++ b/pkg/cmd/run_help_test.go
@@ -199,7 +199,7 @@ func TestExtractProperties_FromFile(t *testing.T) {
 	key=value
 	#key2=value2
 	my.key=value
-	`), 0o644))
+	`), 0o400))
 
 	props, err := extractProperties("file:" + tmpFile1.Name())
 	assert.Nil(t, err)
@@ -223,7 +223,7 @@ func TestExtractPropertiesFromFileAndSingleValue(t *testing.T) {
 	key=value
 	#key2=value2
 	my.key=value
-	`), 0o644))
+	`), 0o400))
 
 	properties := []string{"key=override", "file:" + tmpFile1.Name(), "my.key = override"}
 	props, err := mergePropertiesWithPrecedence(properties)
diff --git a/pkg/cmd/run_test.go b/pkg/cmd/run_test.go
index 0aaec8e5e..67c0453aa 100644
--- a/pkg/cmd/run_test.go
+++ b/pkg/cmd/run_test.go
@@ -255,7 +255,7 @@ func TestAddPropertyFile(t *testing.T) {
 	}
 
 	assert.Nil(t, tmpFile.Close())
-	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(TestPropertyFileContent), 0o644))
+	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(TestPropertyFileContent), 0o400))
 
 	properties, err := convertToTraitParameter("file:"+tmpFile.Name(), "trait.properties")
 	assert.Nil(t, err)
@@ -273,7 +273,7 @@ func TestRunPropertyFileFlag(t *testing.T) {
 	}
 
 	assert.Nil(t, tmpFile.Close())
-	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(TestPropertyFileContent), 0o644))
+	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(TestPropertyFileContent), 0o400))
 
 	runCmdOptions, rootCmd, _ := initializeRunCmdOptions(t)
 	_, errExecute := test.ExecuteCommand(rootCmd, cmdRun,
diff --git a/pkg/cmd/util_content_test.go b/pkg/cmd/util_content_test.go
index 155fa108c..ae34b1d2f 100644
--- a/pkg/cmd/util_content_test.go
+++ b/pkg/cmd/util_content_test.go
@@ -37,7 +37,7 @@ func TestRawBinaryContentType(t *testing.T) {
 		t.Error(err)
 	}
 	assert.Nil(t, tmpFile.Close())
-	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte{1, 2, 3, 4, 5, 6}, 0o644))
+	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte{1, 2, 3, 4, 5, 6}, 0o400))
 
 	data, contentType, err := loadRawContent(tmpFile.Name())
 	assert.Nil(t, err)
@@ -52,7 +52,7 @@ func TestRawApplicationContentType(t *testing.T) {
 		t.Error(err)
 	}
 	assert.Nil(t, tmpFile.Close())
-	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(`{"hello":"world"}`), 0o644))
+	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(`{"hello":"world"}`), 0o400))
 
 	data, contentType, err := loadRawContent(tmpFile.Name())
 	assert.Nil(t, err)
@@ -67,7 +67,7 @@ func TestTextContentType(t *testing.T) {
 		t.Error(err)
 	}
 	assert.Nil(t, tmpFile.Close())
-	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(`{"hello":"world"}`), 0o644))
+	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(`{"hello":"world"}`), 0o400))
 
 	data, contentType, compressed, err := loadTextContent(tmpFile.Name(), false)
 	assert.Nil(t, err)
@@ -83,7 +83,7 @@ func TestTextCompressed(t *testing.T) {
 		t.Error(err)
 	}
 	assert.Nil(t, tmpFile.Close())
-	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(`{"hello":"world"}`), 0o644))
+	assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte(`{"hello":"world"}`), 0o400))
 
 	data, contentType, compressed, err := loadTextContent(tmpFile.Name(), true)
 	assert.Nil(t, err)
diff --git a/pkg/cmd/util_dependencies_test.go b/pkg/cmd/util_dependencies_test.go
index efa433577..2f44490aa 100644
--- a/pkg/cmd/util_dependencies_test.go
+++ b/pkg/cmd/util_dependencies_test.go
@@ -34,7 +34,7 @@ func TestValidatePropertyFiles_ShouldSucceed(t *testing.T) {
 	}
 
 	assert.Nil(t, tmpFile1.Close())
-	assert.Nil(t, ioutil.WriteFile(tmpFile1.Name(), []byte("key=value"), 0o644))
+	assert.Nil(t, ioutil.WriteFile(tmpFile1.Name(), []byte("key=value"), 0o400))
 
 	inputValues := []string{tmpFile1.Name()}
 	err = validatePropertyFiles(inputValues)
@@ -50,7 +50,7 @@ func TestValidatePropertyFiles_ShouldFailNotAPropertiesFile(t *testing.T) {
 	}
 
 	assert.Nil(t, tmpFile1.Close())
-	assert.Nil(t, ioutil.WriteFile(tmpFile1.Name(), []byte("key=value"), 0o644))
+	assert.Nil(t, ioutil.WriteFile(tmpFile1.Name(), []byte("key=value"), 0o400))
 
 	inputValues := []string{tmpFile1.Name()}
 	err = validatePropertyFiles(inputValues)
diff --git a/pkg/trait/route_test.go b/pkg/trait/route_test.go
index 3bf5306f1..96c67a4c4 100644
--- a/pkg/trait/route_test.go
+++ b/pkg/trait/route_test.go
@@ -90,9 +90,14 @@ pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H
 	tlsKeySecretName        = "tls-test"
 	tlsKeySecretOnlyKeyName = "tls.key"
 
-	tlsMultipleSecretsName     = "tls-multiple-test"
+	// Potential hardcoded credentials
+	// #nosec G101
+	tlsMultipleSecretsName = "tls-multiple-test"
+	// #nosec G101
 	tlsMultipleSecretsCert1Key = "cert1.crt"
+	// #nosec G101
 	tlsMultipleSecretsCert2Key = "cert2.crt"
+	// #nosec G101
 	tlsMultipleSecretsCert3Key = "cert3.crt"
 )
 
diff --git a/pkg/util/bindings/bindings_test.go b/pkg/util/bindings/bindings_test.go
index 5fde9a5a5..f9c101746 100644
--- a/pkg/util/bindings/bindings_test.go
+++ b/pkg/util/bindings/bindings_test.go
@@ -202,7 +202,8 @@ func TestBindings(t *testing.T) {
 		},
 	}
 
-	for i, tc := range testcases {
+	for i := range testcases {
+		tc := testcases[i]
 		t.Run(fmt.Sprintf("test-%d-%s", i, tc.uri), func(t *testing.T) {
 			ctx, cancel := context.WithCancel(context.Background())
 			defer cancel()
diff --git a/pkg/util/bindings/kamelet_test.go b/pkg/util/bindings/kamelet_test.go
index f29099c5e..b43fd4d7b 100644
--- a/pkg/util/bindings/kamelet_test.go
+++ b/pkg/util/bindings/kamelet_test.go
@@ -57,7 +57,8 @@ func TestKameletBindingProvider(t *testing.T) {
 		},
 	}
 
-	for i, tc := range testcases {
+	for i := range testcases {
+		tc := testcases[i]
 		t.Run(fmt.Sprintf("test-%d-%s", i, tc.uri), func(t *testing.T) {
 			ctx, cancel := context.WithCancel(context.Background())
 			defer cancel()
diff --git a/pkg/util/source/inspector_groovy_test.go b/pkg/util/source/inspector_groovy_test.go
index 8d90dfe30..7f091f3b8 100644
--- a/pkg/util/source/inspector_groovy_test.go
+++ b/pkg/util/source/inspector_groovy_test.go
@@ -71,7 +71,8 @@ func TestGroovyKamelet(t *testing.T) {
 		},
 	}
 
-	for i, test := range tc {
+	for i := range tc {
+		test := tc[i]
 		t.Run(fmt.Sprintf("TestGroovyKamelet-%d", i), func(t *testing.T) {
 			code := v1.SourceSpec{
 				DataSpec: v1.DataSpec{
diff --git a/pkg/util/source/inspector_java_script_test.go b/pkg/util/source/inspector_java_script_test.go
index 58596a54a..f9e1634a6 100644
--- a/pkg/util/source/inspector_java_script_test.go
+++ b/pkg/util/source/inspector_java_script_test.go
@@ -52,7 +52,8 @@ func TestJavaScriptKamelet(t *testing.T) {
 		},
 	}
 
-	for i, test := range tc {
+	for i := range tc {
+		test := tc[i]
 		t.Run(fmt.Sprintf("TestJavaScriptKamelet-%d", i), func(t *testing.T) {
 			code := v1.SourceSpec{
 				DataSpec: v1.DataSpec{
diff --git a/pkg/util/source/inspector_java_source_test.go b/pkg/util/source/inspector_java_source_test.go
index 22cae7a43..353643130 100644
--- a/pkg/util/source/inspector_java_source_test.go
+++ b/pkg/util/source/inspector_java_source_test.go
@@ -52,7 +52,8 @@ func TestJavaSourceKamelet(t *testing.T) {
 		},
 	}
 
-	for i, test := range tc {
+	for i := range tc {
+		test := tc[i]
 		t.Run(fmt.Sprintf("TestJavaSourceKamelet-%d", i), func(t *testing.T) {
 			code := v1.SourceSpec{
 				DataSpec: v1.DataSpec{
diff --git a/pkg/util/source/inspector_kotlin_test.go b/pkg/util/source/inspector_kotlin_test.go
index 896473163..d94ee7fd9 100644
--- a/pkg/util/source/inspector_kotlin_test.go
+++ b/pkg/util/source/inspector_kotlin_test.go
@@ -52,7 +52,8 @@ func TestKotlinKamelet(t *testing.T) {
 		},
 	}
 
-	for i, test := range tc {
+	for i := range tc {
+		test := tc[i]
 		t.Run(fmt.Sprintf("TestKotlinKamelet-%d", i), func(t *testing.T) {
 			code := v1.SourceSpec{
 				DataSpec: v1.DataSpec{
diff --git a/pkg/util/source/inspector_xml_test.go b/pkg/util/source/inspector_xml_test.go
index 7b3b8de16..52445e820 100644
--- a/pkg/util/source/inspector_xml_test.go
+++ b/pkg/util/source/inspector_xml_test.go
@@ -61,7 +61,8 @@ func TestXMLKamelet(t *testing.T) {
 		},
 	}
 
-	for i, test := range tc {
+	for i := range tc {
+		test := tc[i]
 		t.Run(fmt.Sprintf("TestXMLKamelet-%d", i), func(t *testing.T) {
 			code := v1.SourceSpec{
 				DataSpec: v1.DataSpec{
diff --git a/pkg/util/source/inspector_yaml_test.go b/pkg/util/source/inspector_yaml_test.go
index ae082c417..88d77d5ba 100644
--- a/pkg/util/source/inspector_yaml_test.go
+++ b/pkg/util/source/inspector_yaml_test.go
@@ -126,7 +126,8 @@ func TestYAMLDependencies(t *testing.T) {
 			},
 		},
 	}
-	for _, test := range tests {
+	for i := range tests {
+		test := tests[i]
 		t.Run(test.name, func(t *testing.T) {
 			code := v1.SourceSpec{
 				DataSpec: v1.DataSpec{
@@ -329,7 +330,8 @@ func TestYAMLJson(t *testing.T) {
 		},
 	}
 
-	for i, test := range tc {
+	for i := range tc {
+		test := tc[i]
 		t.Run(fmt.Sprintf("%s-%d", test.dependency, i), func(t *testing.T) {
 			code := v1.SourceSpec{
 				DataSpec: v1.DataSpec{
@@ -372,6 +374,7 @@ const YAMLKameletEipMap = `
         name: "foo/bar?baz=test"
 `
 
+// #nosec G101
 const YAMLKameletEipMapWithParams = `
 - from:
     uri: timer:tick
@@ -416,7 +419,8 @@ func TestYAMLKamelet(t *testing.T) {
 		},
 	}
 
-	for i, test := range tc {
+	for i := range tc {
+		test := tc[i]
 		t.Run(fmt.Sprintf("TestYAMLKamelet-%d", i), func(t *testing.T) {
 			code := v1.SourceSpec{
 				DataSpec: v1.DataSpec{
@@ -483,7 +487,8 @@ func TestYAMLExplicitParameters(t *testing.T) {
 		},
 	}
 
-	for i, test := range tc {
+	for i := range tc {
+		test := tc[i]
 		t.Run(fmt.Sprintf("TestYAMLExplicitParameters-%d", i), func(t *testing.T) {
 			code := v1.SourceSpec{
 				DataSpec: v1.DataSpec{
diff --git a/pkg/util/sync/file_test.go b/pkg/util/sync/file_test.go
index 13cc81c99..792cd6041 100644
--- a/pkg/util/sync/file_test.go
+++ b/pkg/util/sync/file_test.go
@@ -20,9 +20,7 @@ package sync
 import (
 	"context"
 	"io/ioutil"
-	"math/rand"
 	"os"
-	"path"
 	"strconv"
 	"testing"
 	"time"
@@ -31,21 +29,19 @@ import (
 )
 
 func TestFile(t *testing.T) {
-	tempdir := os.TempDir()
-	fileName := path.Join(tempdir, "camel-k-test-"+strconv.FormatUint(rand.Uint64(), 10))
-	_, err := os.Create(fileName)
+	file, err := os.CreateTemp("", "camel-k-test-*")
 	assert.Nil(t, err)
-	defer os.Remove(fileName)
+	defer os.Remove(file.Name())
 
 	ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(100*time.Second))
 	defer cancel()
-	changes, err := File(ctx, fileName)
+	changes, err := File(ctx, file.Name())
 	assert.Nil(t, err)
 
 	time.Sleep(100 * time.Millisecond)
 	expectedNumChanges := 3
 	for i := 0; i < expectedNumChanges; i++ {
-		if err := ioutil.WriteFile(fileName, []byte("data-"+strconv.Itoa(i)), 0o777); err != nil {
+		if err := ioutil.WriteFile(file.Name(), []byte("data-"+strconv.Itoa(i)), 0o600); err != nil {
 			t.Error(err)
 		}
 		time.Sleep(350 * time.Millisecond)
diff --git a/pkg/util/uri/uri_test.go b/pkg/util/uri/uri_test.go
index 068184c08..4000bf3f2 100644
--- a/pkg/util/uri/uri_test.go
+++ b/pkg/util/uri/uri_test.go
@@ -134,7 +134,8 @@ func TestAppendParameters(t *testing.T) {
 		},
 	}
 
-	for i, test := range tests {
+	for i := range tests {
+		test := tests[i]
 		t.Run(fmt.Sprintf("appendParameters-%d-%s", i, test.expected), func(t *testing.T) {
 			uri := AppendParameters(test.prefix, test.params)
 			assert.Equal(t, test.expected, uri)
@@ -172,7 +173,8 @@ func TestCamelURIFormat(t *testing.T) {
 		},
 	}
 
-	for i, tc := range tests {
+	for i := range tests {
+		tc := tests[i]
 		t.Run(fmt.Sprintf("%d-%s", i, tc.uri), func(t *testing.T) {
 			assert.Equal(t, !tc.invalid, HasCamelURIFormat(tc.uri))
 		})