Add os.Create to the readfile rule (#761)

This commit is contained in:
Cosmin Cojocar
2022-01-12 19:33:17 +01:00
committed by GitHub
parent 75cc7dcd51
commit 7be6d4efb5
3 changed files with 36 additions and 3 deletions

View File

@@ -246,7 +246,7 @@ func printReport(format string, color bool, rootPaths []string, reportInfo *gose
}
func saveReport(filename, format string, rootPaths []string, reportInfo *gosec.ReportInfo) error {
outfile, err := os.Create(filename)
outfile, err := os.Create(filename) //#nosec G304
if err != nil {
return err
}