Skip to content

Commit

Permalink
Armada 2666/CVE mitigation (#148) (#3614)
Browse files Browse the repository at this point in the history
* Armada 2666/CVE mitigation (#148)

* Fixing CVE-2024-24786

* Fixing CVE-2024-23840

* Empty commit

Signed-off-by: mustaily891 <[email protected]>

* Updating default go version

* Empty Commit

Signed-off-by: mustaily891 <[email protected]>

---------

Signed-off-by: mustaily891 <[email protected]>

* Mitigating CVE-2023-46129

* Mitigating CVE-2024-28180

* Bumping go version in goreleaser file, docs

---------

Signed-off-by: mustaily891 <[email protected]>
Co-authored-by: Mustafa Ilyas <[email protected]>
  • Loading branch information
MustafaI and mustafai-gr authored May 24, 2024
1 parent cabbc31 commit 6c8d8ab
Show file tree
Hide file tree
Showing 10 changed files with 163 additions and 248 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup-go-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ inputs:
description: "Prefix for the cache key"
required: true
go-version:
description: "Version of Go. Default 1.20"
description: "Version of Go. Default 1.21"
required: false
default: "1.20"
default: "1.21"
cache-tools:
description: "True/false flag to cache tools"
required: false
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
# To use a builder other than "default", set this variable.
# Necessary for, e.g., GitHub actions cache integration.
- DOCKER_BUILDX_BUILDER={{ if index .Env "DOCKER_BUILDX_BUILDER" }}{{ .Env.DOCKER_BUILDX_BUILDER }}{{ else }}default{{ end }}
- GOVERSION={{ if index .Env "GOVERSION" }}{{ .Env.GOVERSION }}{{ else }}go1.20{{ end }}
- GOVERSION={{ if index .Env "GOVERSION" }}{{ .Env.GOVERSION }}{{ else }}go1.21{{ end }}

builds:
- env: [CGO_ENABLED=0]
Expand Down
2 changes: 1 addition & 1 deletion docs/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Armada UI (lookout) can be found at this URL:
## Local prerequisites

- Git
- Go 1.20
- Go 1.21

## Obtain the armada source
Clone [this](https://github.com/armadaproject/armada) repository:
Expand Down
2 changes: 1 addition & 1 deletion docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Please see these documents for more information about Armadas Design:

## Pre-requisites

- [Go](https://go.dev/doc/install) (version 1.20 or later)
- [Go](https://go.dev/doc/install) (version 1.21 or later)
- gcc (for Windows, see, e.g., [tdm-gcc](https://jmeubank.github.io/tdm-gcc/))
- [mage](https://magefile.org/)
- [docker](https://docs.docker.com/get-docker/)
Expand Down
6 changes: 3 additions & 3 deletions docs/developer/aws-ec2.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ssh into your EC2 instance, become root and download the go package from [golang
<b>1. Extract the archive you downloaded into /usr/local, creating a Go tree in /usr/local/go with the following command:</b>

```
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz
```

<b>2. Configure .bashrc</b>
Expand All @@ -114,7 +114,7 @@ Add the following lines to your ~/.bashrc file as well, also create a golang fol

```
# Go envs
export GOVERSION=go1.20.1
export GOVERSION=go1.21.1
export GO_INSTALL_DIR=/usr/local/go
export GOROOT=$GO_INSTALL_DIR
export GOPATH=/home/ec2-user/golang
Expand All @@ -129,7 +129,7 @@ Verify that you’ve installed Go by opening a command prompt and typing the fol

```
go version
go version go1.20.1 linux/amd64
go version go1.21.1 linux/amd64
```

- ### Install [Kind](https://dev.to/rajitpaul_savesoil/setup-kind-kubernetes-in-docker-on-linux-3kbd)
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/manual-localdev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Here, we give an overview of a development setup for Armada that gives users full control over the Armada components and dependencies.

Before starting, please ensure you have installed [Go](https://go.dev/doc/install) (version 1.20 or later), gcc (for Windows, see, e.g., [tdm-gcc](https://jmeubank.github.io/tdm-gcc/)), [mage](https://magefile.org/), [docker](https://docs.docker.com/get-docker/), [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl), and, if you need to compile `.proto` files, [protoc](https://github.com/protocolbuffers/protobuf/releases).
Before starting, please ensure you have installed [Go](https://go.dev/doc/install) (version 1.21 or later), gcc (for Windows, see, e.g., [tdm-gcc](https://jmeubank.github.io/tdm-gcc/)), [mage](https://magefile.org/), [docker](https://docs.docker.com/get-docker/), [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl), and, if you need to compile `.proto` files, [protoc](https://github.com/protocolbuffers/protobuf/releases).

For a full list of mage commands, run `mage -l`.

Expand Down
6 changes: 3 additions & 3 deletions docs/developer/ubuntu-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ $ sudo apt install gcc make unzip
```

### Install Go, Protobuffers, and kubectl tools
Install the Go compiler and associated tools. Currently, the latest version is 1.20.5, but there may
Install the Go compiler and associated tools. Currently, the latest version is 1.21.1, but there may
be newer versions:

```
$ curl --location -O https://go.dev/dl/go1.20.5.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzvf go1.20.5.linux-amd64.tar.gl
$ curl --location -O https://go.dev/dl/go1.21.1.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzvf go1.21.1.linux-amd64.tar.gl
$ echo 'export PATH=$PATH:/usr/local/go/bin' > go.sh
$ sudo cp go.sh /etc/profile.d/
```
Expand Down
79 changes: 43 additions & 36 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/armadaproject/armada

go 1.20
go 1.21

toolchain go1.21.10

// [email protected] and onwards bundle encrypted signing keys with the source code.
// Because corporate proxies may block go get commands that pull in encrypted data,
Expand All @@ -17,9 +19,9 @@ require (
github.com/go-openapi/runtime v0.26.0
github.com/go-openapi/spec v0.20.14
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.3
github.com/golang/protobuf v1.5.4
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.4.0
github.com/google/uuid v1.6.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
Expand All @@ -38,22 +40,22 @@ require (
github.com/oklog/ulid v1.3.1
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_golang v1.17.0
github.com/rakyll/statik v0.1.7
github.com/renstrom/shortuuid v3.0.0+incompatible
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.15.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.8.4
github.com/weaveworks/promrus v1.2.0
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
golang.org/x/net v0.22.0
golang.org/x/oauth2 v0.18.0
golang.org/x/sync v0.6.0
golang.org/x/tools v0.18.0 // indirect
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
google.golang.org/grpc v1.57.1
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/grpc v1.59.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.22.4
k8s.io/apimachinery v0.22.4
Expand All @@ -77,20 +79,20 @@ require (
github.com/go-playground/validator/v10 v10.15.4
github.com/gogo/status v1.1.1
github.com/golang/mock v1.6.0
github.com/goreleaser/goreleaser v1.15.2
github.com/goreleaser/goreleaser v1.24.0
github.com/jackc/pgx/v5 v5.5.4
github.com/jessevdk/go-flags v1.5.0
github.com/magefile/mage v1.14.0
github.com/minio/highwayhash v1.0.2
github.com/openconfig/goyang v1.2.0
github.com/prometheus/common v0.39.0
github.com/prometheus/common v0.45.0
github.com/redis/go-redis/extra/redisprometheus/v9 v9.0.5
github.com/redis/go-redis/v9 v9.5.1
github.com/segmentio/fasthash v1.0.3
github.com/xitongsys/parquet-go v1.6.2
golang.org/x/time v0.3.0
golang.org/x/time v0.5.0
gonum.org/v1/gonum v0.14.0
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f
gopkg.in/inf.v0 v0.9.1
)

Expand All @@ -106,13 +108,15 @@ require (
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.4.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/caarlos0/log v0.4.4 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/charmbracelet/lipgloss v0.9.1 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
Expand All @@ -121,9 +125,9 @@ require (
github.com/elliotchance/orderedmap/v2 v2.2.0 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/color v1.14.1 // indirect
github.com/fortytw2/leaktest v1.3.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
Expand All @@ -140,36 +144,35 @@ require (
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/goreleaser/fileglob v1.3.0 // indirect
github.com/goreleaser/nfpm/v2 v2.29.0 // indirect
github.com/goreleaser/nfpm/v2 v2.35.3 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/iancoleman/orderedmap v0.2.0 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/invopop/jsonschema v0.7.0 // indirect
github.com/invopop/jsonschema v0.12.0 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/compress v1.17.5 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/linkedin/goavro/v2 v2.9.8 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/microcosm-cc/bluemonday v1.0.25 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand All @@ -178,21 +181,24 @@ require (
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
github.com/pierrec/lz4/v4 v4.1.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/pquerna/cachecontrol v0.1.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rivo/uniseg v0.4.2 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
Expand All @@ -203,17 +209,18 @@ require (
go.mongodb.org/mongo-driver v1.13.1 // indirect
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/protobuf v1.31.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/square/go-jose.v2 v2.4.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/cli-runtime v0.22.4 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
Expand Down
Loading

0 comments on commit 6c8d8ab

Please sign in to comment.