Skip to content

Commit 42efe3d

Browse files
committed
squash pkg golang errors
1 parent 51f5585 commit 42efe3d

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

Diff for: examples/postgres-query/main.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import (
77
"fmt"
88
"os"
99

10-
"github.com/hypertrace/goagent/instrumentation/hypertrace/github.com/jackc/hyperpgx"
10+
// gosec complains about this pkg not following golang repo standards
11+
// "could not import github.com/hypertrace/goagent/instrumentation/hypertrace/github.com/jackc/hyperpgx (invalid package name: "")"
12+
// It is caused the pkg having its own go.mod
13+
"github.com/hypertrace/goagent/instrumentation/hypertrace/github.com/jackc/hyperpgx" // #nosec
1114
)
1215

1316
func main() {

Diff for: examples/sql-query/main.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import (
1010
"net/http"
1111
"time"
1212

13-
"github.com/go-sql-driver/mysql"
13+
// gosec complains about github.com/go-sql-driver/mysql not following golang repo standards
14+
// "could not import github.com/go-sql-driver/mysql (invalid package name: "")"
15+
"github.com/go-sql-driver/mysql" // #nosec
1416
"github.com/gorilla/mux"
1517
"github.com/hypertrace/goagent/config"
1618
"github.com/hypertrace/goagent/instrumentation/hypertrace"

Diff for: instrumentation/opencensus/init.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ func Init(cfg *config.AgentConfig) func() {
2121

2222
client := &http.Client{Transport: &http.Transport{
2323
TLSClientConfig: &tls.Config{
24-
MinVersion: tls.VersionTLS12,
25-
InsecureSkipVerify: !cfg.GetReporting().GetSecure().GetValue(), // #nosec
24+
MinVersion: tls.VersionTLS12,
25+
// Ignore gosec: G402 (CWE-295): TLS InsecureSkipVerify may be true.
26+
// #nosec G402
27+
InsecureSkipVerify: !cfg.GetReporting().GetSecure().GetValue(),
2628
},
2729
}}
2830

0 commit comments

Comments
 (0)