mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
20191217 gosec (#796)
* Add gosec to the Makefile Signed-off-by: Chris Cummer <chriscummer@me.com> * Fix some issues found by gosec Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
@@ -47,7 +48,7 @@ func (widget *Widget) Fetch() []websiteReport {
|
||||
}
|
||||
|
||||
func buildNetClient(secretPath string) *http.Client {
|
||||
clientSecret, err := ioutil.ReadFile(secretPath)
|
||||
clientSecret, err := ioutil.ReadFile(filepath.Clean(secretPath))
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to read secretPath. %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user