Skip to content
Closed
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
12 changes: 10 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ linters:
- octalLiteral
- whyNoLint
- unnamedResult
# note(rdr): when lib is called x and then you do x = x.New(). Widely used in the repo.
# note(rdr): when lib is called x and then you do x = x.New(). Widely used in the repo.
# Should we change it?
- importShadow
enabled-tags:
Expand All @@ -74,6 +74,10 @@ linters:
gosec:
excludes:
- G115 #TODO: remove after fixing https://github.com/securego/gosec/issues/1212
# - G602 # false positive on validated slice bounds
# - G703 # false positive on controlled test paths
# - G704 # false positive on URLs from trusted config
# - G705 # false positive on already-escaped output
govet:
enable:
- nilness
Expand Down Expand Up @@ -135,9 +139,13 @@ linters:
- linters:
- exhaustruct
path-except: adapters/.+\.go
- linters:
- staticcheck
path: vm/state\.go
text: ST1003
- linters:
- lll
source: '^//go:generate '
source: "^//go:generate "
formatters:
enable:
- gci
Expand Down
3 changes: 2 additions & 1 deletion clients/feeder/timeouts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import (
"fmt"
"html"
"math"
"net/http"
"strings"
Expand Down Expand Up @@ -174,7 +175,7 @@
return
}
client.WithTimeouts(newTimeouts, fixed)
fmt.Fprintf(w, "Replaced timeouts with '%s' successfully\n", timeoutsStr)
fmt.Fprintf(w, "Replaced timeouts with '%s' successfully\n", html.EscapeString(timeoutsStr))

Check failure on line 178 in clients/feeder/timeouts.go

View workflow job for this annotation

GitHub Actions / lint

G705: XSS via taint analysis (gosec)
default:
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
}
Expand Down
Loading