Chore: revise some of the gosec rules (#16713)
This commit is contained in:
committed by
Carl Bergquist
parent
51a98565dc
commit
c1289b308f
@@ -144,7 +144,7 @@ func downloadFile(pluginName, filePath, url string) (err error) {
|
||||
}
|
||||
}()
|
||||
|
||||
resp, err := http.Get(url)
|
||||
resp, err := http.Get(url) // #nosec
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -167,7 +167,7 @@ func extractFiles(body []byte, pluginName string, filePath string) error {
|
||||
newFile := path.Join(filePath, RemoveGitBuildFromName(pluginName, zf.Name))
|
||||
|
||||
if zf.FileInfo().IsDir() {
|
||||
err := os.Mkdir(newFile, 0777)
|
||||
err := os.Mkdir(newFile, 0755)
|
||||
if permissionsError(err) {
|
||||
return fmt.Errorf(permissionsDeniedMessage, newFile)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user