Skip to content

Commit

Permalink
Changed formatting to fix gosec alert
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Feb 14, 2024
1 parent cd4e40f commit 2db425d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/archive/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ func ExtractTarGz(gzipStream io.Reader, patchPath func(path string) string) erro
}
defer outFile.Close()
// Write contents
if _, err := io.Copy(outFile, tarReader); err != nil {
if _, err := io.Copy(outFile, tarReader); err != nil /* #nosec G110 -- Tool images are a trusted source */ {
return fmt.Errorf("ExtractTarGz: Copy() failed: %s", err.Error())
} // #nosec G110 -- Tool images are a trusted source
}
// Set permissions
mode := os.FileMode(header.Mode)
err = outFile.Chmod(mode)
Expand Down

0 comments on commit 2db425d

Please sign in to comment.