Skip to content

Commit 6a1ea38

Browse files
authored
CR-15716 - fix sec vulns (#316)
* updated dependencies * updated go to 1.19 * added readTimeout to mitigate Slowloris https://medium.com/a-journey-with-go/go-understand-and-mitigate-slowloris-attack-711c1b1403f6 * show an informative error message when failing to create k8s clientset
1 parent aeaaec7 commit 6a1ea38

File tree

20 files changed

+979
-578
lines changed

20 files changed

+979
-578
lines changed

venona/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17.6-alpine3.15 as build
1+
FROM golang:1.19-alpine3.17 as build
22

33
RUN apk -U add --no-cache git make ca-certificates && update-ca-certificates
44

@@ -23,7 +23,7 @@ RUN go mod verify
2323
# compile
2424
RUN make build
2525

26-
FROM alpine:3.15
26+
FROM alpine:3.17
2727

2828
# copy ca-certs and user details
2929
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

venona/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.0
1+
1.9.0

venona/build/Dockerfile.tester

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
FROM golang:1.17.6-alpine3.15 AS os
1+
FROM golang:1.19-alpine3.17 AS os
22

33
RUN apk -U add --no-cache ca-certificates git make gcc g++ bash && update-ca-certificates
4-
RUN go get github.com/client9/misspell/cmd/misspell && \
5-
go get github.com/fzipp/gocyclo && \
6-
go get golang.org/x/lint/golint && \
7-
go get github.com/securego/gosec/cmd/gosec && \
8-
go get github.com/google/addlicense && \
9-
go get github.com/github/hub
4+
RUN go install github.com/client9/misspell/cmd/misspell@latest && \
5+
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest && \
6+
go install golang.org/x/lint/golint@latest && \
7+
go install github.com/securego/gosec/v2/cmd/gosec@latest && \
8+
go install github.com/google/addlicense@latest && \
9+
go install github.com/github/hub@latest
1010

1111
RUN apk add curl
1212
RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh -s -- -b /usr/local/bin
1313

14-
# codefresh/venona-tester
14+
# quay.io/codefresh/venona-tester

venona/build/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ steps:
2020
download_dependencies: &deps
2121
title: Download Dependencies
2222
stage: Test
23-
image: codefresh/venona-tester
23+
image: quay.io/codefresh/venona-tester:latest
2424
environment:
2525
- GO111MODULE=on
2626
- GOSUMDB=off

venona/go.mod

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/codefresh-io/go/venona
22

3-
go 1.17
3+
go 1.19
44

55
require (
66
github.com/gorilla/mux v1.8.0
@@ -11,57 +11,66 @@ require (
1111
github.com/spf13/cobra v1.1.3
1212
github.com/spf13/pflag v1.0.5
1313
github.com/spf13/viper v1.7.1
14-
github.com/stretchr/objx v0.2.0
15-
github.com/stretchr/testify v1.6.1
14+
github.com/stretchr/objx v0.5.0
15+
github.com/stretchr/testify v1.8.1
1616
gopkg.in/yaml.v2 v2.4.0
17-
k8s.io/api v0.20.4
18-
k8s.io/apimachinery v0.20.4
19-
k8s.io/client-go v0.20.4
17+
k8s.io/api v0.26.0
18+
k8s.io/apimachinery v0.26.0
19+
k8s.io/client-go v0.26.0
2020
)
2121

2222
require (
2323
github.com/davecgh/go-spew v1.1.1 // indirect
24-
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
25-
github.com/fsnotify/fsnotify v1.4.9 // indirect
26-
github.com/go-logr/logr v0.2.0 // indirect
24+
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
25+
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
26+
github.com/fsnotify/fsnotify v1.4.7 // indirect
27+
github.com/go-logr/logr v1.2.3 // indirect
28+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
29+
github.com/go-openapi/jsonreference v0.20.0 // indirect
30+
github.com/go-openapi/swag v0.19.14 // indirect
2731
github.com/go-stack/stack v1.8.0 // indirect
28-
github.com/gogo/protobuf v1.3.1 // indirect
29-
github.com/golang/protobuf v1.4.3 // indirect
32+
github.com/gogo/protobuf v1.3.2 // indirect
33+
github.com/golang/protobuf v1.5.2 // indirect
34+
github.com/google/gnostic v0.5.7-v3refs // indirect
35+
github.com/google/go-cmp v0.5.9 // indirect
3036
github.com/google/gofuzz v1.1.0 // indirect
31-
github.com/googleapis/gnostic v0.4.1 // indirect
3237
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
3338
github.com/hashicorp/hcl v1.0.0 // indirect
3439
github.com/inconshreveable/mousetrap v1.0.0 // indirect
35-
github.com/json-iterator/go v1.1.10 // indirect
40+
github.com/josharian/intern v1.0.0 // indirect
41+
github.com/json-iterator/go v1.1.12 // indirect
3642
github.com/magiconair/properties v1.8.1 // indirect
37-
github.com/mattn/go-colorable v0.1.6 // indirect
38-
github.com/mattn/go-isatty v0.0.12 // indirect
43+
github.com/mailru/easyjson v0.7.6 // indirect
44+
github.com/mattn/go-colorable v0.0.9 // indirect
45+
github.com/mattn/go-isatty v0.0.3 // indirect
3946
github.com/mitchellh/mapstructure v1.1.2 // indirect
4047
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
41-
github.com/modern-go/reflect2 v1.0.1 // indirect
48+
github.com/modern-go/reflect2 v1.0.2 // indirect
49+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4250
github.com/pelletier/go-toml v1.2.0 // indirect
4351
github.com/pkg/errors v0.9.1 // indirect
4452
github.com/pmezard/go-difflib v1.0.0 // indirect
45-
github.com/spf13/afero v1.2.2 // indirect
53+
github.com/spf13/afero v1.1.2 // indirect
4654
github.com/spf13/cast v1.3.0 // indirect
4755
github.com/spf13/jwalterweatherman v1.0.0 // indirect
4856
github.com/subosito/gotenv v1.2.0 // indirect
49-
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 // indirect
50-
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
51-
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
52-
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd // indirect
53-
golang.org/x/text v0.3.4 // indirect
54-
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
55-
google.golang.org/appengine v1.6.5 // indirect
56-
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
57-
google.golang.org/grpc v1.27.1 // indirect
58-
google.golang.org/protobuf v1.25.0 // indirect
57+
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
58+
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
59+
golang.org/x/sys v0.3.0 // indirect
60+
golang.org/x/term v0.3.0 // indirect
61+
golang.org/x/text v0.5.0 // indirect
62+
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
63+
google.golang.org/appengine v1.6.7 // indirect
64+
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 // indirect
65+
google.golang.org/grpc v1.31.0 // indirect
66+
google.golang.org/protobuf v1.28.1 // indirect
5967
gopkg.in/inf.v0 v0.9.1 // indirect
6068
gopkg.in/ini.v1 v1.51.0 // indirect
61-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
62-
k8s.io/klog/v2 v2.4.0 // indirect
63-
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect
64-
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
65-
sigs.k8s.io/structured-merge-diff/v4 v4.0.2 // indirect
66-
sigs.k8s.io/yaml v1.2.0 // indirect
69+
gopkg.in/yaml.v3 v3.0.1 // indirect
70+
k8s.io/klog/v2 v2.80.1 // indirect
71+
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
72+
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect
73+
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
74+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
75+
sigs.k8s.io/yaml v1.3.0 // indirect
6776
)

0 commit comments

Comments
 (0)