diff --git a/.golangci.yml b/.golangci.yml index 0e5b4164cd7c2..2f96fd9a504db 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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`. diff --git a/plugins/outputs/yandex_cloud_monitoring/yandex_cloud_monitoring.go b/plugins/outputs/yandex_cloud_monitoring/yandex_cloud_monitoring.go index c6a1ddd817f38..10c3d43a64669 100644 --- a/plugins/outputs/yandex_cloud_monitoring/yandex_cloud_monitoring.go +++ b/plugins/outputs/yandex_cloud_monitoring/yandex_cloud_monitoring.go @@ -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" )