Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cmd/prom-scraper/app/prom_scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (p *PromScraper) scrape(client *http.Client) scraper.MetricsGetter {
}
req.Header = requestHeader

return client.Do(req)
return client.Do(req) //nolint:gosec
}
}

Expand Down
1,701 changes: 0 additions & 1,701 deletions src/internal/testhelper/bindata.go

This file was deleted.

2 changes: 1 addition & 1 deletion src/internal/testservers/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func StartAgent(conf app.Config) (cleanup func(), mp AgentPorts) {
Expect(agentPath).ToNot(BeEmpty())

By("starting agent")
agentCommand := exec.Command(agentPath)
agentCommand := exec.Command(agentPath) //nolint:gosec
agentCommand.Env = envstruct.ToEnv(&conf)
agentSession, err := gexec.Start(
agentCommand,
Expand Down
2 changes: 1 addition & 1 deletion src/internal/testservers/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func waitForPortBinding(prefix string, buf *gbytes.Buffer) int {
if len(result) == 2 {
port, err := strconv.Atoi(string(result[1]))
if err != nil {
log.Panicf("unable to parse port number, port: %#v", result[1])
log.Panicf("unable to parse port number, port: %#v", result[1]) //nolint:gosec
}
return port
}
Expand Down
3 changes: 2 additions & 1 deletion src/pkg/egress/syslog/https_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func NewRetryer(

// Retry will retry the provided function up to maxRetries times.
// It returns true if the function failed after all retries, false otherwise.
// nolint:gosec
func (r *Retryer) Retry(batch []byte, msgCount float64, funcToRetry func([]byte, float64) error) (failed bool) {
var err error

Expand Down Expand Up @@ -261,7 +262,7 @@ func (w *HTTPSBatchWriter) startSender() {
if msgBatch.Len() > 0 {
failed := w.retryer.Retry(msgBatch.Bytes(), msgCount, w.sendHttpRequest)
if failed {
log.Printf("Failed to deliver %.0f messages to %s for application %s after all retries, dropping batch",
log.Printf("Failed to deliver %.0f messages to %s for application %s after all retries, dropping batch", //nolint:gosec
msgCount, redactedURL(w.url), w.appID)
}
msgBatch.Reset()
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/egress/syslog/retry_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (r *RetryWriter) Write(e *loggregator_v2.Envelope) error {
}

sleepDuration := r.retryDuration(i)
log.Printf(logTemplate, r.binding.URL.Host, sleepDuration, err)
log.Printf(logTemplate, r.binding.URL.Host, sleepDuration, err) //nolint:gosec

time.Sleep(sleepDuration)
}
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/egress/syslog/syslog_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (w *SyslogConnector) emitStandardOutErrorLog(appID, scheme, url string, mis
if appID == "" {
errorAppOrAggregate = "for aggregate drain"
}
log.Printf(
log.Printf( //nolint:gosec
"Dropped %d %s logs %s with url %s",
missed, scheme, errorAppOrAggregate, url,
)
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/egress/syslog/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (w *TCPWriter) connect() (net.Conn, error) {
}
w.conn = conn

log.Printf("created conn to syslog drain: %s", w.url.Host)
log.Printf("created conn to syslog drain: %s", w.url.Host) //nolint:gosec

return conn, nil
}
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/egress/syslog/url_binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type URLBinding struct {
OmitMetadata bool
InternalTls bool
URL *url.URL
PrivateKey []byte
PrivateKey []byte //nolint:gosec
Certificate []byte
CA []byte
}
Expand Down
Loading