From 72ec8062420ddc9379e22eaa0ef76b4bf77cc91a Mon Sep 17 00:00:00 2001 From: Alexey Olshanskiy <234377865+avlllo@users.noreply.github.com> Date: Mon, 21 Sep 2026 16:48:32 +0300 Subject: [PATCH] fix(runtime-monitor): move Tetragon gRPC to a Unix socket (CVE-2026-65960) --- docs/guides/help/help.md | 12 +-- install/helm/README.md | 38 ++++----- install/helm/values.schema.json | 7 +- install/helm/values.yaml | 7 +- .../.helm/templates/_container_tetragon.tpl | 2 + .../.helm/templates/daemonset.yaml | 4 + runtime-monitor/.helm/values.yaml | 21 ++++- runtime-monitor/README.md | 19 +++++ runtime-monitor/pkg/config/config.go | 10 ++- runtime-monitor/pkg/config/config_test.go | 49 ++++++++++++ runtime-monitor/pkg/monitor/monitor_test.go | 77 +++++++++++++++++++ 11 files changed, 213 insertions(+), 33 deletions(-) create mode 100644 runtime-monitor/pkg/config/config_test.go create mode 100644 runtime-monitor/pkg/monitor/monitor_test.go diff --git a/docs/guides/help/help.md b/docs/guides/help/help.md index 67a42042..409c70b9 100644 --- a/docs/guides/help/help.md +++ b/docs/guides/help/help.md @@ -371,11 +371,11 @@ To configure the runtime monitor buffer size: kubectl rollout restart daemonset/ -n ``` -**Changing network ports for the runtime monitor service** +**Changing network ports and the Tetragon socket path for the runtime monitor service** -The runtime monitor service operates in the hostNetwork mode—that is, it uses a network namespace of the host. If a host port is already in use, the service will not track runtime events. You can set ports for the service in the Helm chart configuration file `values.yaml` before installing Runtime Radar. You can also set a port for the tetragon container of the runtime monitor service if the default host port is already in use. +The runtime monitor service operates in the hostNetwork mode—that is, it uses a network namespace of the host. If a host port is already in use, the service will not track runtime events. You can set ports for the service in the Helm chart configuration file `values.yaml` before installing Runtime Radar. The tetragon container of the runtime monitor service no longer uses a network port for the gRPC connection: it accepts gRPC connections over a Unix socket on the host. If necessary, you can change the path to this socket. The tetragon container still exposes Prometheus metrics on a host port (2112 by default). If this port is already in use, set another one by specifying the `runtime-monitor.tetragon.prometheus.port` value. -To set a network port for the runtime monitor service: +To set a network port or the Tetragon socket path for the runtime monitor service: 1. Open the `values.yaml` file in edit mode. @@ -391,7 +391,9 @@ To set a network port for the runtime monitor service: gops: 7000 ``` -1. If necessary, specify a port for the tetragon container. +1. If necessary, specify the Unix socket path for the tetragon container. + + The address must be specified in the `unix:///path/to/socket` format, and the socket must be located in `/var/run/tetragon`. This is the host directory that both the tetragon container and the runtime monitor container mount, so only the socket file name can be changed. TCP addresses are not supported. Example: @@ -403,7 +405,7 @@ To set a network port for the runtime monitor service: gops: 7000 tetragon: grpc: - address: "localhost:54321" + address: "unix:///var/run/tetragon/tetragon.sock" ``` 1. Apply the changes and exit the edit mode. diff --git a/install/helm/README.md b/install/helm/README.md index b41de12c..017c75a8 100644 --- a/install/helm/README.md +++ b/install/helm/README.md @@ -162,6 +162,8 @@ The following breaking changes apply when upgrading from earlier versions: - **Connection metadata moved from Secrets to ConfigMaps.** The chart-owned Secrets `postgresql`/`redis`/`rabbitmq`/`clickhouse` no longer carry `_ADDR`/`_SSL_*`/`_TLS_*` keys — those moved to new ConfigMaps `cs-postgresql-config`/`cs-redis-config`/`cs-rabbitmq-config`/`cs-clickhouse-config`. Operators supplying their own auth Secret via `.auth.existingSecret` or the new `global..auth.existingSecret` must scope it to AUTH credentials only (`_USER`, `_PASSWORD`, `_DB` where applicable). Including ADDR/SSL keys in the Secret no longer has any effect; consumers read those from the ConfigMaps. - **Cross-subchart secret-name propagation requires `global..auth.existingSecret`.** Setting only the top-level `postgresql.auth.existingSecret` propagates to sub-chart but NOT to consumer deployments (auth-api, history-api, etc.). To make consumer pods read from your external Secret, use `global.postgresql.auth.existingSecret` (and the corresponding global knobs for redis/rabbitmq/clickhouse). For external services where subchart isn't deployed (`.deploy=false`), only the global knob is needed. - **`global.keys.existingSecret` now honored by every consumer.** `cluster-manager` and `public-api` previously hardcoded `cs-keys` for `PUBLIC_ACCESS_TOKEN_SALT_KEY` / `ACCESS_TOKEN_SALT` and silently ignored `global.keys.existingSecret`. They now resolve the keys-secret name through the `common.cs.keys.secretName` helper. Operators using a custom `global.keys.existingSecret` must ensure the Secret contains the `publicAccessTokenSalt` key (in addition to `encryption` and `token`). +- **Tetragon gRPC moved from TCP to a Unix socket.** `runtime-monitor.tetragon.grpc.address` now defaults to `unix:///var/run/tetragon/tetragon.sock` instead of `localhost:54321`. The old TCP listener ran on the host network without authentication, so any `hostNetwork` pod on the node could call privileged Tetragon RPCs (CVE-2026-65960). TCP addresses are no longer supported or tested — the chart schema rejects any address that does not start with `unix://`. The socket directory is fixed at `/var/run/tetragon`: it is the `tetragon-run` hostPath, mounted into both the Tetragon container and the runtime-monitor container, so only the socket file name can be changed. +- **runtime-monitor now needs group root and a `tetragon-run` mount.** Tetragon creates the socket as `root:root` mode `0660`, so the chart now ships defaults for the runtime-monitor DaemonSet where it previously shipped none: `runtime-monitor.containerSecurityContext` gets the repo-standard hardened block (the same one as history-api/kube-manager/notifier/policy-enforcer: `privileged: false`, `allowPrivilegeEscalation: false`, `readOnlyRootFilesystem: true`, `seccompProfile.type: RuntimeDefault`, `seLinuxOptions: {}`) plus `runAsGroup: 0`; `runtime-monitor.podSecurityContext` gets `enabled: true` and `supplementalGroups: [0]` (the devMode fallback, where the container-level securityContext is not rendered); and a top-level `runtime-monitor.volumeMounts` entry mounts `tetragon-run` read-only at `/var/run/tetragon` — the only mount that gives the app container the socket. Note that `readOnlyRootFilesystem: true` is a new constraint on a container that previously ran without any securityContext. Two consequences: admission policies that forbid GID 0 need an exception for this DaemonSet; and overlays that set `runtime-monitor.volumeMounts`, `runtime-monitor.podSecurityContext` or `runtime-monitor.containerSecurityContext` (all previously empty or absent) now silently clobber socket access — **merge with the chart defaults, do not replace them**. ## Uninstalling @@ -631,25 +633,25 @@ clickhouse: ### Runtime-monitor component parameters -| Name | Description | Value | -| --------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| `runtime-monitor.nodeSelector` | Template to specify the labels of nodes for pod assignment | `{}` | -| `runtime-monitor.configUpdateInterval` | Interval to update the stored configuration | `30s` | -| `runtime-monitor.dnsPolicy` | Configuration of the DNS policy for runtime monitoring | `ClusterFirstWithHostNet` | -| `runtime-monitor.containerPorts.http` | Port that HTTP server should be listening on | `9000` | -| `runtime-monitor.containerPorts.grpc` | Port that GRPC server should be listening on | `8000` | -| `runtime-monitor.containerPorts.gops` | Port that gops agent should be listening on | `7000` | -| `runtime-monitor.tetragon.enableProcessCred` | Enable visibility of capabilities in the exec and kprobe events | `true` | -| `runtime-monitor.tetragon.enableProcessNs` | Enable visibility of namespaces in the exec and kprobe events | `true` | -| `runtime-monitor.tetragon.enableMsgHandlingLatency` | Enable latency monitoring in message handling | `true` | -| `runtime-monitor.tetragon.exportAllowList` | Allowlist for JSON export | `{"pod_regex":["deathstar"],"event_set":["PROCESS_EXEC", "PROCESS_EXIT", "PROCESS_KPROBE", "PROCESS_UPROBE", "PROCESS_TRACEPOINT"]} +| Name | Description | Value | +| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `runtime-monitor.nodeSelector` | Template to specify the labels of nodes for pod assignment | `{}` | +| `runtime-monitor.configUpdateInterval` | Interval to update the stored configuration | `30s` | +| `runtime-monitor.dnsPolicy` | Configuration of the DNS policy for runtime monitoring | `ClusterFirstWithHostNet` | +| `runtime-monitor.containerPorts.http` | Port that HTTP server should be listening on | `9000` | +| `runtime-monitor.containerPorts.grpc` | Port that GRPC server should be listening on | `8000` | +| `runtime-monitor.containerPorts.gops` | Port that gops agent should be listening on | `7000` | +| `runtime-monitor.tetragon.enableProcessCred` | Enable visibility of capabilities in the exec and kprobe events | `true` | +| `runtime-monitor.tetragon.enableProcessNs` | Enable visibility of namespaces in the exec and kprobe events | `true` | +| `runtime-monitor.tetragon.enableMsgHandlingLatency` | Enable latency monitoring in message handling | `true` | +| `runtime-monitor.tetragon.exportAllowList` | Allowlist for JSON export | `{"pod_regex":["deathstar"],"event_set":["PROCESS_EXEC", "PROCESS_EXIT", "PROCESS_KPROBE", "PROCESS_UPROBE", "PROCESS_TRACEPOINT"]} ` | -| `runtime-monitor.tetragon.grpc.address` | Set address of Tetragon grpc connection in host:port format | `localhost:54321` | -| `runtime-monitor.tetragon.prometheus.enabled` | Whether to enable exposing Tetragon metrics. | `true` | -| `runtime-monitor.tetragon.prometheus.port` | The port at which to expose metrics. | `2112` | -| `runtime-monitor.tetragon.resources` | Resource configuration for tetragon container | `{}` | -| `runtime-monitor.rabbitmq.queue` | RabbitMQ queue name | `runtime_events` | -| `runtime-monitor.resources` | Resource configuration for runtime-monitor container | `{}` | +| `runtime-monitor.tetragon.grpc.address` | Set address of the Tetragon gRPC connection. Only Unix sockets on the tetragon-run hostPath (unix:///path/to/socket) are supported. | `unix:///var/run/tetragon/tetragon.sock` | +| `runtime-monitor.tetragon.prometheus.enabled` | Whether to enable exposing Tetragon metrics. | `true` | +| `runtime-monitor.tetragon.prometheus.port` | The port at which to expose metrics. | `2112` | +| `runtime-monitor.tetragon.resources` | Resource configuration for tetragon container | `{}` | +| `runtime-monitor.rabbitmq.queue` | RabbitMQ queue name | `runtime_events` | +| `runtime-monitor.resources` | Resource configuration for runtime-monitor container | `{}` | ### Event-processor component parameters diff --git a/install/helm/values.schema.json b/install/helm/values.schema.json index 8d755369..613b97b8 100644 --- a/install/helm/values.schema.json +++ b/install/helm/values.schema.json @@ -623,8 +623,9 @@ "properties": { "address": { "type": "string", - "description": "Set address of Tetragon grpc connection in host:port format", - "default": "localhost:54321" + "description": "Set address of the Tetragon gRPC connection. Only Unix sockets on the tetragon-run hostPath (unix:///path/to/socket) are supported.", + "default": "unix:///var/run/tetragon/tetragon.sock", + "pattern": "^unix://" } } }, @@ -1322,4 +1323,4 @@ } } } -} \ No newline at end of file +} diff --git a/install/helm/values.yaml b/install/helm/values.yaml index 58e6162e..6d0f5a7b 100644 --- a/install/helm/values.yaml +++ b/install/helm/values.yaml @@ -275,8 +275,11 @@ runtime-monitor: exportAllowList: | {"pod_regex":["deathstar"],"event_set":["PROCESS_EXEC", "PROCESS_EXIT", "PROCESS_KPROBE", "PROCESS_UPROBE", "PROCESS_TRACEPOINT"]} grpc: - # -- Set address of Tetragon grpc connection in host:port format - address: "localhost:54321" + # values.schema.json pins "pattern": "^unix://" on this key so a TCP override is + # rejected (CVE-2026-65960). readme-generator cannot emit the constraint, so + # re-apply it by hand after regenerating values.schema.json. + # -- Set address of the Tetragon gRPC connection. Only Unix sockets on the tetragon-run hostPath (unix:///path/to/socket) are supported. + address: "unix:///var/run/tetragon/tetragon.sock" prometheus: # -- Whether to enable exposing Tetragon metrics. enabled: true diff --git a/runtime-monitor/.helm/templates/_container_tetragon.tpl b/runtime-monitor/.helm/templates/_container_tetragon.tpl index 52ca8b12..21d8d121 100644 --- a/runtime-monitor/.helm/templates/_container_tetragon.tpl +++ b/runtime-monitor/.helm/templates/_container_tetragon.tpl @@ -34,6 +34,8 @@ name: bpf-maps - mountPath: "/var/run/cilium" name: cilium-run + - mountPath: "/var/run/tetragon" + name: tetragon-run - mountPath: {{ .Values.exportDirectory }} name: export-logs - mountPath: "/procRoot" diff --git a/runtime-monitor/.helm/templates/daemonset.yaml b/runtime-monitor/.helm/templates/daemonset.yaml index 8a2e2eef..bb8700a7 100644 --- a/runtime-monitor/.helm/templates/daemonset.yaml +++ b/runtime-monitor/.helm/templates/daemonset.yaml @@ -51,6 +51,10 @@ spec: hostPath: path: /var/run/cilium type: DirectoryOrCreate + - name: tetragon-run + hostPath: + path: /var/run/tetragon + type: DirectoryOrCreate - name: export-logs hostPath: path: {{ .Values.exportDirectory }} diff --git a/runtime-monitor/.helm/values.yaml b/runtime-monitor/.helm/values.yaml index fe80ad0f..729a8159 100644 --- a/runtime-monitor/.helm/values.yaml +++ b/runtime-monitor/.helm/values.yaml @@ -32,6 +32,22 @@ env: value: "1000" - name: TETRAGON_ADDR value: "{{ .Values.tetragon.grpc.address }}" +volumeMounts: + - name: tetragon-run + mountPath: /var/run/tetragon + readOnly: true +containerSecurityContext: + seLinuxOptions: {} + privileged: false + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + seccompProfile: + type: "RuntimeDefault" + runAsGroup: 0 +podSecurityContext: + enabled: true + supplementalGroups: + - 0 postgresql: enabled: true rabbitmq: @@ -80,7 +96,6 @@ serviceAccount: annotations: {} name: "" podAnnotations: {} -podSecurityContext: {} nodeSelector: {} tolerations: - operator: Exists @@ -265,8 +280,8 @@ tetragon: # -- Whether to enable exposing Tetragon gRPC. enabled: true # -- The address at which to expose gRPC. Examples: localhost:54321, unix:///var/run/tetragon/tetragon.sock - # Do not change - address: "localhost:54321" + # Do not switch to TCP + address: "unix:///var/run/tetragon/tetragon.sock" gops: # -- Whether to enable exposing gops server. enabled: true diff --git a/runtime-monitor/README.md b/runtime-monitor/README.md index 0bca55f8..0b2713d4 100644 --- a/runtime-monitor/README.md +++ b/runtime-monitor/README.md @@ -1,2 +1,21 @@ # runtime-monitor Runtime Monitor observes Kubernetes workloads and emits runtime security events. + +## Tetragon connection + +In Kubernetes the service talks to the Tetragon agent over a Unix socket: +`unix:///var/run/tetragon/tetragon.sock` (the `TETRAGON_ADDR` / `--tetragonAddr` default in +`pkg/config/config.go`, and `tetragon.grpc.address` in `.helm/values.yaml`). TCP is deliberately +**not** supported there: the Tetragon DaemonSet runs with `hostNetwork: true`, so a TCP listener is +reachable without authentication from any hostNetwork pod on the node, which is CVE-2026-65960. + +Tetragon creates the socket as `root:root` with mode `0660`, while the app container runs as uid +65532, so the chart sets `containerSecurityContext.runAsGroup: 0` plus +`podSecurityContext.supplementalGroups: [0]` (the fallback for devMode deploys, where the +container-level securityContext is not rendered) and mounts the `tetragon-run` hostPath read-only at +`/var/run/tetragon`. The socket directory is fixed at `/var/run/tetragon`: it is baked into the +`tetragon-run` hostPath and into the mount paths of both containers. Only the socket file name can +be changed via `tetragon.grpc.address`. + +`docker-compose.yml` deliberately diverges: it passes `--tetragonAddr=tetragon:54321` explicitly, so +the dev stack keeps using TCP between containers and never exercises the Go default. diff --git a/runtime-monitor/pkg/config/config.go b/runtime-monitor/pkg/config/config.go index b05afcd2..35e2d561 100644 --- a/runtime-monitor/pkg/config/config.go +++ b/runtime-monitor/pkg/config/config.go @@ -7,6 +7,12 @@ import ( "github.com/runtime-radar/runtime-radar/lib/config" ) +// DefaultTetragonAddr is the default Tetragon gRPC target: a Unix socket on the tetragon-run +// hostPath that both the Tetragon and the runtime-monitor containers mount. TCP targets are not +// supported in Kubernetes, where they are reachable unauthenticated from any hostNetwork pod +// on the node (CVE-2026-65960). +const DefaultTetragonAddr = "unix:///var/run/tetragon/tetragon.sock" + // Config represents system configuration. type Config struct { NewDB bool // forces recreation of DB @@ -24,7 +30,7 @@ type Config struct { TLS bool // is TLS enabled? TokenKey string // key for jwt token Auth bool // is auth enabled? - TetragonAddr string // address of Tetragon in host:port format (it should be 127.0.0.1:54321 most of the time) + TetragonAddr string // address of Tetragon in unix:///path/to/socket format (production; unix:///var/run/tetragon/tetragon.sock in Kubernetes) or host:port (local/compose use only, unsupported in Kubernetes) TetragonEventsBuffer int // size of Tetragon events buffer ConfigUpdateInterval time.Duration // interval for Tetragon config periodic update check RabbitAddr string // RabbitMQ address in host[:port] format @@ -54,7 +60,7 @@ func New() *Config { flag.BoolVar(&c.TLS, "tls", config.LookupEnvBool("TLS", false), "Set to enable TLS.") flag.StringVar(&c.TokenKey, "tokenKey", config.LookupEnvString("TOKEN_KEY", ""), "Hex encoded token key to verify jwt token. Supported key sizes are 16, 24 and 32 bytes.") flag.BoolVar(&c.Auth, "auth", config.LookupEnvBool("AUTH", false), "Set to enable JWT auth.") - flag.StringVar(&c.TetragonAddr, "tetragonAddr", config.LookupEnvString("TETRAGON_ADDR", "127.0.0.1:54321"), "Set address of Tetragon in host:port format (it should be 127.0.0.1:54321 most of the time).") + flag.StringVar(&c.TetragonAddr, "tetragonAddr", config.LookupEnvString("TETRAGON_ADDR", DefaultTetragonAddr), "Set address of Tetragon in unix:///path/to/socket format (production, unix:///var/run/tetragon/tetragon.sock in Kubernetes). The host:port form is for local/compose use only and is not supported in Kubernetes.") flag.IntVar(&c.TetragonEventsBuffer, "tetragonEventsBuffer", config.LookupEnvInt("TETRAGON_EVENTS_BUFFER", 1000), "Set size of Tetragon events buffer.") flag.DurationVar(&c.ConfigUpdateInterval, "configUpdateInterval", config.LookupEnvDuration("CONFIG_UPDATE_INTERVAL", 30*time.Second), "Set interval for Tetragon config periodic update check.") flag.StringVar(&c.RabbitAddr, "rabbitAddr", config.LookupEnvString("RABBIT_ADDR", "rabbitmq.default:5672"), "Set RabbitMQ address in host[:port] format.") diff --git a/runtime-monitor/pkg/config/config_test.go b/runtime-monitor/pkg/config/config_test.go new file mode 100644 index 00000000..a41a3908 --- /dev/null +++ b/runtime-monitor/pkg/config/config_test.go @@ -0,0 +1,49 @@ +package config_test + +import ( + "flag" + "os" + "strings" + "testing" + + "github.com/runtime-radar/runtime-radar/runtime-monitor/pkg/config" +) + +// cfg is built exactly once per test binary: config.New registers its flags on the global +// flag.CommandLine and calls flag.Parse, so calling it a second time panics with "flag redefined". +var cfg *config.Config + +func TestMain(m *testing.M) { + // TETRAGON_ADDR, when set, becomes the flag default, so clear it to observe the + // compiled-in one. + _ = os.Unsetenv("TETRAGON_ADDR") + + cfg = config.New() + + os.Exit(m.Run()) +} + +// TestTetragonAddrDefault pins the CVE-2026-65960 contract: the Tetragon target the service falls +// back to must be a Unix socket, both as the exported constant and as the registered default of +// the tetragonAddr flag — the latter is what a deployment without TETRAGON_ADDR actually dials. +func TestTetragonAddrDefault(t *testing.T) { + const wantPrefix = "unix://" + + if !strings.HasPrefix(config.DefaultTetragonAddr, wantPrefix) { + t.Errorf("DefaultTetragonAddr = %q, want a %s target: TCP is not supported in Kubernetes (CVE-2026-65960)", + config.DefaultTetragonAddr, wantPrefix) + } + + f := flag.Lookup("tetragonAddr") + if f == nil { + t.Fatal("config.New did not register the tetragonAddr flag") + } + + if f.DefValue != config.DefaultTetragonAddr { + t.Errorf("tetragonAddr flag default = %q, want %q", f.DefValue, config.DefaultTetragonAddr) + } + + if cfg.TetragonAddr != config.DefaultTetragonAddr { + t.Errorf("Config.TetragonAddr = %q, want %q", cfg.TetragonAddr, config.DefaultTetragonAddr) + } +} diff --git a/runtime-monitor/pkg/monitor/monitor_test.go b/runtime-monitor/pkg/monitor/monitor_test.go new file mode 100644 index 00000000..03db4cb3 --- /dev/null +++ b/runtime-monitor/pkg/monitor/monitor_test.go @@ -0,0 +1,77 @@ +package monitor_test + +import ( + "context" + "net" + "os" + "path/filepath" + "testing" + + "github.com/cilium/tetragon/api/v1/tetragon" + "github.com/runtime-radar/runtime-radar/runtime-monitor/pkg/monitor" + "google.golang.org/grpc" +) + +const testVersion = "v1.7.0-test" + +// sensorsStub answers GetVersion and nothing else, which is all NewTetra calls. +type sensorsStub struct { + tetragon.UnimplementedFineGuidanceSensorsServer +} + +func (sensorsStub) GetVersion(context.Context, *tetragon.GetVersionRequest) (*tetragon.GetVersionResponse, error) { + return &tetragon.GetVersionResponse{Version: testVersion}, nil +} + +// serveUnix starts a Tetragon gRPC stub listening on a Unix socket named name and returns its +// path. The directory is not t.TempDir(), whose path embeds the test name and can overshoot the +// ~100-byte limit on Unix socket paths. +func serveUnix(t *testing.T, name string) string { + t.Helper() + + dir, err := os.MkdirTemp("", "rm") + if err != nil { + t.Fatalf("can't create socket dir: %v", err) + } + t.Cleanup(func() { + _ = os.RemoveAll(dir) + }) + + path := filepath.Join(dir, name) + + lis, err := net.Listen("unix", path) + if err != nil { + t.Fatalf("can't listen on unix socket %s: %v", path, err) + } + + srv := grpc.NewServer() + tetragon.RegisterFineGuidanceSensorsServer(srv, sensorsStub{}) + + go func() { + _ = srv.Serve(lis) + }() + + t.Cleanup(srv.Stop) + + return path +} + +// TestNewTetraUnixSocket checks the assumption the Helm charts rely on: the gRPC dialer used by +// NewTetra accepts a unix:///path/to/socket target natively, with no custom resolver or dialer. +func TestNewTetraUnixSocket(t *testing.T) { + path := serveUnix(t, "t.sock") + + tetra, closeConn, err := monitor.NewTetra("unix://"+path, 1) + if err != nil { + t.Fatalf("NewTetra over unix socket: %v", err) + } + defer func() { + if err := closeConn(); err != nil { + t.Errorf("can't close tetragon connection: %v", err) + } + }() + + if tetra.Version != testVersion { + t.Errorf("tetragon version: got %q, want %q", tetra.Version, testVersion) + } +}