container

package
v0.51.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package container collects §6 container_and_cloud_native_linux data.

workloads.go is the workload inventory (issue #135): running Docker containers and Kubernetes pods on the host, as opposed to docker_posture (security posture) or kubelet_fingerprint (daemon config). We expose *what is running* so the scan report can talk about the workloads as business assets, parallel to applications (issue #134).

Index

Constants

View Source
const ModuleName = "container_and_cloud_native_linux"

ModuleName identifies this component module.

Variables

This section is empty.

Functions

func CollectContainerWorkloads added in v0.22.0

func CollectContainerWorkloads(ctx context.Context) *payload.ContainerWorkloads

CollectContainerWorkloads runs the Docker + kubelet workload inventory. Returns nil when no container engine signal is detected on the host so the component serializes as {} rather than an empty object wrapping.

Each engine has a CLI path and an HTTP fallback:

  • Docker: `docker` CLI (preferred) → Unix socket at /var/run/docker.sock or /run/docker.sock (fallback). Hosts that talk to dockerd through a socket without shipping the CLI still report their workloads.
  • Kubernetes: `crictl` CLI (preferred) → kubelet read-only HTTP on port 10255 (fallback). Managed-node layouts that do not install crictl still report their pods when the read-only port is enabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL