Skip to content

Commit 254043f

Browse files
authored
Fix CVEs (#33)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 27e4aea commit 254043f

1,143 files changed

Lines changed: 299522 additions & 28046 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

go.mod

Lines changed: 80 additions & 80 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 140 additions & 131 deletions
Large diffs are not rendered by default.

pkg/cmds/debug/clientorg/helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ func makeArgYaml(resource, namespace string) []any {
101101
}
102102

103103
func getNSHeader(ns string) []byte {
104-
return []byte(fmt.Sprintf("\n\n===== %v =====\n", ns))
104+
return fmt.Appendf(nil, "\n\n===== %v =====\n", ns)
105105
}
106106

107107
func getResourceHeader(res string) []byte {
108-
return []byte(fmt.Sprintf("# %s :\n", res))
108+
return fmt.Appendf(nil, "# %s :\n", res)
109109
}
110110

111111
func (g *clientOrgOpts) collectAllResources() error {

pkg/cmds/debug/gateway/binding.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ import (
3232
)
3333

3434
type Binding struct {
35-
Spec BindingSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
36-
Status BindingStatus `json:"status,omitempty" yaml:"status,omitempty"`
35+
Spec BindingSpec `json:"spec" yaml:"spec,omitempty"`
36+
Status BindingStatus `json:"status" yaml:"status,omitempty"`
3737
}
3838

3939
type BindingSpec struct {
40-
SourceRef SourceRef `json:"sourceRef,omitempty" yaml:"sourceRef,omitempty"`
40+
SourceRef SourceRef `json:"sourceRef" yaml:"sourceRef,omitempty"`
4141
}
4242

4343
type SourceRef struct {

pkg/cmds/debug/gateway/routes.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"fmt"
2222
"os"
2323
"path"
24+
"slices"
2425

2526
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
2627
"k8s.io/apimachinery/pkg/runtime"
@@ -37,7 +38,7 @@ type RouteSpec struct {
3738
}
3839

3940
type Route struct {
40-
Spec RouteSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
41+
Spec RouteSpec `json:"spec" yaml:"spec,omitempty"`
4142
}
4243

4344
func (g *gatewayOpts) collectRoutes() error {
@@ -69,13 +70,7 @@ func (g *gatewayOpts) collectRoutes() error {
6970
}
7071

7172
// ---- b) Filter by parentRefs ----
72-
keep := false
73-
for _, pr := range rt.Spec.ParentRefs {
74-
if g.matchesGateway(pr) {
75-
keep = true
76-
break
77-
}
78-
}
73+
keep := slices.ContainsFunc(rt.Spec.ParentRefs, g.matchesGateway)
7974
if !keep {
8075
continue // not attached to our gateway
8176
}

pkg/cmds/debug/license/license.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var scheme = runtime.NewScheme()
3939
func init() {
4040
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
4141
utilruntime.Must(kubedbscheme.AddToScheme(scheme))
42-
utilruntime.Must(ocmapi.AddToScheme(scheme))
42+
utilruntime.Must(ocmapi.Install(scheme))
4343
}
4444

4545
func NewCmdLicense(f cmdutil.Factory) *cobra.Command {

vendor/cloud.google.com/go/auth/CHANGES.md

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/cloud.google.com/go/auth/auth.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/cloud.google.com/go/auth/credentials/compute.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/cloud.google.com/go/auth/credentials/detect.go

Lines changed: 23 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)