Documentation
¶
Overview ¶
Package gvisor receives a narrow subset of gVisor's SecCheck remote sink. The first supported signal is container/start. The wire message contains command arguments and a working directory, so only allowlisted identity fields may leave the decoder.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunIntegration ¶ added in v0.3.310
func RunIntegration(ctx context.Context, cfg IntegrationConfig, node string, lookup InventoryLookup, emit func(context.Context, Observation)) error
RunIntegration joins identity both before queuing and immediately before emission. A short-lived container that disappears between those joins is deliberately not attributed using a stale cache. Lookup must honor ctx. Emit must not block on network or file I/O; the OTEL batch processor is the intended consumer. Callers own the runtime client's lifetime.
Types ¶
type Identity ¶ added in v0.3.310
type Identity struct {
ContainerID string
SandboxID string
RuntimeHandler string
Namespace string
PodName string
PodUID string
ContainerName string
}
Identity contains only allowlisted local-runtime inventory fields. It does not authenticate the trace sender or identify an actor/session.
type IntegrationConfig ¶ added in v0.3.310
type IntegrationConfig struct {
Enabled bool `mapstructure:"enabled"`
SocketPath string `mapstructure:"socketPath"`
RuntimeEndpoint string `mapstructure:"runtimeEndpoint"`
RuntimeHandler string `mapstructure:"runtimeHandler"`
}
IntegrationConfig enables a separate experimental observation source. Empty configuration performs no I/O. RuntimeEndpoint defaults to the node's CRI socket at the call site; RuntimeHandler defaults to runsc.
func (IntegrationConfig) Validate ¶ added in v0.3.310
func (c IntegrationConfig) Validate() error
type InventoryLookup ¶ added in v0.3.310
type Observation ¶ added in v0.3.310
Observation is distinct from an exec event, profile entry or security alert. Container/start precedes application execution. ObservedAt is receiver time.
type Receiver ¶
type Receiver struct {
SocketPath string
Resolve Resolver
OnStart StartHandler
// contains filtered or unexported fields
}
Receiver is an experimental, opt-in SecCheck remote sink listener. It does not configure runsc or acquire its single Default trace session.
func (*Receiver) QueueDrops ¶
QueueDrops counts locally discarded events when the consumer cannot keep up.
type Resolver ¶
Resolver checks a claimed container ID against the local runtime inventory. The receiver never attributes an unverified claim to a Kubernetes workload.
type Start ¶
type Start struct {
Source string
ContainerID string
ObservedAt time.Time
Dropped uint32 // Cumulative sender-reported drop count on this connection.
}
Start is the entire retained event. In particular, Args, Cwd, Env, and raw protobuf bytes must never be added to this type or passed to the callback.
type StartHandler ¶
StartHandler receives only runtime-verified start events. It must honor ctx cancellation, including interrupting any blocking I/O, so Run can finish.
type Stats ¶ added in v0.3.299
type Stats struct {
AcceptedConnections uint64 `json:"accepted_connections"`
RejectedConnections uint64 `json:"rejected_connections"`
ClosedConnections uint64 `json:"closed_connections"`
Handshakes uint64 `json:"handshakes"`
HandshakeErrors uint64 `json:"handshake_errors"`
ReceivedFrames uint64 `json:"received_frames"`
ReadErrors uint64 `json:"read_errors"`
InterruptedReads uint64 `json:"interrupted_reads"`
InvalidFrames uint64 `json:"invalid_frames"`
UnresolvedStarts uint64 `json:"unresolved_starts"`
IgnoredFrames uint64 `json:"ignored_frames"`
VerifiedStarts uint64 `json:"verified_starts"`
CallbacksCompleted uint64 `json:"callbacks_completed"`
SenderDropFrames uint64 `json:"sender_drop_frames"`
QueueDrops uint64 `json:"queue_drops"`
}
Stats is a process-local diagnostic snapshot. During collection fields are read independently. After Run returns all receiver workers have finished. It contains no message payload, container identity or command arguments.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cri resolves trace claims through a private, deadline-bound local CRI connection, independently of node-agent's host namespace enrichment.
|
Package cri resolves trace claims through a private, deadline-bound local CRI connection, independently of node-agent's host namespace enrichment. |