Skip to content

Commit

Permalink
fix: gosec false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Jul 19, 2022
1 parent c36ca53 commit e3e7ed0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/courier/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func ServeMetrics(ctx cx.Context, r driver.Registry) {
handler = otelx.NewHandler(n, "cmd.courier.ServeMetrics")
}

// #nosec G112 - the correct settings are set by graceful.WithDefaults
server := graceful.WithDefaults(&http.Server{
Addr: c.MetricsListenOn(),
Handler: handler,
Expand Down
2 changes: 2 additions & 0 deletions cmd/daemon/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func ServePublic(r driver.Registry, wg *sync.WaitGroup, cmd *cobra.Command, args
handler = x.TraceHandler(handler)
}

// #nosec G112 - the correct settings are set by graceful.WithDefaults
server := graceful.WithDefaults(&http.Server{
Handler: handler,
TLSConfig: &tls.Config{Certificates: certs, MinVersion: tls.VersionTLS12},
Expand Down Expand Up @@ -185,6 +186,7 @@ func ServeAdmin(r driver.Registry, wg *sync.WaitGroup, cmd *cobra.Command, args
handler = x.TraceHandler(n)
}

// #nosec G112 - the correct settings are set by graceful.WithDefaults
server := graceful.WithDefaults(&http.Server{
Handler: handler,
TLSConfig: &tls.Config{Certificates: certs, MinVersion: tls.VersionTLS12},
Expand Down

0 comments on commit e3e7ed0

Please sign in to comment.