fix: build is broken after go 1.22 upgrade, it needs new golangci-lint installed.

Signed-off-by: Hiram Chirino <hiram@hiramchirino.com>
This commit is contained in:
Hiram Chirino
2024-03-18 20:14:09 -04:00
parent c45fc91389
commit f980cd920b
6 changed files with 10 additions and 12 deletions
+2 -2
View File
@@ -350,9 +350,9 @@ func main() {
User: command.String("smtp-user"),
Password: command.String("smtp-password"),
}
if command.Bool("smtp-tls") { // #nosec G402
if command.Bool("smtp-tls") {
smtpServer.Tls = &tls.Config{
InsecureSkipVerify: command.Bool("insecure-tls"),
InsecureSkipVerify: command.Bool("insecure-tls"), // #nosec G402
}
}
api.SmtpServer = smtpServer
+2 -2
View File
@@ -175,9 +175,9 @@ func createClientOptions(command *cli.Command) []client.Option {
),
client.WithUserAgent(fmt.Sprintf("nexctl/%s (%s; %s)", Version, runtime.GOOS, runtime.GOARCH)),
}
if command.Bool("insecure-skip-tls-verify") { // #nosec G402
if command.Bool("insecure-skip-tls-verify") {
options = append(options, client.WithTLSConfig(&tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, // #nosec G402
}))
}
return options
+2 -2
View File
@@ -35,7 +35,7 @@ if [ -z "$(which kind)" ] || [ "$1" = "--force" ]; then
fi
if [ -z "$(which golangci-lint)" ] || [ "$1" = "--force" ]; then
echo installing golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2
fi
if [ -z "$(which swag)" ] || [ "$1" = "--force" ]; then
echo installing swag
@@ -59,7 +59,7 @@ if [ -z "$(which go-licenses)" ] || [ "$1" = "--force" ]; then
fi
if [ -z "$(which gotestsum)" ] || [ "$1" = "--force" ]; then
echo installing gotestsum
go install gotest.tools/gotestsum@v1.10.0
go install gotest.tools/gotestsum@v1.11.0
fi
+2 -2
View File
@@ -553,9 +553,9 @@ func (nx *Nexodus) Start(ctx context.Context, wg *sync.WaitGroup) error {
options = append(options, client.WithPasswordGrant(nx.username, nx.password))
}
}
if nx.insecureSkipTlsVerify { // #nosec G402
if nx.insecureSkipTlsVerify {
options = append(options, client.WithTLSConfig(&tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, // #nosec G402
}))
}
nx.clientOptions = options
+1 -2
View File
@@ -59,9 +59,8 @@ func NewOidcAgent(ctx context.Context,
cookieKey string,
) (*OidcAgent, error) {
if insecureTLS {
// #nosec: G402
transport := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // #nosec: G402
}
client := &http.Client{Transport: transport}
ctx = oidc.ClientContext(ctx, client)
+1 -2
View File
@@ -35,9 +35,8 @@ func randString(nByte int) (string, error) {
func (o *OidcAgent) prepareContext(c *gin.Context) context.Context {
if o.insecureTLS {
parent := c.Request.Context()
// #nosec: G402
transport := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // #nosec: G402
}
client := &http.Client{Transport: transport}
return oidc.ClientContext(parent, client)