phires / go-guerrilla

MIT License
112 stars 18 forks source link

gosec: hook.go: G304 (CWE-22): Potential file inclusion via variable #16

Closed phires closed 5 months ago

phires commented 1 year ago
[/go-guerrilla/log/hook.go:130] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
    129: func (hook *LogrusHook) openCreate(dest string) (err error) {
  > 130:        fd, err := os.OpenFile(dest, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
    131:        if err != nil {