Skip to content

Commit

Permalink
Fix[CI]: gosec nosec (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunginnanet committed Oct 20, 2023
1 parent 3c39720 commit add6bd5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/config/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ func StartLogger(pretty bool, targets ...io.Writer) zerolog.Logger {
default:
prepLogDir()
CurrentLogFile = path.Join(logDir, logFileName+".log")
/* #nosec */
if logFile, err = os.OpenFile(CurrentLogFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o666); err != nil {
//nolint:lll
logFile, err = os.OpenFile(CurrentLogFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o666) // #nosec G304 G302 -- we are not using user input to create the file
if err != nil {
println("cannot create log file: " + err.Error())
os.Exit(1)
}
Expand Down

0 comments on commit add6bd5

Please sign in to comment.