mirror of
https://github.com/yunginnanet/HellPot
synced 2024-06-28 08:40:48 +00:00
Fix[CI][SAST]: Resolve gosec false positive
This commit is contained in:
parent
5068e45ed9
commit
fcf3c8c0fa
@ -45,8 +45,9 @@ func StartLogger(pretty bool, targets ...io.Writer) zerolog.Logger {
|
||||
logFile = io.MultiWriter(targets...)
|
||||
default:
|
||||
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 {
|
||||
|
||||
logFile, err = os.OpenFile(CurrentLogFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o666) // #nosec G304 G302
|
||||
if err != nil {
|
||||
println("cannot create log file: " + err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user