-
Notifications
You must be signed in to change notification settings - Fork 17
chore(deps): bump k8s.io/apimachinery from 0.36.0 to 0.37.0 #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ require ( | |
| github.com/openshift-online/rosa-hyperfleet-api/api v0.0.0 | ||
| github.com/openshift-online/rosa-hyperfleet-api/clientset v0.0.0-20260825215224-aaca052bcde7 | ||
| github.com/spf13/cobra v1.10.2 | ||
| k8s.io/apimachinery v0.36.0 | ||
| k8s.io/apimachinery v0.37.0 | ||
| ) | ||
|
|
||
| require ( | ||
|
|
@@ -41,18 +41,27 @@ require ( | |
| github.com/emicklei/go-restful/v3 v3.13.0 // indirect | ||
| github.com/fxamacker/cbor/v2 v2.9.2 // indirect | ||
| github.com/go-logr/logr v1.4.4 // indirect | ||
| github.com/go-openapi/jsonpointer v0.21.0 // indirect | ||
| github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
| github.com/go-openapi/swag v0.23.0 // indirect | ||
| github.com/go-openapi/jsonpointer v1.0.0 // indirect | ||
| github.com/go-openapi/jsonreference v1.0.0 // indirect | ||
| github.com/go-openapi/swag v0.27.1 // indirect | ||
| github.com/go-openapi/swag/cmdutils v0.27.1 // indirect | ||
| github.com/go-openapi/swag/conv v0.27.1 // indirect | ||
| github.com/go-openapi/swag/fileutils v0.27.1 // indirect | ||
| github.com/go-openapi/swag/jsonutils v0.27.1 // indirect | ||
| github.com/go-openapi/swag/loading v0.27.1 // indirect | ||
| github.com/go-openapi/swag/mangling v0.27.1 // indirect | ||
| github.com/go-openapi/swag/netutils v0.27.1 // indirect | ||
| github.com/go-openapi/swag/pools v0.27.1 // indirect | ||
| github.com/go-openapi/swag/stringutils v0.27.1 // indirect | ||
| github.com/go-openapi/swag/typeutils v0.27.1 // indirect | ||
| github.com/go-openapi/swag/yamlutils v0.27.1 // indirect | ||
|
Comment on lines
+44
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
test -s go.sum
go mod verify
go list -mod=readonly -m -json all > /tmp/go-modules.json
jq -s '
{queries: [
.[]
| select(.Version != null)
| select(.Path | test("^(k8s\\.io/apimachinery|k8s\\.io/kube-openapi|sigs\\.k8s\\.io/structured-merge-diff/v6|github\\.com/go-openapi/(jsonpointer|jsonreference|swag(/|$))|golang\\.org/x/(mod|net|sync|sys|term|text|time|tools)$)"))
| {package:{ecosystem:"Go",name:.Path},version:.Version}
]}
' /tmp/go-modules.json > /tmp/osv-query.json
curl -fsS -X POST \
-H 'Content-Type: application/json' \
--data-binary `@/tmp/osv-query.json` \
https://api.osv.dev/v1/querybatch | jq .Repository: openshift-online/rosa-hyperfleet-cli Length of output: 664 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- go.mod dependency context ---'
nl -ba go.mod | sed -n '18,65p'
printf '%s\n' '--- selected go.sum entries ---'
rg -n '^(k8s\.io/apimachinery|k8s\.io/kube-openapi|sigs\.k8s\.io/structured-merge-diff/v6|github\.com/go-openapi/(jsonpointer|jsonreference|swag)|golang\.org/x/(mod|net|sync|sys|term|text|time|tools))\s' go.sum || true
printf '%s\n' '--- module-to-OSV mapping ---'
python3 - <<'PY'
import json, subprocess, urllib.request
selected = []
with open('/tmp/go-modules.json') as f:
for line in f:
try:
m = json.loads(line)
except json.JSONDecodeError:
continue
p, v = m.get('Path'), m.get('Version')
if p and v and (
p in {'k8s.io/apimachinery', 'k8s.io/kube-openapi',
'sigs.k8s.io/structured-merge-diff/v6'} or
p.startswith('github.com/go-openapi/jsonpointer') or
p.startswith('github.com/go-openapi/jsonreference') or
p.startswith('github.com/go-openapi/swag') or
(p.startswith('golang.org/x/') and p.rsplit('/', 1)[-1] in
{'mod','net','sync','sys','term','text','time','tools'})
):
selected.append((p, v))
for p, v in selected:
body = json.dumps({'package': {'ecosystem': 'Go', 'name': p}, 'version': v}).encode()
req = urllib.request.Request(
'https://api.osv.dev/v1/query',
data=body,
headers={'Content-Type': 'application/json'},
)
try:
with urllib.request.urlopen(req) as r:
result = json.load(r)
ids = [x['id'] for x in result.get('vulns', [])]
except Exception as e:
ids = [f'QUERY_ERROR:{e}']
print(f'{p} {v}: {ids}')
PY
printf '%s\n' '--- release workflow files ---'
git ls-files '.github/workflows/*' | sortRepository: openshift-online/rosa-hyperfleet-cli Length of output: 248 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- go.mod dependency context ---'
awk 'NR >= 18 && NR <= 65 {print NR ":" $0}' go.mod
printf '%s\n' '--- selected go.sum entries ---'
rg -n '^(k8s\.io/apimachinery|k8s\.io/kube-openapi|sigs\.k8s\.io/structured-merge-diff/v6|github\.com/go-openapi/(jsonpointer|jsonreference|swag)|golang\.org/x/(mod|net|sync|sys|term|text|time|tools))\s' go.sum || true
printf '%s\n' '--- module-to-OSV mapping ---'
python3 - <<'PY'
import json, urllib.request
selected = []
try:
with open('/tmp/go-modules.json') as f:
for line in f:
try:
m = json.loads(line)
except json.JSONDecodeError:
continue
p, v = m.get('Path'), m.get('Version')
if p and v and (
p in {'k8s.io/apimachinery', 'k8s.io/kube-openapi',
'sigs.k8s.io/structured-merge-diff/v6'} or
p.startswith('github.com/go-openapi/jsonpointer') or
p.startswith('github.com/go-openapi/jsonreference') or
p.startswith('github.com/go-openapi/swag') or
(p.startswith('golang.org/x/') and p.rsplit('/', 1)[-1] in
{'mod','net','sync','sys','term','text','time','tools'})
):
selected.append((p, v))
except FileNotFoundError:
print('missing /tmp/go-modules.json')
for p, v in selected:
body = json.dumps({'package': {'ecosystem': 'Go', 'name': p}, 'version': v}).encode()
req = urllib.request.Request(
'https://api.osv.dev/v1/query',
data=body,
headers={'Content-Type': 'application/json'},
)
try:
with urllib.request.urlopen(req) as r:
result = json.load(r)
ids = [x['id'] for x in result.get('vulns', [])]
except Exception as e:
ids = [f'QUERY_ERROR:{e}']
print(f'{p} {v}: {ids}')
PY
printf '%s\n' '--- release workflow files ---'
git ls-files '.github/workflows/*' | sortRepository: openshift-online/rosa-hyperfleet-cli Length of output: 5499 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- OSV advisories for the module mapped by the initial result ---'
curl -fsS -X POST \
-H 'Content-Type: application/json' \
--data '{"package":{"ecosystem":"Go","name":"golang.org/x/mod"},"version":"v0.37.0"}' \
https://api.osv.dev/v1/query | jq '{vulns: [.vulns[]? | {id,summary,details,affected}]}'
printf '%s\n' '--- Go proxy version metadata ---'
curl -fsS https://proxy.golang.org/golang.org/x/mod/@v/list | tail -20
curl -fsS https://proxy.golang.org/golang.org/x/mod/@v/v0.37.0.info | jq .Repository: openshift-online/rosa-hyperfleet-cli Length of output: 5644 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- x/mod declaration and toolchain ---'
rg -n '^(go|toolchain)\s|^.*golang\.org/x/mod\s' go.mod
printf '%s\n' '--- fixed version metadata ---'
curl -fsS https://proxy.golang.org/golang.org/x/mod/@v/v0.40.0.info | jq '{Version,Time,Origin}'Repository: openshift-online/rosa-hyperfleet-cli Length of output: 529 Security Misconfiguration (CWE-1104) Reachability: External · Exploitability: Difficult Update the Go supply chain dependencies.
🤖 Prompt for AI AgentsSources: Path instructions, MCP tools |
||
| github.com/go-task/slim-sprig/v3 v3.0.0 // indirect | ||
| github.com/google/gnostic-models v0.7.0 // indirect | ||
| github.com/google/go-cmp v0.7.0 // indirect | ||
| github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 // indirect | ||
| github.com/google/uuid v1.6.0 // indirect | ||
| github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| github.com/josharian/intern v1.0.0 // indirect | ||
| github.com/json-iterator/go v1.1.12 // indirect | ||
| github.com/mailru/easyjson v0.7.7 // indirect | ||
| github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
| github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect | ||
| github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
|
|
@@ -62,27 +71,26 @@ require ( | |
| github.com/x448/float16 v0.8.4 // indirect | ||
| go.yaml.in/yaml/v2 v2.4.4 // indirect | ||
| go.yaml.in/yaml/v3 v3.0.4 // indirect | ||
| golang.org/x/mod v0.36.0 // indirect | ||
| golang.org/x/net v0.56.0 // indirect | ||
| golang.org/x/mod v0.37.0 // indirect | ||
| golang.org/x/net v0.57.0 // indirect | ||
| golang.org/x/oauth2 v0.34.0 // indirect | ||
| golang.org/x/sync v0.21.0 // indirect | ||
| golang.org/x/sys v0.46.0 // indirect | ||
| golang.org/x/term v0.44.0 // indirect | ||
| golang.org/x/text v0.38.0 // indirect | ||
| golang.org/x/time v0.14.0 // indirect | ||
| golang.org/x/tools v0.45.0 // indirect | ||
| golang.org/x/sync v0.22.0 // indirect | ||
| golang.org/x/sys v0.47.0 // indirect | ||
| golang.org/x/term v0.45.0 // indirect | ||
| golang.org/x/text v0.40.0 // indirect | ||
| golang.org/x/time v0.15.0 // indirect | ||
| golang.org/x/tools v0.47.0 // indirect | ||
| google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect | ||
| gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect | ||
| gopkg.in/inf.v0 v0.9.1 // indirect | ||
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| k8s.io/api v0.36.0 // indirect | ||
| k8s.io/client-go v0.36.0 // indirect | ||
| k8s.io/klog/v2 v2.140.0 // indirect | ||
| k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect | ||
| k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad // indirect | ||
| k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 // indirect | ||
| sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect | ||
| sigs.k8s.io/randfill v1.0.0 // indirect | ||
| sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect | ||
| sigs.k8s.io/structured-merge-diff/v6 v6.4.2 // indirect | ||
| sigs.k8s.io/yaml v1.6.0 // indirect | ||
| ) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: openshift-online/rosa-hyperfleet-cli
Length of output: 9030
🏁 Script executed:
Repository: openshift-online/rosa-hyperfleet-cli
Length of output: 14971
🌐 Web query:
Kubernetes client-go version skew policy matching k8s.io/api apimachinery module versions💡 Result:
The Kubernetes project does not maintain a strict version skew policy between the k8s.io/client-go library and its internal dependencies, k8s.io/api and k8s.io/apimachinery, beyond the strict binding enforced by their release cycle [1][2]. 1. Coordinated Versioning: The libraries k8s.io/client-go, k8s.io/api, and k8s.io/apimachinery are maintained within the main Kubernetes source repository and are tagged with matching semantic versions (e.g., v0.33.8) [3][4][1][5]. Because these modules are tightly coupled, updating client-go effectively requires updating the dependent k8s.io/api and k8s.io/apimachinery modules to the same version [2]. 2. Dependency Management: There is no supported policy for mixing different versions of these modules within a single project. Doing so is highly discouraged and likely to cause runtime errors or compilation failures due to the tight coupling and shared internal logic [2]. Developers are expected to manage their dependencies using a Go module system and pin them to matching versions [6][7]. 3. Version Skew Policy vs. Compatibility: While the general Kubernetes cluster "Version Skew Policy" dictates supported disparities between major components like kubelet and kube-apiserver [8], it does not apply to the internal dependencies of client-go. Instead, client-go follows a backward compatibility model regarding Kubernetes clusters: older versions of client-go are designed to work with various newer versions of Kubernetes clusters [9][10]. However, this compatibility pertains to the interaction between the client code and the server API, not the underlying Go module versions themselves [3][4]. 4. Maintenance: The repository for k8s.io/apimachinery explicitly states there are no external compatibility guarantees, as the library exists in direct support of the Kubernetes codebase [1]. Consequently, users must treat these modules as a unified set to ensure compatibility [2].
Citations:
Keep the Kubernetes modules on one release line.
Go MVS compiles
client-go v0.36.0againstapimachinery v0.37.0. Kubernetes treats these tightly coupled modules as a coordinated set without external compatibility guarantees. Use a clientset revision withv0.37.0dependencies, or keepapimachineryatv0.36.0.🤖 Prompt for AI Agents
Source: MCP tools