Skip to content
Snippets Groups Projects
Unverified Commit af18d16c authored by Bob Callaway's avatar Bob Callaway Committed by GitHub
Browse files

turn on gosec and resolve blocking issues (#55)

* turn on gosec and resolve blocking issues
parent dfcd88b4
No related branches found
No related tags found
No related merge requests found
......@@ -29,3 +29,10 @@ jobs:
# Test It
- name: Test
run: go test -v ./...
# Gosec It
- name: Run Gosec Security Scanner
uses: securego/gosec@v2.5.0
env:
GOROOT: ""
with:
args: ./...
......@@ -20,6 +20,7 @@ import (
"encoding/json"
"io/ioutil"
"os"
"path/filepath"
"github.com/projectrekor/rekor/pkg"
"github.com/projectrekor/rekor/pkg/log"
......@@ -46,11 +47,11 @@ var verifyCmd = &cobra.Command{
}
// Signature and Public Key are always required
sig, err := ioutil.ReadFile(signature)
sig, err := ioutil.ReadFile(filepath.Clean(signature))
if err != nil {
log.Fatal(err)
}
pubKey, err := ioutil.ReadFile(pk)
pubKey, err := ioutil.ReadFile(filepath.Clean(pk))
if err != nil {
log.Fatal(err)
}
......@@ -64,7 +65,7 @@ var verifyCmd = &cobra.Command{
var body []byte
if isLocal {
var err error
body, err = ioutil.ReadFile(artifact)
body, err = ioutil.ReadFile(filepath.Clean(artifact))
if err != nil {
log.Fatal(err)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment