Skip to content

Commit

Permalink
Merge pull request #50 from wandera/read-rights
Browse files Browse the repository at this point in the history
TRIVIAL change permissions back to 644
  • Loading branch information
mrackoa authored May 2, 2023
2 parents 70c58dc + 69ff98e commit cfcd920
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/inject/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cfcd920

Please sign in to comment.