Skip to content

Commit c3520bb

Browse files
committed
fix: vulnerability mitigation
1 parent 13a80fb commit c3520bb

File tree

4 files changed

+116
-161
lines changed

4 files changed

+116
-161
lines changed

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,20 @@ include Makefile.common
1818

1919
DOCKER_IMAGE_NAME ?= aws-cloudwatch-exporter
2020

21-
GOLANGCI_LINT_VERSION ?= v1.46.2
21+
GOLANGCI_LINT_VERSION ?= v1.52.2
22+
23+
APP_DEPENDENCIES := $(shell go list -m -f '{{if not (or .Indirect .Main)}}{{.Path}}{{end}}' all)
24+
25+
##@ go-mod-tidy
26+
.PHONY: go-mod-tidy
27+
go-mod-tidy: ## Clean go.mod and go.sum
28+
@printf "👉 Cleaning go.mod and go.sum...\n"
29+
@go mod tidy
30+
31+
##@ go-mod-update
32+
.PHONY: go-mod-update
33+
go-mod-update: go-mod-tidy ## Update go.mod and go.sum
34+
@printf "👉 Updating go.mod and go.sum...\n"
35+
$(foreach DEP, $(APP_DEPENDENCIES), \
36+
$(shell go get -u $(DEP)) \
37+
)

Makefile.common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ ifneq ($(shell which gotestsum),)
7878
endif
7979
endif
8080

81-
PROMU_VERSION ?= 0.13.0
81+
PROMU_VERSION ?= 0.14.0
8282
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
8383

8484
GOLANGCI_LINT :=

go.mod

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,37 @@ module github.com/slashdevops/aws_cloudwatch_exporter
33
go 1.18
44

55
require (
6-
github.com/aws/aws-sdk-go v1.44.20
7-
github.com/imdario/mergo v0.3.12
8-
github.com/prometheus/client_golang v1.12.2
9-
github.com/prometheus/common v0.32.1
10-
github.com/sirupsen/logrus v1.8.1
11-
github.com/spf13/cobra v1.4.0
12-
github.com/spf13/viper v1.11.0
13-
gopkg.in/yaml.v3 v3.0.0
6+
github.com/aws/aws-sdk-go v1.44.235
7+
github.com/imdario/mergo v0.3.15
8+
github.com/prometheus/client_golang v1.14.0
9+
github.com/prometheus/common v0.42.0
10+
github.com/sirupsen/logrus v1.9.0
11+
github.com/spf13/cobra v1.6.1
12+
github.com/spf13/viper v1.15.0
13+
gopkg.in/yaml.v3 v3.0.1
1414
)
1515

1616
require (
1717
github.com/beorn7/perks v1.0.1 // indirect
1818
github.com/cespare/xxhash/v2 v2.1.2 // indirect
19-
github.com/fsnotify/fsnotify v1.5.1 // indirect
19+
github.com/fsnotify/fsnotify v1.6.0 // indirect
2020
github.com/golang/protobuf v1.5.2 // indirect
2121
github.com/hashicorp/hcl v1.0.0 // indirect
22-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
22+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2323
github.com/jmespath/go-jmespath v0.4.0 // indirect
24-
github.com/magiconair/properties v1.8.6 // indirect
25-
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
26-
github.com/mitchellh/mapstructure v1.4.3 // indirect
27-
github.com/pelletier/go-toml v1.9.4 // indirect
28-
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect
29-
github.com/prometheus/client_model v0.2.0 // indirect
30-
github.com/prometheus/procfs v0.7.3 // indirect
31-
github.com/spf13/afero v1.8.2 // indirect
32-
github.com/spf13/cast v1.4.1 // indirect
24+
github.com/magiconair/properties v1.8.7 // indirect
25+
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
26+
github.com/mitchellh/mapstructure v1.5.0 // indirect
27+
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
28+
github.com/prometheus/client_model v0.3.0 // indirect
29+
github.com/prometheus/procfs v0.8.0 // indirect
30+
github.com/spf13/afero v1.9.5 // indirect
31+
github.com/spf13/cast v1.5.0 // indirect
3332
github.com/spf13/jwalterweatherman v1.1.0 // indirect
3433
github.com/spf13/pflag v1.0.5 // indirect
35-
github.com/subosito/gotenv v1.2.0 // indirect
36-
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
37-
golang.org/x/text v0.3.7 // indirect
38-
google.golang.org/protobuf v1.28.0 // indirect
39-
gopkg.in/ini.v1 v1.66.4 // indirect
40-
gopkg.in/yaml.v2 v2.4.0 // indirect
34+
github.com/subosito/gotenv v1.4.2 // indirect
35+
golang.org/x/sys v0.6.0 // indirect
36+
golang.org/x/text v0.8.0 // indirect
37+
google.golang.org/protobuf v1.28.1 // indirect
38+
gopkg.in/ini.v1 v1.67.0 // indirect
4139
)

0 commit comments

Comments
 (0)