diff --git a/go.mod b/go.mod index 4d99257ae8..2d23a45021 100644 --- a/go.mod +++ b/go.mod @@ -21,8 +21,8 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/cilium/charts v0.0.0-20230628232147-9992996cd311 github.com/cilium/cilium v1.14.0-snapshot.5 - github.com/cilium/hubble v0.11.6 - github.com/cilium/tetragon/pkg/k8s v0.0.0-20230707091407-8a837d810b87 + github.com/cilium/hubble v0.12.0 + github.com/cilium/tetragon/pkg/k8s v0.0.0-20230712082728-185746ca3f78 github.com/cilium/workerpool v1.2.0 github.com/cloudflare/cfssl v1.6.4 github.com/go-openapi/strfmt v0.21.7 @@ -31,7 +31,7 @@ require ( github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace - golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb golang.org/x/mod v0.12.0 google.golang.org/grpc v1.56.2 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c @@ -89,7 +89,7 @@ require ( github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect github.com/evanphx/json-patch v5.6.0+incompatible github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect - github.com/fatih/color v1.14.1 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-gorp/gorp/v3 v3.0.5 // indirect @@ -206,7 +206,7 @@ require ( golang.org/x/net v0.11.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.9.1-0.20230616193735-e0c3b6e6ae3b // indirect + golang.org/x/sys v0.10.0 // indirect golang.org/x/term v0.9.0 // indirect golang.org/x/text v0.10.0 // indirect golang.org/x/time v0.3.0 // indirect diff --git a/go.sum b/go.sum index 2f16037a02..45bbca12d1 100644 --- a/go.sum +++ b/go.sum @@ -115,12 +115,12 @@ github.com/cilium/client-go v0.27.2-fix h1:dbFQGtP5Y1lFVBhkMCIAwyf/PUWFBn8M1ZTCK github.com/cilium/client-go v0.27.2-fix/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= github.com/cilium/dns v1.1.51-0.20220729113855-5b94b11b46fc h1:tNEOByqRaBwlf1ANK/U/sd5oOIkxkPkpCVqaabxvU84= github.com/cilium/dns v1.1.51-0.20220729113855-5b94b11b46fc/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= -github.com/cilium/hubble v0.11.6 h1:QvYOxER5tOPUTX8fILvxHSwkqyCycu8wxKVVUa0x6d0= -github.com/cilium/hubble v0.11.6/go.mod h1:pbR0F37lKRo8d9fNVe+oMmOKD67VYkm1gvjq1pVTdkc= +github.com/cilium/hubble v0.12.0 h1:0Sc68tCa3jY1x4VqEWp63+r34/e5jmh4p3CWrf5afU8= +github.com/cilium/hubble v0.12.0/go.mod h1:2mXoJZSczBewSVItWblNmCQaAjSr+NVnWTonwuVcrIk= github.com/cilium/proxy v0.0.0-20230623092907-8fddead4e52c h1:/NqY4jLr92f7VcUJe1gHS6CgSGWFUCeD2f4QhxO8tgE= github.com/cilium/proxy v0.0.0-20230623092907-8fddead4e52c/go.mod h1:iOlDXIgPGBabS7J0Npbq8MC5+gfvUGSBISnxXIJjfgs= -github.com/cilium/tetragon/pkg/k8s v0.0.0-20230707091407-8a837d810b87 h1:DP9Ayc/rc8Ni4s2PzhC4yF+iPyFvWpz4vITYHUpgsoA= -github.com/cilium/tetragon/pkg/k8s v0.0.0-20230707091407-8a837d810b87/go.mod h1:Sfp4CiqCS2hn1QFv4LL4r8w5qwCmUM5u1VTuCIlyUAM= +github.com/cilium/tetragon/pkg/k8s v0.0.0-20230712082728-185746ca3f78 h1:PUtRy+wotsI3UO3mobcSUPi3TbghjEIaRYGbPUPhzfI= +github.com/cilium/tetragon/pkg/k8s v0.0.0-20230712082728-185746ca3f78/go.mod h1:MiONU2PPXpztO4BQUSHNdUVbJCz1rChWYh34tjqSWwU= github.com/cilium/workerpool v1.2.0 h1:Wc2iOPTvCgWKQXeq4L5tnx4QFEI+z5q1+bSpSS0cnAY= github.com/cilium/workerpool v1.2.0/go.mod h1:GOYJhwlnIjR+jWSDNBb5kw47G1H/XA9X4WOBpgr4pQU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -195,8 +195,8 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZM github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= @@ -887,8 +887,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= -golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1072,8 +1072,9 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.1-0.20230616193735-e0c3b6e6ae3b h1:5elkVbSN5WHw2BspeECIoFRcbpHNAZJEU8jlgEQl3p0= golang.org/x/sys v0.9.1-0.20230616193735-e0c3b6e6ae3b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= diff --git a/vendor/github.com/cilium/hubble/pkg/printer/color.go b/vendor/github.com/cilium/hubble/pkg/printer/color.go index 32ded15829..1d4171c62a 100644 --- a/vendor/github.com/cilium/hubble/pkg/printer/color.go +++ b/vendor/github.com/cilium/hubble/pkg/printer/color.go @@ -108,3 +108,11 @@ func (c colorer) verdictTraced(a interface{}) string { func (c colorer) verdictTranslated(a interface{}) string { return c.yellow.Sprint(a) } + +func (c colorer) authTestAlwaysFail(a interface{}) string { + return c.red.Sprint(a) +} + +func (c colorer) authIsEnabled(a interface{}) string { + return c.green.Sprint(a) +} diff --git a/vendor/github.com/cilium/hubble/pkg/printer/printer.go b/vendor/github.com/cilium/hubble/pkg/printer/printer.go index 534a1573b4..1cc3c10873 100644 --- a/vendor/github.com/cilium/hubble/pkg/printer/printer.go +++ b/vendor/github.com/cilium/hubble/pkg/printer/printer.go @@ -17,7 +17,7 @@ import ( "text/tabwriter" "time" - pb "github.com/cilium/cilium/api/v1/flow" + flowpb "github.com/cilium/cilium/api/v1/flow" observerpb "github.com/cilium/cilium/api/v1/observer" relaypb "github.com/cilium/cilium/api/v1/relay" "github.com/cilium/cilium/pkg/identity" @@ -112,23 +112,25 @@ func (p *Printer) WriteErr(msg string) error { } // GetPorts returns source and destination port of a flow. -func (p *Printer) GetPorts(f *pb.Flow) (string, string) { +func (p *Printer) GetPorts(f *flowpb.Flow) (string, string) { l4 := f.GetL4() if l4 == nil { return "", "" } switch l4.Protocol.(type) { - case *pb.Layer4_TCP: + case *flowpb.Layer4_TCP: return strconv.Itoa(int(l4.GetTCP().SourcePort)), strconv.Itoa(int(l4.GetTCP().DestinationPort)) - case *pb.Layer4_UDP: + case *flowpb.Layer4_UDP: return strconv.Itoa(int(l4.GetUDP().SourcePort)), strconv.Itoa(int(l4.GetUDP().DestinationPort)) + case *flowpb.Layer4_SCTP: + return strconv.Itoa(int(l4.GetSCTP().SourcePort)), strconv.Itoa(int(l4.GetSCTP().DestinationPort)) default: return "", "" } } // GetHostNames returns source and destination hostnames of a flow. -func (p *Printer) GetHostNames(f *pb.Flow) (string, string) { +func (p *Printer) GetHostNames(f *flowpb.Flow) (string, string) { var srcNamespace, dstNamespace, srcPodName, dstPodName, srcSvcName, dstSvcName string if f == nil { return "", "" @@ -174,7 +176,7 @@ func (p *Printer) fmtIdentity(i uint32) string { // GetSecurityIdentities returns the source and destination numeric security // identity formatted as a string. -func (p *Printer) GetSecurityIdentities(f *pb.Flow) (srcIdentity, dstIdentity string) { +func (p *Printer) GetSecurityIdentities(f *flowpb.Flow) (srcIdentity, dstIdentity string) { if f == nil { return "", "" } @@ -193,17 +195,17 @@ func fmtTimestamp(layout string, ts *timestamppb.Timestamp) string { } // GetFlowType returns the type of a flow as a string. -func GetFlowType(f *pb.Flow) string { +func GetFlowType(f *flowpb.Flow) string { if l7 := f.GetL7(); l7 != nil { l7Protocol := "l7" l7Type := strings.ToLower(l7.Type.String()) switch l7.GetRecord().(type) { - case *pb.Layer7_Http: + case *flowpb.Layer7_Http: l7Protocol = "http" - case *pb.Layer7_Dns: + case *flowpb.Layer7_Dns: l7Protocol = "dns" l7Type += " " + l7.GetDns().ObservationSource - case *pb.Layer7_Kafka: + case *flowpb.Layer7_Kafka: l7Protocol = "kafka" } return l7Protocol + "-" + l7Type @@ -224,13 +226,13 @@ func GetFlowType(f *pb.Flow) string { return f.GetDebugCapturePoint().String() case api.MessageTypeTraceSock: switch f.GetSockXlatePoint() { - case pb.SocketTranslationPoint_SOCK_XLATE_POINT_POST_DIRECTION_FWD: + case flowpb.SocketTranslationPoint_SOCK_XLATE_POINT_POST_DIRECTION_FWD: return "post-xlate-fwd" - case pb.SocketTranslationPoint_SOCK_XLATE_POINT_POST_DIRECTION_REV: + case flowpb.SocketTranslationPoint_SOCK_XLATE_POINT_POST_DIRECTION_REV: return "post-xlate-rev" - case pb.SocketTranslationPoint_SOCK_XLATE_POINT_PRE_DIRECTION_FWD: + case flowpb.SocketTranslationPoint_SOCK_XLATE_POINT_PRE_DIRECTION_FWD: return "pre-xlate-fwd" - case pb.SocketTranslationPoint_SOCK_XLATE_POINT_PRE_DIRECTION_REV: + case flowpb.SocketTranslationPoint_SOCK_XLATE_POINT_PRE_DIRECTION_REV: return "pre-xlate-rev" } return f.GetSockXlatePoint().String() @@ -239,34 +241,57 @@ func GetFlowType(f *pb.Flow) string { return "UNKNOWN" } -func (p Printer) getVerdict(f *pb.Flow) string { +func (p Printer) getVerdict(f *flowpb.Flow) string { verdict := f.GetVerdict() msg := verdict.String() switch verdict { - case pb.Verdict_FORWARDED, pb.Verdict_REDIRECTED: + case flowpb.Verdict_FORWARDED, flowpb.Verdict_REDIRECTED: if f.GetEventType().GetType() == api.MessageTypePolicyVerdict { msg = "ALLOWED" } return p.color.verdictForwarded(msg) - case pb.Verdict_DROPPED, pb.Verdict_ERROR: + case flowpb.Verdict_DROPPED, flowpb.Verdict_ERROR: if f.GetEventType().GetType() == api.MessageTypePolicyVerdict { msg = "DENIED" } return p.color.verdictDropped(msg) - case pb.Verdict_AUDIT: + case flowpb.Verdict_AUDIT: if f.GetEventType().GetType() == api.MessageTypePolicyVerdict { msg = "AUDITED" } return p.color.verdictAudit(msg) - case pb.Verdict_TRACED: + case flowpb.Verdict_TRACED: return p.color.verdictTraced(msg) - case pb.Verdict_TRANSLATED: + case flowpb.Verdict_TRANSLATED: return p.color.verdictTranslated(msg) default: return msg } } +func (p Printer) getSummary(f *flowpb.Flow) string { + auth := p.getAuth(f) + if auth == "" { + return f.GetSummary() + } + + return fmt.Sprintf("%s; Auth: %s", f.GetSummary(), auth) +} + +func (p Printer) getAuth(f *flowpb.Flow) string { + auth := f.GetAuthType() + msg := auth.String() + switch auth { + case flowpb.AuthType_DISABLED: + // if auth is disabled we do not want to display anything + return "" + case flowpb.AuthType_TEST_ALWAYS_FAIL: + return p.color.authTestAlwaysFail(msg) + default: + return p.color.authIsEnabled(msg) + } +} + // WriteProtoFlow writes v1.Flow into the output writer. func (p *Printer) WriteProtoFlow(res *observerpb.GetFlowsResponse) error { f := res.GetFlow() @@ -298,7 +323,7 @@ func (p *Printer) WriteProtoFlow(res *observerpb.GetFlowsResponse) error { dst, tab, GetFlowType(f), tab, p.getVerdict(f), tab, - f.GetSummary(), newline, + p.getSummary(f), newline, ) if ew.err != nil { return fmt.Errorf("failed to write out packet: %v", ew.err) @@ -357,7 +382,7 @@ func (p *Printer) WriteProtoFlow(res *observerpb.GetFlowsResponse) error { dstIdentity, GetFlowType(f), p.getVerdict(f), - f.GetSummary()) + p.getSummary(f)) if err != nil { return fmt.Errorf("failed to write out packet: %v", err) } @@ -463,26 +488,26 @@ func (p *Printer) WriteProtoNodeStatusEvent(r *observerpb.GetFlowsResponse) erro return nil } -func formatServiceAddr(a *pb.ServiceUpsertNotificationAddr) string { +func formatServiceAddr(a *flowpb.ServiceUpsertNotificationAddr) string { return net.JoinHostPort(a.Ip, strconv.Itoa(int(a.Port))) } -func getAgentEventDetails(e *pb.AgentEvent, timeLayout string) string { +func getAgentEventDetails(e *flowpb.AgentEvent, timeLayout string) string { switch e.GetType() { - case pb.AgentEventType_AGENT_EVENT_UNKNOWN: + case flowpb.AgentEventType_AGENT_EVENT_UNKNOWN: if u := e.GetUnknown(); u != nil { return fmt.Sprintf("type: %s, notification: %s", u.Type, u.Notification) } - case pb.AgentEventType_AGENT_STARTED: + case flowpb.AgentEventType_AGENT_STARTED: if a := e.GetAgentStart(); a != nil { return fmt.Sprintf("start time: %s", fmtTimestamp(timeLayout, a.Time)) } - case pb.AgentEventType_POLICY_UPDATED, pb.AgentEventType_POLICY_DELETED: + case flowpb.AgentEventType_POLICY_UPDATED, flowpb.AgentEventType_POLICY_DELETED: if p := e.GetPolicyUpdate(); p != nil { return fmt.Sprintf("labels: [%s], revision: %d, count: %d", strings.Join(p.Labels, ","), p.Revision, p.RuleCount) } - case pb.AgentEventType_ENDPOINT_REGENERATE_SUCCESS, pb.AgentEventType_ENDPOINT_REGENERATE_FAILURE: + case flowpb.AgentEventType_ENDPOINT_REGENERATE_SUCCESS, flowpb.AgentEventType_ENDPOINT_REGENERATE_FAILURE: if r := e.GetEndpointRegenerate(); r != nil { var sb strings.Builder fmt.Fprintf(&sb, "id: %d, labels: [%s]", r.Id, strings.Join(r.Labels, ",")) @@ -491,7 +516,7 @@ func getAgentEventDetails(e *pb.AgentEvent, timeLayout string) string { } return sb.String() } - case pb.AgentEventType_ENDPOINT_CREATED, pb.AgentEventType_ENDPOINT_DELETED: + case flowpb.AgentEventType_ENDPOINT_CREATED, flowpb.AgentEventType_ENDPOINT_DELETED: if ep := e.GetEndpointUpdate(); ep != nil { var sb strings.Builder fmt.Fprintf(&sb, "id: %d", ep.Id) @@ -503,7 +528,7 @@ func getAgentEventDetails(e *pb.AgentEvent, timeLayout string) string { } return sb.String() } - case pb.AgentEventType_IPCACHE_UPSERTED, pb.AgentEventType_IPCACHE_DELETED: + case flowpb.AgentEventType_IPCACHE_UPSERTED, flowpb.AgentEventType_IPCACHE_DELETED: if i := e.GetIpcacheUpdate(); i != nil { var sb strings.Builder fmt.Fprintf(&sb, "cidr: %s, identity: %d", i.Cidr, i.Identity) @@ -519,7 +544,7 @@ func getAgentEventDetails(e *pb.AgentEvent, timeLayout string) string { fmt.Fprintf(&sb, ", encrypt key: %d", i.EncryptKey) return sb.String() } - case pb.AgentEventType_SERVICE_UPSERTED: + case flowpb.AgentEventType_SERVICE_UPSERTED: if svc := e.GetServiceUpsert(); svc != nil { var sb strings.Builder fmt.Fprintf(&sb, "id: %d", svc.Id) @@ -547,7 +572,7 @@ func getAgentEventDetails(e *pb.AgentEvent, timeLayout string) string { } return sb.String() } - case pb.AgentEventType_SERVICE_DELETED: + case flowpb.AgentEventType_SERVICE_DELETED: if s := e.GetServiceDelete(); s != nil { return fmt.Sprintf("id: %d", s.Id) } @@ -642,7 +667,7 @@ func fmtCPU(cpu *wrapperspb.Int32Value) string { return fmt.Sprintf("%02d", cpu.GetValue()) } -func fmtEndpointShort(ep *pb.Endpoint) string { +func fmtEndpointShort(ep *flowpb.Endpoint) string { if ep == nil { return "N/A" } diff --git a/vendor/github.com/fatih/color/color_windows.go b/vendor/github.com/fatih/color/color_windows.go new file mode 100644 index 0000000000..be01c558e5 --- /dev/null +++ b/vendor/github.com/fatih/color/color_windows.go @@ -0,0 +1,19 @@ +package color + +import ( + "os" + + "golang.org/x/sys/windows" +) + +func init() { + // Opt-in for ansi color support for current process. + // https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences + var outMode uint32 + out := windows.Handle(os.Stdout.Fd()) + if err := windows.GetConsoleMode(out, &outMode); err != nil { + return + } + outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING + _ = windows.SetConsoleMode(out, outMode) +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index c097b48dad..3784f402e5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -827,9 +827,9 @@ const ( DM_UUID_FLAG = 0x4000 DM_UUID_LEN = 0x81 DM_VERSION = 0xc138fd00 - DM_VERSION_EXTRA = "-ioctl (2022-07-28)" + DM_VERSION_EXTRA = "-ioctl (2023-03-01)" DM_VERSION_MAJOR = 0x4 - DM_VERSION_MINOR = 0x2f + DM_VERSION_MINOR = 0x30 DM_VERSION_PATCHLEVEL = 0x0 DT_BLK = 0x6 DT_CHR = 0x2 @@ -2213,6 +2213,7 @@ const ( PACKET_USER = 0x6 PACKET_VERSION = 0xa PACKET_VNET_HDR = 0xf + PACKET_VNET_HDR_SZ = 0x18 PARITY_CRC16_PR0 = 0x2 PARITY_CRC16_PR0_CCITT = 0x4 PARITY_CRC16_PR1 = 0x3 @@ -2371,6 +2372,7 @@ const ( PR_FP_EXC_UND = 0x40000 PR_FP_MODE_FR = 0x1 PR_FP_MODE_FRE = 0x2 + PR_GET_AUXV = 0x41555856 PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 @@ -2380,6 +2382,7 @@ const ( PR_GET_IO_FLUSHER = 0x3a PR_GET_KEEPCAPS = 0x7 PR_GET_MDWE = 0x42 + PR_GET_MEMORY_MERGE = 0x44 PR_GET_NAME = 0x10 PR_GET_NO_NEW_PRIVS = 0x27 PR_GET_PDEATHSIG = 0x2 @@ -2436,6 +2439,7 @@ const ( PR_SET_IO_FLUSHER = 0x39 PR_SET_KEEPCAPS = 0x8 PR_SET_MDWE = 0x41 + PR_SET_MEMORY_MERGE = 0x43 PR_SET_MM = 0x23 PR_SET_MM_ARG_END = 0x9 PR_SET_MM_ARG_START = 0x8 @@ -2519,6 +2523,7 @@ const ( PTRACE_GETSIGMASK = 0x420a PTRACE_GET_RSEQ_CONFIGURATION = 0x420f PTRACE_GET_SYSCALL_INFO = 0x420e + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 PTRACE_INTERRUPT = 0x4207 PTRACE_KILL = 0x8 PTRACE_LISTEN = 0x4208 @@ -2549,6 +2554,7 @@ const ( PTRACE_SETREGSET = 0x4205 PTRACE_SETSIGINFO = 0x4203 PTRACE_SETSIGMASK = 0x420b + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210 PTRACE_SINGLESTEP = 0x9 PTRACE_SYSCALL = 0x18 PTRACE_SYSCALL_INFO_ENTRY = 0x1 @@ -3085,7 +3091,7 @@ const ( TASKSTATS_GENL_NAME = "TASKSTATS" TASKSTATS_GENL_VERSION = 0x1 TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0xd + TASKSTATS_VERSION = 0xe TCIFLUSH = 0x0 TCIOFF = 0x2 TCIOFLUSH = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index 7ea465204b..e6ed7d637d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -372,6 +372,7 @@ const ( SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 + SYS_MEMFD_SECRET = 447 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index daf91f36d0..02e2462c8f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -3799,7 +3799,7 @@ const ( ETHTOOL_A_RINGS_TCP_DATA_SPLIT = 0xb ETHTOOL_A_RINGS_CQE_SIZE = 0xc ETHTOOL_A_RINGS_TX_PUSH = 0xd - ETHTOOL_A_RINGS_MAX = 0xe + ETHTOOL_A_RINGS_MAX = 0x10 ETHTOOL_A_CHANNELS_UNSPEC = 0x0 ETHTOOL_A_CHANNELS_HEADER = 0x1 ETHTOOL_A_CHANNELS_RX_MAX = 0x2 @@ -4494,7 +4494,7 @@ const ( NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca - NL80211_ATTR_MAX = 0x142 + NL80211_ATTR_MAX = 0x145 NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_MATCH_SETS = 0x85 @@ -4723,7 +4723,7 @@ const ( NL80211_BAND_ATTR_HT_CAPA = 0x4 NL80211_BAND_ATTR_HT_MCS_SET = 0x3 NL80211_BAND_ATTR_IFTYPE_DATA = 0x9 - NL80211_BAND_ATTR_MAX = 0xb + NL80211_BAND_ATTR_MAX = 0xd NL80211_BAND_ATTR_RATES = 0x2 NL80211_BAND_ATTR_VHT_CAPA = 0x8 NL80211_BAND_ATTR_VHT_MCS_SET = 0x7 @@ -4864,7 +4864,7 @@ const ( NL80211_CMD_LEAVE_IBSS = 0x2c NL80211_CMD_LEAVE_MESH = 0x45 NL80211_CMD_LEAVE_OCB = 0x6d - NL80211_CMD_MAX = 0x98 + NL80211_CMD_MAX = 0x99 NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29 NL80211_CMD_MODIFY_LINK_STA = 0x97 NL80211_CMD_NAN_MATCH = 0x78 @@ -5845,6 +5845,8 @@ const ( TUN_F_TSO6 = 0x4 TUN_F_TSO_ECN = 0x8 TUN_F_UFO = 0x10 + TUN_F_USO4 = 0x20 + TUN_F_USO6 = 0x40 ) const ( @@ -5854,9 +5856,10 @@ const ( ) const ( - VIRTIO_NET_HDR_GSO_NONE = 0x0 - VIRTIO_NET_HDR_GSO_TCPV4 = 0x1 - VIRTIO_NET_HDR_GSO_UDP = 0x3 - VIRTIO_NET_HDR_GSO_TCPV6 = 0x4 - VIRTIO_NET_HDR_GSO_ECN = 0x80 + VIRTIO_NET_HDR_GSO_NONE = 0x0 + VIRTIO_NET_HDR_GSO_TCPV4 = 0x1 + VIRTIO_NET_HDR_GSO_UDP = 0x3 + VIRTIO_NET_HDR_GSO_TCPV6 = 0x4 + VIRTIO_NET_HDR_GSO_UDP_L4 = 0x5 + VIRTIO_NET_HDR_GSO_ECN = 0x80 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 4ecc1495cd..6d8acbcc57 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -337,6 +337,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 34fddff964..59293c6884 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -350,6 +350,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index 3b14a6031f..40cfa38c29 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -328,6 +328,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index 0517651ab3..055bc4216d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -329,6 +329,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go index 3b0c518134..f28affbc60 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go @@ -330,6 +330,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index fccdf4dd0f..9d71e7ccd8 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -333,6 +333,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index 500de8fc07..fd5ccd332a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -332,6 +332,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index d0434cd2c6..7704de77a2 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -332,6 +332,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index 84206ba534..df00b87571 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -333,6 +333,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go index ab078cf1f5..0942840db6 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go @@ -340,6 +340,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 42eb2c4cef..0348743950 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -339,6 +339,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 31304a4e8b..bad0670475 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -339,6 +339,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index c311f9612d..9ea54b7b86 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -357,6 +357,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index bba3cefac1..aa268d025c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -352,6 +352,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index ad8a013804..444045b6c5 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -334,6 +334,8 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 + Irq_count uint64 + Irq_delay_total uint64 } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go index c964b6848d..c44a1b9636 100644 --- a/vendor/golang.org/x/sys/windows/service.go +++ b/vendor/golang.org/x/sys/windows/service.go @@ -218,6 +218,10 @@ type SERVICE_FAILURE_ACTIONS struct { Actions *SC_ACTION } +type SERVICE_FAILURE_ACTIONS_FLAG struct { + FailureActionsOnNonCrashFailures int32 +} + type SC_ACTION struct { Type uint32 Delay uint32 diff --git a/vendor/modules.txt b/vendor/modules.txt index 3a7e024c95..ba16dfb162 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -133,8 +133,8 @@ github.com/cilium/cilium/pkg/slices github.com/cilium/cilium/pkg/spanstat github.com/cilium/cilium/pkg/version github.com/cilium/cilium/pkg/versioncheck -# github.com/cilium/hubble v0.11.6 -## explicit; go 1.19 +# github.com/cilium/hubble v0.12.0 +## explicit; go 1.20 github.com/cilium/hubble/pkg/printer # github.com/cilium/proxy v0.0.0-20230623092907-8fddead4e52c ## explicit; go 1.20 @@ -173,8 +173,8 @@ github.com/cilium/proxy/go/envoy/type/metadata/v3 github.com/cilium/proxy/go/envoy/type/tracing/v3 github.com/cilium/proxy/go/envoy/type/v3 github.com/cilium/proxy/pkg/policy/api/kafka -# github.com/cilium/tetragon/pkg/k8s v0.0.0-20230707091407-8a837d810b87 -## explicit; go 1.18 +# github.com/cilium/tetragon/pkg/k8s v0.0.0-20230712082728-185746ca3f78 +## explicit; go 1.19 github.com/cilium/tetragon/pkg/k8s/apis/cilium.io github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1 github.com/cilium/tetragon/pkg/k8s/client/clientset/versioned @@ -317,7 +317,7 @@ github.com/evanphx/json-patch # github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d ## explicit github.com/exponent-io/jsonpath -# github.com/fatih/color v1.14.1 +# github.com/fatih/color v1.15.0 ## explicit; go 1.17 github.com/fatih/color # github.com/frankban/quicktest v1.14.5 @@ -869,7 +869,7 @@ golang.org/x/crypto/pbkdf2 golang.org/x/crypto/pkcs12 golang.org/x/crypto/pkcs12/internal/rc2 golang.org/x/crypto/scrypt -# golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df +# golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb ## explicit; go 1.20 golang.org/x/exp/constraints golang.org/x/exp/maps @@ -897,7 +897,7 @@ golang.org/x/oauth2/internal ## explicit; go 1.17 golang.org/x/sync/errgroup golang.org/x/sync/semaphore -# golang.org/x/sys v0.9.1-0.20230616193735-e0c3b6e6ae3b +# golang.org/x/sys v0.10.0 ## explicit; go 1.17 golang.org/x/sys/execabs golang.org/x/sys/internal/unsafeheader