Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 87ea971

Browse files
committed
Update go version, dependencies, ping golangci-lint
1 parent 282e330 commit 87ea971

11 files changed

+44
-75
lines changed

.github/workflows/ci-build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- name: set up QEMU
19-
uses: docker/setup-qemu-action@v2
19+
uses: docker/setup-qemu-action@v3
2020

2121
- name: set up Docker Buildx
2222
id: buildx
23-
uses: docker/setup-buildx-action@v2
23+
uses: docker/setup-buildx-action@v3
2424

2525
- name: available platforms
2626
run: echo ${{ steps.buildx.outputs.platforms }}

.github/workflows/ci-run.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616

1717
- name: install go
18-
uses: actions/setup-go@v3
18+
uses: actions/setup-go@v5
1919
with:
20-
go-version: 1.18
20+
go-version: 1.22
2121

2222
- name: build and test
2323
run: go test -timeout=60s -covermode=count -coverprofile=$GITHUB_WORKSPACE/profile.cov ./...
2424

25-
- name: install golangci-lint
26-
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.50.1
27-
28-
- name: run linters
29-
run: $GITHUB_WORKSPACE/golangci-lint run ./... ;
30-
25+
- name: golangci-lint
26+
uses: golangci/golangci-lint-action@v4
27+
with:
28+
version: v1.64

.golangci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
linters:
22
enable:
33
- bodyclose
4-
- depguard
54
- dogsled
65
- dupl
76
- errcheck
@@ -21,7 +20,7 @@ linters:
2120
- misspell
2221
- nakedret
2322
- rowserrcheck
24-
- exportloopref
23+
- copyloopvar
2524
- staticcheck
2625
- stylecheck
2726
- typecheck

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LABEL org.opencontainers.image.authors="Dmitry Verkhoturov <[email protected]>
1515
org.opencontainers.image.description="AWS Security Connectors" \
1616
org.opencontainers.image.documentation="https://github.com/bookingcom/aws-security-connectors" \
1717
org.opencontainers.image.licenses="Apache 2.0" \
18-
org.opencontainers.image.source="https://github.com/bookingcom/aws-security-connectors.git" \
18+
org.opencontainers.image.source="https://github.com/bookingcom/aws-security-connectors" \
1919
org.opencontainers.image.title="aws-security-connectors" \
2020
org.opencontainers.image.vendor="Booking.com"
2121

connectors/detective_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ func TestDetectiveInviter_AddMember(t *testing.T) {
9898

9999
masterSess, memberSess := NewMasterMemberSess("us-west-2", "", "")
100100
for i, x := range testAPIRequestsDataset {
101-
i := i
102-
x := x
103101
t.Run(x.description, func(t *testing.T) {
104102
master := &mockDMasterClient{
105103
t: t,

connectors/guardduty_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ func TestGuardDutyInviter_AddMember(t *testing.T) {
123123

124124
masterSess, memberSess := NewMasterMemberSess("us-west-2", "", "")
125125
for i, x := range testAPIRequestsDataset {
126-
i := i
127-
x := x
128126
t.Run(x.description, func(t *testing.T) {
129127
master := &mockGDMasterClient{
130128
email: &testEmail,

connectors/prisma_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ func TestPrisma_AddAWSAccount(t *testing.T) {
8484
}
8585

8686
for i, x := range testAPIRequestsDataset {
87-
i := i
88-
x := x
8987
t.Run(x.description, func(t *testing.T) {
9088
m := &mockClient{t: t, requests: x.requests}
9189
p := NewPrisma("", "", "")

connectors/security_hub_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ func TestSecurityHubInviter_AddMember(t *testing.T) {
8686

8787
masterSess, memberSess := NewMasterMemberSess("us-west-2", "", "")
8888
for i, x := range testAPIRequestsDataset {
89-
i := i
90-
x := x
9189
t.Run(x.description, func(t *testing.T) {
9290
master := &mockSHMasterClient{
9391
t: t,

docker-compose.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
version: '2'
21
services:
32

43
aws-security-connectors:
54
build: .
6-
image: paskal/aws-security-connectors:latest
5+
image: ghcr.io/bookingcom/aws-security-connectors:latest
76
environment:
87
- DEBUG
98
- AWS_ACCOUNT_ID

go.mod

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
module github.com/bookingcom/aws-security-connectors
22

3-
go 1.14
3+
go 1.22
44

55
require (
6-
github.com/aws/aws-sdk-go v1.44.209
6+
github.com/aws/aws-sdk-go v1.55.6
77
github.com/hashicorp/go-multierror v1.1.1
8-
github.com/jessevdk/go-flags v1.5.0
9-
github.com/paskal/go-prisma v1.0.0
10-
github.com/sirupsen/logrus v1.9.0
11-
github.com/stretchr/testify v1.8.2
8+
github.com/jessevdk/go-flags v1.6.1
9+
github.com/paskal/go-prisma v1.0.1
10+
github.com/sirupsen/logrus v1.9.3
11+
github.com/stretchr/testify v1.10.0
12+
)
13+
14+
require (
15+
github.com/davecgh/go-spew v1.1.1 // indirect
16+
github.com/hashicorp/errwrap v1.1.0 // indirect
17+
github.com/jmespath/go-jmespath v0.4.0 // indirect
18+
github.com/pmezard/go-difflib v1.0.0 // indirect
19+
golang.org/x/sys v0.30.0 // indirect
20+
gopkg.in/yaml.v3 v3.0.1 // indirect
1221
)

go.sum

+16-44
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,38 @@
1-
github.com/aws/aws-sdk-go v1.44.209 h1:wZuiaA4eaqYZmoZXqGgNHqVD7y7kUGFvACDGBgowTps=
2-
github.com/aws/aws-sdk-go v1.44.209/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
1+
github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk=
2+
github.com/aws/aws-sdk-go v1.55.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
33
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
55
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
6-
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
76
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
7+
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
8+
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
89
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
910
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
10-
github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=
11-
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
11+
github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4=
12+
github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc=
1213
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
1314
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
1415
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
1516
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
16-
github.com/paskal/go-prisma v1.0.0 h1:yUvhXbbR6/Y2P18+m+9Y97Bxp5wZMTiJw7Il5U2tUcQ=
17-
github.com/paskal/go-prisma v1.0.0/go.mod h1:1FMazoaT88V0rlCn4rtlsfDavHlMcdF2nwqJEWChYJU=
18-
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
17+
github.com/paskal/go-prisma v1.0.1 h1:8n7XxzqPLKuMHb0ZrBw2fAL2ZX8ibUWdmhQaQYV1A9M=
18+
github.com/paskal/go-prisma v1.0.1/go.mod h1:1mFmJ/Z0OMPmcIs+vF9m0dQ7x3oQtmiR5/qqj4g/Y7I=
1919
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2020
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
21-
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
22-
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
21+
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
22+
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
2323
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
2424
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
2525
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
26+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
2627
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
2728
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
2829
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
29-
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
30-
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
31-
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
32-
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
33-
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
34-
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
35-
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
36-
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
37-
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
38-
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
39-
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
40-
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
41-
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
42-
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
43-
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
44-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
45-
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
46-
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
47-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
30+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
31+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
32+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
4833
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
49-
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
50-
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
51-
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
52-
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
53-
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
54-
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
55-
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
56-
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
57-
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
58-
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
59-
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
60-
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
61-
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
62-
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
63-
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
34+
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
35+
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
6436
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
6537
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
6638
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=

0 commit comments

Comments
 (0)