Fixes for gosec

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-12-04 09:40:42 -03:00
parent 9553b277e9
commit d781d99797
12 changed files with 43 additions and 30 deletions

View file

@ -17,7 +17,7 @@ limitations under the License.
package file
import (
"crypto/sha1"
"crypto/sha1" // #nosec
"encoding/hex"
"io/ioutil"
@ -26,7 +26,7 @@ import (
// SHA1 returns the SHA1 of a file.
func SHA1(filename string) string {
hasher := sha1.New()
hasher := sha1.New() // #nosec
s, err := ioutil.ReadFile(filename)
if err != nil {
klog.ErrorS(err, "Error reading file", "path", filename)