Skip to content

Commit f34aee2

Browse files
authored
INS-2031: Bump libs and fix vulnerabilities for insights-cli (#309)
* Bump * Bump * Bump * FIx * Fix * Fix * Fix * Fix
1 parent 3d797f7 commit f34aee2

6 files changed

Lines changed: 176 additions & 184 deletions

File tree

.circleci/config.yml

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,36 @@ references:
99
command: |
1010
apk --update add curl yq
1111
cd /tmp
12-
curl -LO https://releases.hashicorp.com/vault/1.21.1/vault_1.21.1_linux_amd64.zip
13-
unzip vault_1.21.1_linux_amd64.zip
12+
curl -LO https://releases.hashicorp.com/vault/1.21.4/vault_1.21.4_linux_amd64.zip
13+
sha256sum vault_1.21.4_linux_amd64.zip | grep 889b681990fe221b884b7932fa9c9dd0ee9811b9349554f1aa287ab63c9f3dae
14+
unzip vault_1.21.4_linux_amd64.zip
1415
mv vault /usr/bin/vault
16+
install_vault_machine: &install_vault_machine
17+
run:
18+
name: install hashicorp vault
19+
command: |
20+
sudo apt-get update -y && sudo apt-get install -y curl unzip
21+
cd /tmp
22+
curl -LO https://releases.hashicorp.com/vault/1.21.4/vault_1.21.4_linux_amd64.zip
23+
echo '889b681990fe221b884b7932fa9c9dd0ee9811b9349554f1aa287ab63c9f3dae vault_1.21.4_linux_amd64.zip' | sha256sum -c
24+
unzip -o vault_1.21.4_linux_amd64.zip
25+
sudo mv vault /usr/bin/vault
26+
setup_qemu_binfmt: &setup_qemu_binfmt
27+
run:
28+
name: Setup QEMU for multi-arch Docker builds
29+
command: |
30+
sudo apt-get update -y
31+
sudo apt-get install -y qemu-user-static binfmt-support
32+
docker buildx create --use || true
33+
docker buildx inspect --bootstrap
1534
1635
jobs:
1736
test:
1837
working_directory: /home/circleci/go/src/github.com/fairwindsops/insights-cli
1938
resource_class: large
2039
docker:
2140
# Note the goreleaser version is also referenced in the release and snapshot jobs.
22-
- image: goreleaser/goreleaser:v2.13.1
41+
- image: goreleaser/goreleaser:v2.14.2
2342
steps:
2443
- checkout
2544
- run:
@@ -31,7 +50,7 @@ jobs:
3150
echo "$output"
3251
exit 1
3352
fi
34-
wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b /usr/local/bin v2.7.2
53+
wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b /usr/local/bin v2.11.2
3554
golangci-lint run -v --timeout 2m0s
3655
- run: ./.circleci/scripts/e2e-env.sh
3756
- *install_vault
@@ -43,47 +62,54 @@ jobs:
4362
go test -tags e2e ./...
4463
go vet ./...
4564
snapshot:
46-
working_directory: /go/src/github.com/fairwindsops/insights-cli
65+
machine:
66+
image: ubuntu-2204:current
4767
resource_class: large
48-
docker:
49-
# Note the goreleaser version is also referenced in the release and test jobs.
50-
- image: goreleaser/goreleaser:v2.13.1
5168
steps:
5269
- checkout
53-
- setup_remote_docker:
54-
version: docker27
55-
- run: goreleaser --snapshot
56-
# Avoid copying both archive files and the directories used to create them.
70+
- *setup_qemu_binfmt
71+
- run:
72+
name: Run GoReleaser snapshot
73+
command: |
74+
docker run --rm \
75+
-v /var/run/docker.sock:/var/run/docker.sock \
76+
-v "$(pwd):/workspace" -w /workspace \
77+
-e CIRCLE_SHA1 -e CIRCLE_BRANCH -e CIRCLE_TAG \
78+
goreleaser/goreleaser:v2.14.2 --snapshot
5779
- run: mkdir snapshot-artifacts && cp dist/*.tar.gz dist/*.txt dist/*.json snapshot-artifacts
5880
- store_artifacts:
5981
path: snapshot-artifacts
6082
release:
61-
working_directory: /go/src/github.com/fairwindsops/insights-cli
83+
machine:
84+
image: ubuntu-2204:current
6285
resource_class: large
6386
shell: /bin/bash
64-
docker:
65-
# Note the goreleaser version is also referenced in the snapshot and test jobs.
66-
- image: goreleaser/goreleaser:v2.13.1
6787
steps:
6888
- checkout
6989
- run: ./.circleci/scripts/e2e-env.sh
70-
- *install_vault
90+
- *install_vault_machine
7191
- rok8s/get_vault_env:
7292
vault_path: repo/global/env
7393
- rok8s/get_vault_env:
7494
vault_path: repo/insights-cli/env
7595
- run: |
76-
wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b /usr/local/bin v2.7.2
96+
wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b /usr/local/bin v2.11.2
7797
golangci-lint run -v --timeout 2m0s
7898
go test -tags e2e ./pkg/...
79-
- setup_remote_docker:
80-
version: docker27
8199
- rok8s/docker_login:
82100
registry: "quay.io"
83101
username: $FAIRWINDS_QUAY_USER
84102
password-variable: FAIRWINDS_QUAY_TOKEN
85-
- run: echo 'export GORELEASER_CURRENT_TAG="${CIRCLE_TAG}"' >> $BASH_ENV
86-
- run: goreleaser
103+
- *setup_qemu_binfmt
104+
- run:
105+
name: Run GoReleaser release
106+
command: |
107+
export GORELEASER_CURRENT_TAG="${CIRCLE_TAG}"
108+
docker run --rm \
109+
-v /var/run/docker.sock:/var/run/docker.sock \
110+
-v "$(pwd):/workspace" -w /workspace \
111+
-e GORELEASER_CURRENT_TAG -e CIRCLE_TAG -e CIRCLE_SHA1 \
112+
goreleaser/goreleaser:v2.14.2
87113
88114
workflows:
89115
version: 2

.goreleaser.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ builds:
3535
ignore:
3636
- goos: windows
3737
goarch: arm64
38+
# windows/arm port not supported by Go
39+
- goos: windows
40+
goarch: arm
3841
changelog:
3942
sort: asc
4043
filters:

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
FROM alpine:3.23
2+
3+
RUN apk update && apk -U upgrade --no-cache
24
USER nobody
35
# The insights-cli binary will have been built by goreleaser.
46
COPY insights-cli /

go.mod

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
module github.com/fairwindsops/insights-cli
22

3-
go 1.25.5
3+
go 1.26
44

55
require (
6-
github.com/fairwindsops/insights-plugins/plugins/opa v0.0.0-20260216175003-0d2b5796f2f4
6+
github.com/fairwindsops/insights-plugins/plugins/opa v0.0.0-20260303202014-f10e759073ed
77
github.com/fatih/color v1.18.0
88
github.com/google/go-cmp v0.7.0
99
github.com/hashicorp/go-multierror v1.1.1
1010
github.com/imroc/req/v3 v3.57.0
11-
github.com/open-policy-agent/opa v1.13.2
11+
github.com/open-policy-agent/opa v1.14.1
1212
github.com/rogpeppe/go-internal v1.14.1
13-
github.com/samber/lo v1.52.0
13+
github.com/samber/lo v1.53.0
1414
github.com/sirupsen/logrus v1.9.4
1515
github.com/spf13/cobra v1.10.2
1616
github.com/stretchr/testify v1.11.1
1717
github.com/xlab/treeprint v1.2.0
18-
go.yaml.in/yaml/v2 v2.4.3
18+
go.yaml.in/yaml/v2 v2.4.4
1919
go.yaml.in/yaml/v3 v3.0.4
2020
gopkg.in/yaml.v2 v2.4.0
2121
gopkg.in/yaml.v3 v3.0.1
22-
k8s.io/apimachinery v0.35.1
22+
k8s.io/apimachinery v0.35.2
2323
sigs.k8s.io/yaml v1.6.0
2424
)
2525

@@ -29,27 +29,26 @@ require (
2929
github.com/beorn7/perks v1.0.1 // indirect
3030
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3131
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
32-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
32+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 // indirect
3333
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
3434
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
3535
github.com/fsnotify/fsnotify v1.9.0 // indirect
3636
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
3737
github.com/go-logr/logr v1.4.3 // indirect
38-
github.com/go-logr/stdr v1.2.2 // indirect
39-
github.com/go-openapi/jsonpointer v0.22.4 // indirect
40-
github.com/go-openapi/jsonreference v0.21.4 // indirect
41-
github.com/go-openapi/swag v0.25.4 // indirect
42-
github.com/go-openapi/swag/cmdutils v0.25.4 // indirect
43-
github.com/go-openapi/swag/conv v0.25.4 // indirect
44-
github.com/go-openapi/swag/fileutils v0.25.4 // indirect
45-
github.com/go-openapi/swag/jsonname v0.25.4 // indirect
46-
github.com/go-openapi/swag/jsonutils v0.25.4 // indirect
47-
github.com/go-openapi/swag/loading v0.25.4 // indirect
48-
github.com/go-openapi/swag/mangling v0.25.4 // indirect
49-
github.com/go-openapi/swag/netutils v0.25.4 // indirect
50-
github.com/go-openapi/swag/stringutils v0.25.4 // indirect
51-
github.com/go-openapi/swag/typeutils v0.25.4 // indirect
52-
github.com/go-openapi/swag/yamlutils v0.25.4 // indirect
38+
github.com/go-openapi/jsonpointer v0.22.5 // indirect
39+
github.com/go-openapi/jsonreference v0.21.5 // indirect
40+
github.com/go-openapi/swag v0.25.5 // indirect
41+
github.com/go-openapi/swag/cmdutils v0.25.5 // indirect
42+
github.com/go-openapi/swag/conv v0.25.5 // indirect
43+
github.com/go-openapi/swag/fileutils v0.25.5 // indirect
44+
github.com/go-openapi/swag/jsonname v0.25.5 // indirect
45+
github.com/go-openapi/swag/jsonutils v0.25.5 // indirect
46+
github.com/go-openapi/swag/loading v0.25.5 // indirect
47+
github.com/go-openapi/swag/mangling v0.25.5 // indirect
48+
github.com/go-openapi/swag/netutils v0.25.5 // indirect
49+
github.com/go-openapi/swag/stringutils v0.25.5 // indirect
50+
github.com/go-openapi/swag/typeutils v0.25.5 // indirect
51+
github.com/go-openapi/swag/yamlutils v0.25.5 // indirect
5352
github.com/gobwas/glob v0.2.3 // indirect
5453
github.com/goccy/go-json v0.10.5 // indirect
5554
github.com/google/btree v1.1.3 // indirect
@@ -77,46 +76,41 @@ require (
7776
github.com/prometheus/client_golang v1.23.2 // indirect
7877
github.com/prometheus/client_model v0.6.2 // indirect
7978
github.com/prometheus/common v0.67.5 // indirect
80-
github.com/prometheus/procfs v0.19.2 // indirect
79+
github.com/prometheus/procfs v0.20.1 // indirect
8180
github.com/quic-go/qpack v0.6.0 // indirect
8281
github.com/quic-go/quic-go v0.58.0 // indirect
8382
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect
8483
github.com/refraction-networking/utls v1.8.2 // indirect
8584
github.com/segmentio/asm v1.2.1 // indirect
8685
github.com/spf13/pflag v1.0.10 // indirect
8786
github.com/tchap/go-patricia/v2 v2.3.3 // indirect
88-
github.com/valyala/fastjson v1.6.7 // indirect
89-
github.com/vektah/gqlparser/v2 v2.5.31 // indirect
87+
github.com/valyala/fastjson v1.6.10 // indirect
88+
github.com/vektah/gqlparser/v2 v2.5.32 // indirect
9089
github.com/x448/float16 v0.8.4 // indirect
9190
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
9291
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
9392
github.com/yashtewari/glob-intersection v0.2.0 // indirect
94-
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
95-
go.opentelemetry.io/otel v1.40.0 // indirect
96-
go.opentelemetry.io/otel/metric v1.40.0 // indirect
97-
go.opentelemetry.io/otel/sdk v1.40.0 // indirect
98-
go.opentelemetry.io/otel/trace v1.40.0 // indirect
93+
go.opentelemetry.io/otel v1.42.0 // indirect
9994
golang.org/x/crypto v0.48.0 // indirect
100-
golang.org/x/net v0.50.0 // indirect
101-
golang.org/x/oauth2 v0.35.0 // indirect
102-
golang.org/x/sync v0.19.0 // indirect
103-
golang.org/x/sys v0.41.0 // indirect
95+
golang.org/x/net v0.51.0 // indirect
96+
golang.org/x/oauth2 v0.36.0 // indirect
97+
golang.org/x/sync v0.20.0 // indirect
98+
golang.org/x/sys v0.42.0 // indirect
10499
golang.org/x/term v0.40.0 // indirect
105100
golang.org/x/text v0.34.0 // indirect
106-
golang.org/x/time v0.14.0 // indirect
107-
golang.org/x/tools v0.41.0 // indirect
101+
golang.org/x/time v0.15.0 // indirect
102+
golang.org/x/tools v0.42.0 // indirect
108103
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
109104
google.golang.org/protobuf v1.36.11 // indirect
110105
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
111106
gopkg.in/inf.v0 v0.9.1 // indirect
112-
gopkg.in/ini.v1 v1.67.1 // indirect
113-
k8s.io/api v0.35.1 // indirect
114-
k8s.io/apiextensions-apiserver v0.35.1 // indirect
115-
k8s.io/client-go v0.35.1 // indirect
116-
k8s.io/klog/v2 v2.130.1 // indirect
117-
k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 // indirect
107+
k8s.io/api v0.35.2 // indirect
108+
k8s.io/apiextensions-apiserver v0.35.2 // indirect
109+
k8s.io/client-go v0.35.2 // indirect
110+
k8s.io/klog/v2 v2.140.0 // indirect
111+
k8s.io/kube-openapi v0.0.0-20260304202019-5b3e3fdb0acf // indirect
118112
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
119-
sigs.k8s.io/controller-runtime v0.23.1 // indirect
113+
sigs.k8s.io/controller-runtime v0.23.3 // indirect
120114
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
121115
sigs.k8s.io/randfill v1.0.0 // indirect
122116
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect

0 commit comments

Comments
 (0)