Skip to content

Commit d43e9ca

Browse files
authored
Merge pull request #3 from slashdevops/update-dependencies
fix: vulnerability mitigation
2 parents 13a80fb + b1b6c15 commit d43e9ca

File tree

23 files changed

+195
-241
lines changed

23 files changed

+195
-241
lines changed

.github/workflows/develop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Set up Go 1.x
23-
uses: actions/setup-go@v2
23+
uses: actions/setup-go@v4
2424
with:
2525
go-version: ^1.18
2626
id: go
2727

2828
- name: Check out code into the Go module directory
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
3030

3131
- name: Install promu
3232
run: make promu

.github/workflows/master.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Set up Go 1.x
27-
uses: actions/setup-go@v2
27+
uses: actions/setup-go@v4
2828
with:
2929
go-version: ^1.18
3030
id: go
3131

3232
- name: Check out code into the Go module directory
33-
uses: actions/checkout@v2
33+
uses: actions/checkout@v3
3434

3535
- name: Install promu
3636
run: make promu
@@ -52,13 +52,13 @@ jobs:
5252
runs-on: ubuntu-latest
5353
steps:
5454
- name: Set up Go 1.x
55-
uses: actions/setup-go@v2
55+
uses: actions/setup-go@v4
5656
with:
5757
go-version: ^1.18
5858
id: go
5959

6060
- name: Check out code into the Go module directory
61-
uses: actions/checkout@v2
61+
uses: actions/checkout@v3
6262

6363
- name: Install promu
6464
run: make promu
@@ -84,13 +84,13 @@ jobs:
8484
runs-on: ubuntu-latest
8585
steps:
8686
- name: Set up Go 1.x
87-
uses: actions/setup-go@v2
87+
uses: actions/setup-go@v4
8888
with:
8989
go-version: ^1.18
9090
id: go
9191

9292
- name: Check out code into the Go module directory
93-
uses: actions/checkout@v2
93+
uses: actions/checkout@v3
9494

9595
- name: Install promu
9696
run: make promu

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Set up Go 1.x
19-
uses: actions/setup-go@v2
19+
uses: actions/setup-go@v4
2020
with:
2121
go-version: ^1.18
2222
id: go
2323

2424
- name: Check out code into the Go module directory
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v3
2626

2727
- name: Install promu
2828
run: make promu
@@ -39,13 +39,13 @@ jobs:
3939
runs-on: ubuntu-latest
4040
steps:
4141
- name: Set up Go 1.x
42-
uses: actions/setup-go@v2
42+
uses: actions/setup-go@v4
4343
with:
4444
go-version: ^1.18
4545
id: go
4646

4747
- name: Check out code into the Go module directory
48-
uses: actions/checkout@v2
48+
uses: actions/checkout@v3
4949

5050
- name: Install promu
5151
run: make promu
@@ -71,13 +71,13 @@ jobs:
7171
runs-on: ubuntu-latest
7272
steps:
7373
- name: Set up Go 1.x
74-
uses: actions/setup-go@v2
74+
uses: actions/setup-go@v4
7575
with:
7676
go-version: ^1.18
7777
id: go
7878

7979
- name: Check out code into the Go module directory
80-
uses: actions/checkout@v2
80+
uses: actions/checkout@v3
8181

8282
- name: Install promu
8383
run: make promu
@@ -134,7 +134,7 @@ jobs:
134134
runs-on: ubuntu-latest
135135
steps:
136136
- name: Checkout code
137-
uses: actions/checkout@v2
137+
uses: actions/checkout@v3
138138

139139
- name: Create Release
140140
id: create_github_release
@@ -154,13 +154,13 @@ jobs:
154154
runs-on: ubuntu-latest
155155
steps:
156156
- name: Set up Go 1.x
157-
uses: actions/setup-go@v2
157+
uses: actions/setup-go@v4
158158
with:
159159
go-version: ^1.18
160160
id: go
161161

162162
- name: Check out code into the Go module directory
163-
uses: actions/checkout@v2
163+
uses: actions/checkout@v3
164164

165165
- name: Install promu
166166
run: make promu

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ run:
33

44
linters:
55
enable:
6-
- golint
76
- staticcheck
87

98
issues:

Makefile

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

1919
DOCKER_IMAGE_NAME ?= aws-cloudwatch-exporter
2020

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

Makefile.common

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ 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 :=
8585
GOLANGCI_LINT_OPTS ?=
86-
GOLANGCI_LINT_VERSION ?= v1.46.2
86+
GOLANGCI_LINT_VERSION ?= v1.52.2
8787
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
8888
# windows isn't included here because of the path separator being different.
8989
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))

cmd/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,

cmd/root.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
1615
*/
1716
package cmd
1817

cmd/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,

cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,

0 commit comments

Comments
 (0)