Skip to content

Commit

Permalink
ignore gosec G304
Browse files Browse the repository at this point in the history
Signed-off-by: 张祖建 <[email protected]>
  • Loading branch information
zhangzujian committed Sep 27, 2023
1 parent 13cf968 commit 6e90f5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/cmdmain.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func profile() {
for {
<-ch1
name := fmt.Sprintf("cpu-profile-%s.pprof", time.Now().Format(timeFormat))
f, err := os.Create(filepath.Join(os.TempDir(), name)) // #nosec G303
f, err := os.Create(filepath.Join(os.TempDir(), name)) // #nosec G303,G304
if err != nil {
klog.Errorf("failed to create cpu profile file: %v", err)
return
Expand All @@ -60,7 +60,7 @@ func profile() {
for {
<-ch2
name := fmt.Sprintf("mem-profile-%s.pprof", time.Now().Format(timeFormat))
f, err := os.Create(filepath.Join(os.TempDir(), name)) // #nosec G303
f, err := os.Create(filepath.Join(os.TempDir(), name)) // #nosec G303,G304
if err != nil {
klog.Errorf("failed to create memory profile file: %v", err)
return
Expand Down

0 comments on commit 6e90f5d

Please sign in to comment.