You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same error for me. This code was skipped as expected up to version 2.17. It started failing with 2.18.1
// Setting defaults
// #nosec G402 -- InsecureSkipVerify: insecure - This allows connecting to VCDs with self-signed certificates
vcdClient := &VCDClient{
Client: Client{
APIVersion: minVcdApiVersion,
// UserAgent cannot embed exact version by default because this is source code and is supposed to be used by programs,
// but any client can customize or disable it at all using WithHttpUserAgent() configuration options function.
UserAgent: "go-vcloud-director",
VCDHREF: vcdEndpoint,
Http: http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: insecure, // #nosec G402 -- InsecureSkipVerify: insecure - This allows connecting to VCDs with self-signed certificates
},
Proxy: http.ProxyFromEnvironment,
TLSHandshakeTimeout: 120 * time.Second, // Default timeout for TSL hand shake
},
Timeout: 600 * time.Second, // Default value for http request+response timeout
},
MaxRetryTimeout: 60, // Default timeout in seconds for retries calls in functions
},
}
Thanks @tbailey
That would work. However, since we're dealing with a regression (and we have several places where a similar directive was ignored), I changed my CI workflow to use a specific gosec version until this bug is fixed.
Activity
skabashnyuk commentedon Oct 15, 2023
This could be related to #1043
dataclouder commentedon Oct 16, 2023
Same error for me.
This code was skipped as expected up to version 2.17. It started failing with 2.18.1
Here's a sample:
Adding the
#nosecdirective on line 146 itself doesn't help.tbailey commentedon Oct 16, 2023
@dataclouder I was able to work around this issue by breaking the setting out from the inline struct:
dataclouder commentedon Oct 16, 2023
Thanks @tbailey
That would work. However, since we're dealing with a regression (and we have several places where a similar directive was ignored), I changed my CI workflow to use a specific
gosecversion until this bug is fixed.image/build: use "nolint" comment to work around gosec regression
image/build: use "nolint" comment to work around gosec regression
image/build: use "nolint" comment to work around gosec regression