chore: Enable G101 rule for gosec (#13009)
Co-authored-by: Pawel Zak <Pawel Zak>
This commit is contained in:
parent
0754247d79
commit
2320bbd1a8
|
|
@ -88,6 +88,7 @@ linters-settings:
|
|||
# Available rules: https://github.com/securego/gosec#available-rules
|
||||
# Default: [] - means include all rules
|
||||
includes:
|
||||
- G101
|
||||
- G102
|
||||
- G106
|
||||
- G107
|
||||
|
|
@ -239,6 +240,9 @@ issues:
|
|||
- path: cmd/telegraf/(main|printer).go
|
||||
text: "unhandled-error: Unhandled error in call to function outputBuffer.Write"
|
||||
|
||||
- path: _test\.go
|
||||
text: "Potential hardcoded credentials"
|
||||
|
||||
# Independently of option `exclude` we use default exclude patterns,
|
||||
# it can be disabled by this option.
|
||||
# To list all excluded by default patterns execute `golangci-lint run --help`.
|
||||
|
|
|
|||
|
|
@ -63,8 +63,9 @@ type MetadataIamToken struct {
|
|||
}
|
||||
|
||||
const (
|
||||
defaultRequestTimeout = time.Second * 20
|
||||
defaultEndpointURL = "https://monitoring.api.cloud.yandex.net/monitoring/v2/data/write"
|
||||
defaultRequestTimeout = time.Second * 20
|
||||
defaultEndpointURL = "https://monitoring.api.cloud.yandex.net/monitoring/v2/data/write"
|
||||
//nolint:gosec // G101: Potential hardcoded credentials - false positive
|
||||
defaultMetadataTokenURL = "http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/token"
|
||||
defaultMetadataFolderURL = "http://169.254.169.254/computeMetadata/v1/yandex/folder-id"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue