Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 64 additions & 67 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,67 +1,68 @@
module github.com/kubeservice-stack/common

go 1.26
go 1.26.0

require (
github.com/BurntSushi/toml v1.5.0
github.com/BurntSushi/toml v1.6.0
github.com/asjdf/gorm-cache v1.3.0
github.com/caarlos0/env/v10 v10.0.0
github.com/efficientgo/core v1.0.0-rc.3
github.com/gin-gonic/gin v1.11.0
github.com/gin-gonic/gin v1.12.0
github.com/glebarez/sqlite v1.11.0
github.com/go-kit/log v0.2.1
github.com/go-sql-driver/mysql v1.9.2
github.com/go-sql-driver/mysql v1.10.0
github.com/mattn/go-isatty v0.0.22
github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2
github.com/opentracing/opentracing-go v1.2.0
github.com/prometheus/client_golang v1.23.2
github.com/redis/go-redis/v9 v9.19.0
github.com/redis/go-redis/v9 v9.20.0
github.com/stretchr/testify v1.11.1
github.com/uber-go/tally v3.5.0+incompatible
github.com/vmihailenco/msgpack/v5 v5.4.1
go.etcd.io/etcd/api/v3 v3.5.21
go.etcd.io/etcd/client/v3 v3.5.21
go.etcd.io/etcd/server/v3 v3.5.21
go.opentelemetry.io/contrib/propagators/autoprop v0.63.0
go.opentelemetry.io/contrib/samplers/jaegerremote v0.37.0
go.opentelemetry.io/otel v1.43.0
go.opentelemetry.io/otel/bridge/opentracing v1.36.0
go.opentelemetry.io/otel/exporters/jaeger v1.16.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0
go.opentelemetry.io/otel/sdk v1.43.0
go.opentelemetry.io/otel/trace v1.43.0
go.etcd.io/etcd/api/v3 v3.6.12
go.etcd.io/etcd/client/v3 v3.6.12
go.etcd.io/etcd/server/v3 v3.6.12
go.opentelemetry.io/contrib/propagators/autoprop v0.69.0
go.opentelemetry.io/contrib/samplers/jaegerremote v0.37.1
go.opentelemetry.io/otel v1.44.0
go.opentelemetry.io/otel/bridge/opentracing v1.44.0
go.opentelemetry.io/otel/exporters/jaeger v1.17.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0
go.opentelemetry.io/otel/sdk v1.44.0
go.opentelemetry.io/otel/trace v1.44.0
go.uber.org/atomic v1.11.0
go.uber.org/zap v1.27.0
golang.org/x/sys v0.42.0
google.golang.org/grpc v1.80.0
go.uber.org/zap v1.28.0
golang.org/x/sys v0.45.0
google.golang.org/grpc v1.81.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod: require/replace for google.golang.org/grpc =="
# Print relevant sections around the reported lines and any grpc-related directives
if [ -f go.mod ]; then
  echo "--- Top (lines 1-120) ---"
  sed -n '1,120p' go.mod | nl -ba | sed -n '1,120p'
  echo "--- Middle (lines 120-220) ---"
  sed -n '120,220p' go.mod | nl -ba | sed -n '1,120p'
  echo "--- Exact matches for grpc ---"
  rg -n "google\.golang\.org/grpc" go.mod || true
else
  echo "go.mod not found at repo root"
fi

Repository: kubeservice-stack/common

Length of output: 212


🌐 Web query:

GHSA auth bypass google.golang.org/grpc v1.63.2

💡 Result:

The security vulnerability you are inquiring about is identified as CVE-2026-33186 (also tracked as GHSA-p77j-4mvh-x3m3) [1][2]. It is an authorization bypass vulnerability in the gRPC-Go library (google.golang.org/grpc) that allows an attacker to potentially circumvent path-based authorization policies [3][4][5]. The issue arises because, in versions prior to 1.79.3, the gRPC-Go server was overly permissive when processing the HTTP/2:path pseudo-header [3][6]. According to RFC 7540, this header must begin with a leading slash (e.g., /Service/Method) [6]. However, previous versions of the library accepted requests where this leading slash was omitted (e.g., Service/Method) [3][7]. While the server correctly routed these malformed requests to the appropriate handler, the raw, non-canonical path string was passed to authorization interceptors (such as the official grpc/authz package) [3][8][1]. Consequently, if a server's security policy relied on "deny" rules based on canonical paths (starting with /) but contained a fallback "allow" rule, the policy would fail to match the incoming non-canonical path, resulting in an authorization bypass [3][4][5]. This vulnerability is patched in google.golang.org/grpc version 1.79.3 [3][1][5]. The fix ensures that any request with a:path header lacking a leading slash is immediately rejected with a codes.Unimplemented error, preventing the request from reaching authorization interceptors [3][4][1]. Note: The version 1.63.2 referenced in your query is an affected version, as it is earlier than 1.79.3 [1][2]. Users are strongly advised to upgrade to 1.79.3 or newer [3][1][5]. If an immediate upgrade is not possible, mitigations include implementing a validating interceptor to reject malformed paths, ensuring infrastructure-level normalization of HTTP/2 headers, or hardening authorization policies to default-deny [4][8][5].

Citations:


🌐 Web query:

google.golang.org/grpc 1.63.2 security advisory

💡 Result:

There is no security advisory specifically targeting version 1.63.2 of the google.golang.org/grpc library [1][2]. Version 1.63.2 was released in April 2024 to address minor bug fixes, such as correcting user agent strings and un-deprecating certain API methods [2]. The security-related information you may have encountered is likely conflated with a more recent vulnerability, CVE-2026-33186 (GHSA-p77j-4mvh-x3m3), which affects gRPC-Go versions prior to 1.79.3 [3][4][5]. This vulnerability involves an authorization bypass caused by improper input validation of the HTTP/2:path pseudo-header [3][5]. It specifically impacts servers that use path-based authorization interceptors and have specific "deny" rules for canonical paths [4][5][6]. Users of earlier versions, including 1.63.2, are advised to upgrade to version 1.79.3 or newer to mitigate this issue [3][4][5].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod: exact grpc require/replace directives =="

# Show all grpc-related directives with line numbers using awk (no nl dependency)
awk '{ if ($0 ~ /google\.golang\.org\/grpc/) print NR ":" $0 }' go.mod || true

echo
echo "== go.mod: context around reported lines (38 and 170) =="

for ln in 38 170; do
  start=$((ln-5))
  end=$((ln+5))
  echo "--- around line $ln ($start-$end) ---"
  sed -n "${start},${end}p" go.mod | nl -ba
done

Repository: kubeservice-stack/common

Length of output: 476


Critical security fix: grpc is still pinned to vulnerable v1.63.2 via replace

go.mod requires google.golang.org/grpc v1.81.1 (line 38), but replace google.golang.org/grpc => google.golang.org/grpc v1.63.2 (line 170) overrides it—so the resolved dependency remains v1.63.2. That version is affected by GHSA-p77j-4mvh-x3m3 / CVE-2026-33186 (patched in grpc v1.79.3).

Suggested fix
-replace google.golang.org/grpc => google.golang.org/grpc v1.63.2
+replace google.golang.org/grpc => google.golang.org/grpc v1.81.1
🧰 Tools
🪛 OSV Scanner (2.3.8)

[CRITICAL] 38-38: google.golang.org/grpc 1.63.2: Authorization bypass in gRPC-Go via missing leading slash in :path in google.golang.org/grpc

(GO-2026-4762)


[CRITICAL] 38-38: google.golang.org/grpc 1.63.2: gRPC-Go has an authorization bypass via missing leading slash in :path

(GHSA-p77j-4mvh-x3m3)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` at line 38, The go.mod pins grpc to a vulnerable version via the
replace directive "replace google.golang.org/grpc => google.golang.org/grpc
v1.63.2" which overrides the required "google.golang.org/grpc v1.81.1"; remove
or update that replace to a safe release (at minimum v1.79.3, ideally v1.81.1)
so the resolved module is not v1.63.2, then run go mod tidy to refresh go.sum
and verify builds/tests; look for and update the exact "replace
google.golang.org/grpc => google.golang.org/grpc v1.63.2" line and ensure the
require entry "google.golang.org/grpc v1.81.1" is preserved.

Source: Linters/SAST tools

gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/yaml.v2 v2.4.0
gorm.io/driver/mysql v1.6.0
gorm.io/driver/postgres v1.6.0
gorm.io/gorm v1.31.1
gorm.io/plugin/opentelemetry v0.1.16
k8s.io/client-go v0.34.1
k8s.io/client-go v0.36.1
)

require (
filippo.io/edwards25519 v1.1.0 // indirect
filippo.io/edwards25519 v1.2.0 // indirect
github.com/ClickHouse/ch-go v0.61.5 // indirect
github.com/ClickHouse/clickhouse-go/v2 v2.30.0 // indirect
github.com/andybalholm/brotli v1.1.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bluele/gcache v0.0.2 // indirect
github.com/bytedance/sonic v1.14.0 // indirect
github.com/bytedance/sonic/loader v0.3.0 // indirect
github.com/bytedance/gopkg v0.1.3 // indirect
github.com/bytedance/sonic v1.15.0 // indirect
github.com/bytedance/sonic/loader v0.5.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudwego/base64x v0.1.6 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
github.com/gabriel-vasile/mimetype v1.4.12 // indirect
github.com/gin-contrib/sse v1.1.0 // indirect
github.com/glebarez/go-sqlite v1.21.2 // indirect
github.com/go-faster/city v1.0.1 // indirect
Expand All @@ -71,33 +72,32 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.27.0 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/go-playground/validator/v10 v10.30.1 // indirect
github.com/goccy/go-json v0.10.5 // indirect
github.com/goccy/go-yaml v1.19.2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgx/v5 v5.6.0 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/jaegertracing/jaeger-idl v0.6.0 // indirect
github.com/jaegertracing/jaeger-idl v0.9.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/jonboulle/clockwork v0.5.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/karlseguin/ccache/v3 v3.0.3 // indirect
github.com/klauspost/compress v1.18.0 // indirect
Expand All @@ -118,55 +118,52 @@ require (
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.66.1 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
github.com/quic-go/qpack v0.5.1 // indirect
github.com/quic-go/quic-go v0.54.0 // indirect
github.com/quic-go/qpack v0.6.0 // indirect
github.com/quic-go/quic-go v0.59.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/twmb/murmur3 v1.1.6 // indirect
github.com/ugorji/go/codec v1.3.0 // indirect
github.com/ugorji/go/codec v1.3.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.11 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.21 // indirect
go.etcd.io/etcd/client/v2 v2.305.21 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.21 // indirect
go.etcd.io/etcd/raft/v3 v3.5.21 // indirect
go.etcd.io/bbolt v1.4.3 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.12 // indirect
go.etcd.io/etcd/pkg/v3 v3.6.12 // indirect
go.etcd.io/raft/v3 v3.6.0 // indirect
go.mongodb.org/mongo-driver/v2 v2.5.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
go.opentelemetry.io/contrib/propagators/aws v1.38.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.38.0 // indirect
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 // indirect
go.opentelemetry.io/contrib/propagators/ot v1.38.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
go.uber.org/mock v0.5.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
go.opentelemetry.io/contrib/propagators/aws v1.44.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.44.0 // indirect
go.opentelemetry.io/contrib/propagators/jaeger v1.44.0 // indirect
go.opentelemetry.io/contrib/propagators/ot v1.44.0 // indirect
go.opentelemetry.io/otel/metric v1.44.0 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/arch v0.20.0 // indirect
golang.org/x/crypto v0.49.0 // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/net v0.52.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/arch v0.22.0 // indirect
golang.org/x/crypto v0.51.0 // indirect
golang.org/x/net v0.55.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/text v0.35.0 // indirect
golang.org/x/time v0.9.0 // indirect
golang.org/x/tools v0.42.0 // indirect
google.golang.org/genproto v0.0.0-20240823204242-4ba0660f739c // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect
google.golang.org/protobuf v1.36.11 // indirect
golang.org/x/text v0.37.0 // indirect
golang.org/x/time v0.14.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/driver/clickhouse v0.7.0 // indirect
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
modernc.org/libc v1.22.5 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.5.0 // indirect
modernc.org/sqlite v1.23.1 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)

Expand Down
Loading
Loading