Upgrade backend dependencies and base images (#4360)

Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
This commit is contained in:
Sergio Castaño Arteaga 2025-04-23 09:28:05 +02:00 committed by GitHub
parent a788877ff8
commit 63d9a2c4e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 227 additions and 1548 deletions

View File

@ -10,7 +10,7 @@ permissions: read-all
jobs:
build-docker-images:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main

View File

@ -10,7 +10,7 @@ permissions: read-all
jobs:
lint-and-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4

View File

@ -10,7 +10,7 @@ permissions: read-all
jobs:
linter-backend:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
@ -25,13 +25,13 @@ jobs:
sudo tar -C /usr/local -xzf ${FILENAME}
sudo ldconfig /usr/local/lib
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: v1.64.5
version: v2.1.2
args: --timeout 10m
linter-openapi:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
@ -46,7 +46,7 @@ jobs:
VALIDATE_OPENAPI: true
linter-artifacthub:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
container:
image: artifacthub/ah
options: --user root
@ -58,7 +58,7 @@ jobs:
run: ah lint
linter-clomonitor:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
container:
@ -71,7 +71,7 @@ jobs:
run: clomonitor-linter --path . --url https://github.com/artifacthub/hub
tests-database:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
container:
image: artifacthub/db-tests
services:
@ -97,7 +97,7 @@ jobs:
run: PGPASSWORD=tests pg_prove --host postgres --dbname tests --username tests --verbose schema/*.sql functions/*/*.sql
tests-backend:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
@ -122,7 +122,7 @@ jobs:
run: go test -cover -race -v -mod=readonly ./...
tests-frontend:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
@ -149,7 +149,7 @@ jobs:
run: yarn test --watchAll=false --passWithNoTests --verbose --maxWorkers=4
tests-widget:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
@ -176,7 +176,7 @@ jobs:
run: yarn test --watchAll=false --passWithNoTests --verbose --maxWorkers=4
build-backend:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
@ -208,7 +208,7 @@ jobs:
run: go build -v
build-frontend:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
@ -229,7 +229,7 @@ jobs:
run: yarn build
build-widget:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:

View File

@ -12,7 +12,7 @@ jobs:
permissions:
security-events: write
name: Analyze
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:

View File

@ -9,7 +9,7 @@ permissions: read-all
jobs:
release:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main

View File

@ -1,5 +1,6 @@
version: "2"
linters:
disable-all: true
default: none
enable:
- asciicheck
- bodyclose
@ -8,9 +9,7 @@ linters:
- errorlint
- goconst
- gocritic
- goimports
- gosec
- gosimple
- govet
- ineffassign
- misspell
@ -18,20 +17,36 @@ linters:
- prealloc
- revive
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
fast: false
linters-settings:
gocritic:
disabled-checks:
- singleCaseSwitch
goconst:
min-occurrences: 5
revive:
rules:
- name: unused-parameter
disabled: true
settings:
goconst:
min-occurrences: 5
gocritic:
disabled-checks:
- singleCaseSwitch
revive:
rules:
- name: unused-parameter
disabled: true
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$

View File

@ -1,5 +1,5 @@
# Build ah
FROM golang:1.24.1-alpine3.21 AS ah-builder
FROM golang:1.24.2-alpine3.21 AS ah-builder
ARG VERSION
ARG GIT_COMMIT
WORKDIR /go/src/github.com/artifacthub/ah

View File

@ -1,5 +1,5 @@
# Build backend
FROM golang:1.24.1-alpine3.21 AS backend-builder
FROM golang:1.24.2-alpine3.21 AS backend-builder
WORKDIR /go/src/github.com/artifacthub/hub
COPY go.* ./
COPY cmd/hub cmd/hub

View File

@ -1,5 +1,5 @@
# Build scanner
FROM golang:1.24.1-alpine3.21 AS scanner-builder
FROM golang:1.24.2-alpine3.21 AS scanner-builder
WORKDIR /go/src/github.com/artifacthub/scanner
COPY go.* ./
COPY cmd/scanner cmd/scanner

View File

@ -1,5 +1,5 @@
# Build tracker
FROM golang:1.24.1-bullseye AS builder
FROM golang:1.24.2-bullseye AS builder
WORKDIR /tmp
ENV LIBTENSORFLOW_TGZ libtensorflow-cpu-linux-x86_64-2.11.0.tar.gz
RUN wget -q --no-check-certificate https://storage.googleapis.com/tensorflow/libtensorflow/$LIBTENSORFLOW_TGZ

View File

@ -1,5 +1,5 @@
# Build tern
FROM golang:1.24.1-alpine3.21 AS tern
FROM golang:1.24.2-alpine3.21 AS tern
RUN apk --no-cache add git
RUN go install github.com/jackc/tern@latest

View File

@ -1,5 +1,5 @@
# Build tern
FROM golang:1.24.1-alpine3.21 AS tern
FROM golang:1.24.2-alpine3.21 AS tern
RUN apk --no-cache add git
RUN go get -u github.com/jackc/tern

153
go.mod
View File

@ -4,7 +4,7 @@ go 1.24.0
require (
github.com/Masterminds/semver/v3 v3.3.1
github.com/aquasecurity/trivy v0.60.0
github.com/aquasecurity/trivy v0.61.1
github.com/coreos/go-oidc v2.3.0+incompatible
github.com/disintegration/imaging v1.6.2
github.com/domodwyer/mailyak v3.1.1+incompatible
@ -12,10 +12,10 @@ require (
github.com/galeone/tfgo v0.0.0-20230715013254-16113111dc99
github.com/go-chi/chi/v5 v5.2.1
github.com/go-enry/go-license-detector/v4 v4.3.1
github.com/go-git/go-git/v5 v5.14.0
github.com/go-git/go-git/v5 v5.16.0
github.com/google/go-containerregistry v0.20.3
github.com/google/go-github v17.0.0+incompatible
github.com/gorilla/csrf v1.7.2
github.com/gorilla/csrf v1.7.3
github.com/gorilla/feeds v1.2.0
github.com/gorilla/securecookie v1.1.2
github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c
@ -24,50 +24,48 @@ require (
github.com/jackc/pgconn v1.14.3
github.com/jackc/pgx/v4 v4.18.3
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/open-policy-agent/opa v1.2.0
github.com/open-policy-agent/opa v1.3.0
github.com/opencontainers/image-spec v1.1.1
github.com/operator-framework/api v0.30.0
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pquerna/otp v1.4.0
github.com/prometheus/client_golang v1.21.1
github.com/prometheus/client_golang v1.22.0
github.com/rs/cors v1.11.1
github.com/rs/zerolog v1.33.0
github.com/rs/zerolog v1.34.0
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/satori/uuid v1.2.0
github.com/sigstore/cosign v1.13.6
github.com/spf13/cobra v1.9.1
github.com/spf13/viper v1.20.0
github.com/spf13/viper v1.20.1
github.com/stretchr/testify v1.10.0
github.com/tektoncd/pipeline v0.69.0
github.com/tektoncd/pipeline v0.70.0
github.com/unrolled/secure v1.17.0
github.com/versine/loginauth v0.0.0-20170330164406-8380ec243689
github.com/vincent-petithory/dataurl v1.0.0
github.com/wagslane/go-password-validator v0.3.0
github.com/writeas/go-strip-markdown v2.0.1+incompatible
golang.org/x/crypto v0.36.0
golang.org/x/oauth2 v0.28.0
golang.org/x/text v0.23.0
google.golang.org/api v0.226.0
golang.org/x/crypto v0.37.0
golang.org/x/oauth2 v0.29.0
golang.org/x/text v0.24.0
google.golang.org/api v0.230.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.17.2
helm.sh/helm/v3 v3.17.3
k8s.io/apimachinery v0.32.3
oras.land/oras-go v1.2.6
sigs.k8s.io/krew v0.4.4
sigs.k8s.io/krew v0.4.5
sigs.k8s.io/yaml v1.4.0
)
require (
cel.dev/expr v0.19.1 // indirect
cel.dev/expr v0.20.0 // indirect
cloud.google.com/go v0.116.0 // indirect
cloud.google.com/go/auth v0.15.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect
cloud.google.com/go/auth v0.16.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
cloud.google.com/go/compute/metadata v0.6.0 // indirect
cloud.google.com/go/iam v1.2.2 // indirect
cloud.google.com/go/kms v1.20.5 // indirect
cloud.google.com/go/longrunning v0.6.2 // indirect
cloud.google.com/go/monitoring v1.21.2 // indirect
cloud.google.com/go/storage v1.49.0 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
dario.cat/mergo v1.0.1 // indirect
@ -89,51 +87,36 @@ require (
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/Masterminds/squirrel v1.5.4 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/ProtonMail/go-crypto v1.1.5 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/ProtonMail/go-crypto v1.1.6 // indirect
github.com/agnivade/levenshtein v1.2.1 // indirect
github.com/alecthomas/chroma v0.10.0 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/aquasecurity/go-version v0.0.1 // indirect
github.com/aquasecurity/iamgo v0.0.10 // indirect
github.com/aquasecurity/jfather v0.0.8 // indirect
github.com/aquasecurity/trivy-checks v1.7.1 // indirect
github.com/aquasecurity/trivy-db v0.0.0-20250227071930-8bd8a9b89e2d // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.55.6 // indirect
github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.8 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.61 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.9 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.62 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ecr v1.42.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ecr v1.42.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect
github.com/aws/aws-sdk-go-v2/service/kms v1.37.13 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.78.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.25.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.16 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.25.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect
github.com/aws/smithy-go v1.22.3 // indirect
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230510185313-f5e39e5f34c7 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.8.1 // indirect
github.com/boombuler/barcode v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
@ -141,32 +124,27 @@ require (
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect
github.com/cloudevents/sdk-go/v2 v2.15.2 // indirect
github.com/cloudflare/circl v1.6.0 // indirect
github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/containerd/containerd v1.7.27 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v1.0.0-rc.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/containerd/typeurl/v2 v2.2.3 // indirect
github.com/creack/pty v1.1.24 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgryski/go-minhash v0.0.0-20190315135803-ad340ca03076 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/docker/cli v27.5.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v27.5.0+incompatible // indirect
github.com/docker/docker v27.5.1+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.2 // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/ekzhu/minhash-lsh v0.0.0-20190924033628-faac2c6342f8 // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
@ -181,7 +159,6 @@ require (
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.4 // indirect
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/go-json-experiment/json v0.0.0-20250211171154-1ae217ad3535 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
@ -199,12 +176,12 @@ require (
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/cel-go v0.23.2 // indirect
github.com/google/cel-go v0.24.1 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20240108195214-a0658aa1d0cc // indirect
@ -214,27 +191,22 @@ require (
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.5 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/gosuri/uitable v0.0.4 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.8 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
github.com/hashicorp/hcl/v2 v2.23.0 // indirect
github.com/hashicorp/vault/api v1.16.0 // indirect
github.com/hhatto/gorst v0.0.0-20181029133204-ca9f730cac5b // indirect
github.com/huandu/xstrings v1.5.0 // indirect
@ -249,36 +221,27 @@ require (
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jdkato/prose v1.2.1 // indirect
github.com/jellydator/ttlcache/v3 v3.3.0 // indirect
github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/letsencrypt/boulder v0.0.0-20240620165639-de9c06129bec // indirect
github.com/liamg/memoryfs v1.6.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/masahiro331/go-disk v0.0.0-20240625071113-56c933208fee // indirect
github.com/masahiro331/go-ext4-filesystem v0.0.0-20240620024024-ca14e6327bbd // indirect
github.com/masahiro331/go-xfs-filesystem v0.0.0-20231205045356-1b22259a6c44 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/buildkit v0.18.2 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/term v0.5.0 // indirect
@ -290,14 +253,12 @@ require (
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/owenrumney/squealer v1.2.11 // indirect
github.com/package-url/packageurl-go v0.1.3 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pjbgf/sha1cd v0.3.2 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // 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.6.1 // indirect
@ -335,11 +296,7 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tchap/go-patricia/v2 v2.3.2 // indirect
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
github.com/tonistiigi/go-csvvalue v0.0.0-20240710180619-ddb21b71c0b4 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/vbatts/tar-split v0.11.6 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
@ -347,42 +304,37 @@ require (
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/yashtewari/glob-intersection v0.2.0 // indirect
github.com/zclconf/go-cty v1.16.2 // indirect
github.com/zclconf/go-cty-yaml v1.1.0 // indirect
github.com/zeebo/errs v1.4.0 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect
go.opentelemetry.io/otel v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect
go.opentelemetry.io/otel/metric v1.34.0 // indirect
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect
go.opentelemetry.io/otel/trace v1.34.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/sdk v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
golang.org/x/image v0.18.0 // indirect
golang.org/x/mod v0.23.0 // indirect
golang.org/x/net v0.37.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/term v0.31.0 // indirect
golang.org/x/time v0.11.0 // indirect
golang.org/x/tools v0.29.0 // indirect
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
gonum.org/v1/gonum v0.11.0 // indirect
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/grpc v1.71.0 // indirect
google.golang.org/protobuf v1.36.5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect
google.golang.org/grpc v1.72.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
@ -391,15 +343,14 @@ require (
k8s.io/api v0.32.3 // indirect
k8s.io/apiextensions-apiserver v0.32.2 // indirect
k8s.io/apiserver v0.32.2 // indirect
k8s.io/cli-runtime v0.32.2 // indirect
k8s.io/cli-runtime v0.32.3 // indirect
k8s.io/client-go v11.0.0+incompatible // indirect
k8s.io/component-base v0.32.2 // indirect
k8s.io/component-base v0.32.3 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
k8s.io/kubectl v0.32.2 // indirect
k8s.io/kubectl v0.32.3 // indirect
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
knative.dev/pkg v0.0.0-20250117084104-c43477f0052b // indirect
mvdan.cc/sh/v3 v3.10.0 // indirect
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
sigs.k8s.io/kustomize/api v0.18.0 // indirect
sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect

1515
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -97,7 +97,7 @@ func (s *TrackerSource) GetPackagesAvailable() (map[string]*hub.Package, error)
p, err := PreparePackage(s.i.Repository, manifest, manifestRaw)
if err != nil {
s.warn(fmt.Errorf("error preparing package %s version %s: %w",
manifest.ObjectMeta.Name,
manifest.Name,
manifest.Spec.Version,
err,
))
@ -136,7 +136,7 @@ func GetManifest(pluginManifestPath string) (*index.Plugin, []byte, error) {
func validateManifest(manifest *index.Plugin) error {
var errs *multierror.Error
if manifest.ObjectMeta.Name == "" {
if manifest.Name == "" {
errs = multierror.Append(errs, errors.New("name not provided"))
}
if manifest.Spec.Version == "" {
@ -154,7 +154,7 @@ func validateManifest(manifest *index.Plugin) error {
// PreparePackage prepares a package version using the plugin manifest provided.
func PreparePackage(r *hub.Repository, manifest *index.Plugin, manifestRaw []byte) (*hub.Package, error) {
// Validate plugin manifest
name := manifest.ObjectMeta.Name
name := manifest.Name
if err := validateManifest(manifest); err != nil {
return nil, fmt.Errorf("invalid manifest for plugin (%s) version (%s): %w", name, manifest.Spec.Version, err)
}

View File

@ -181,7 +181,7 @@ func (m *Manager) ApproveSession(ctx context.Context, sessionID, passcode string
return err
}
validRecoveryCodeProvided := isValidRecoveryCode(c.RecoveryCodes, passcode)
if !(totp.Validate(passcode, key.Secret()) || validRecoveryCodeProvided) {
if !totp.Validate(passcode, key.Secret()) && !validRecoveryCodeProvided {
return errInvalidTFAPasscode
}
@ -373,7 +373,7 @@ func (m *Manager) DisableTFA(ctx context.Context, passcode string) error {
if err != nil {
return err
}
if !(totp.Validate(passcode, key.Secret()) || isValidRecoveryCode(c.RecoveryCodes, passcode)) {
if !totp.Validate(passcode, key.Secret()) && !isValidRecoveryCode(c.RecoveryCodes, passcode) {
return errInvalidTFAPasscode
}

View File

@ -65,7 +65,7 @@ func setupRestrictedHTTPClient(timeout time.Duration) hub.HTTPClient {
// checkRestrictions checks if a connection to the provided network and address
// should be restricted.
func checkRestrictions(network string, address string, conn syscall.RawConn) error {
if !(network == "tcp4" || network == "tcp6") {
if network != "tcp4" && network != "tcp6" {
return ErrRestrictedConnection
}
host, _, err := net.SplitHostPort(address)