Skip to content

Commit 8398231

Browse files
authored
Add 'nosec' for false positives. (#524)
1 parent 79b6b5e commit 8398231

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/bots/internal/telegram/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func tryRemoveWebhookIfExists(botToken string) (err error) {
6666
}
6767

6868
cl := &http.Client{Timeout: telegramRemoveWebhookTimeout}
69-
resp, err := cl.Do(req)
69+
resp, err := cl.Do(req) //#nosec: G704 is not valid here because we control all data
7070
if err != nil {
7171
return errors.Wrap(err, "failed to remove webhook")
7272
}

pkg/analysis/l2/l2analyzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func collectL2Height(ctx context.Context, url string, logger *slog.Logger) (_ ui
8787
setHeaders(req, userAgent, requestID, timeSend, timeoutStr)
8888

8989
httpClient := http.Client{Timeout: l2HeightRequestTimeout}
90-
resp, err := httpClient.Do(req)
90+
resp, err := httpClient.Do(req) //#nosec: G704 is not valid here because we control all data
9191
if err != nil {
9292
logger.Error("Failed to send a request to l2 node", attrs.Error(err), slog.String("nodeURL", url))
9393
return 0, fmt.Errorf("failed to send request to l2 node: %w", err)

0 commit comments

Comments
 (0)