Add gosec static analysis
This commit is contained in:
parent
fb8ac92abf
commit
b8d7c97eb7
8 changed files with 16 additions and 9 deletions
|
|
@ -86,7 +86,7 @@ func GetLogWriter(logfile string) (writer io.Writer) {
|
|||
switch viper.GetString("log." + logfile) {
|
||||
case "file":
|
||||
fullLogFilePath := config.LogPath.GetString() + "/" + logfile + ".log"
|
||||
f, err := os.OpenFile(fullLogFilePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
||||
f, err := os.OpenFile(fullLogFilePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600)
|
||||
if err != nil {
|
||||
Fatalf("Could not create logfile %s: %s", fullLogFilePath, err.Error())
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue