From 69ff98ef7e2f461a1f6b8cbdd2dccb6916d30cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mra=C4=8Dko?= Date: Tue, 2 May 2023 13:47:51 +0200 Subject: [PATCH] TRIVIAL change permissions back to 644 --- cmd/get.go | 6 ++++-- pkg/inject/hook.go | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/get.go b/cmd/get.go index 7721b23..2c4cb46 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -60,7 +60,8 @@ func ExecuteGetValues() error { log.Debug("Config server response:") log.Debug(resp) - if err = os.WriteFile(gp.destination, []byte(resp), 0o600); err != nil { + //#nosec G306 + if err = os.WriteFile(gp.destination, []byte(resp), 0o644); err != nil { return err } @@ -90,7 +91,8 @@ func ExecuteGetFiles() error { fmt.Println() log.Debug("Response written to stdout") } else { - if err = os.WriteFile(mapping.destination, resp, 0o600); err != nil { + //#nosec G306 + if err = os.WriteFile(mapping.destination, resp, 0o644); err != nil { return err } diff --git a/pkg/inject/hook.go b/pkg/inject/hook.go index 23d0ab9..566c285 100644 --- a/pkg/inject/hook.go +++ b/pkg/inject/hook.go @@ -227,7 +227,8 @@ func (wh *Webhook) Run(stop <-chan struct{}) { log.Errorf("Watcher error: %v", err) case <-healthC: content := []byte(`ok`) - if err := os.WriteFile(wh.healthCheckFile, content, 0o600); err != nil { + //#nosec G306 + if err := os.WriteFile(wh.healthCheckFile, content, 0o644); err != nil { log.Errorf("Health check update of %q failed: %v", wh.healthCheckFile, err) } case <-stop: