Skip to content

Commit

Permalink
Security (logger): Resolve gosec G302 (CWE-276)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunginnanet committed Jun 26, 2024
1 parent 317fd91 commit e9785d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (c *Configuration) setupDirAndFile() error {
fmt.Sprintf("%s-%s%s", og, time.Now().Format("2006-01-02-15-04-05"), ext),
)
}
if f, err = os.OpenFile(filepath.Join(c.Directory, c.File), os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644); err != nil {
if f, err = os.OpenFile(filepath.Join(c.Directory, c.File), os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600); err != nil {
return fmt.Errorf("failed to open log file: %w", err)
}
c.Outputs = append(c.Outputs, f)
Expand Down

0 comments on commit e9785d2

Please sign in to comment.