Fixes for gosec
This commit is contained in:
parent
9553b277e9
commit
d781d99797
12 changed files with 43 additions and 30 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue