How aquasecurity/tracee works
Main Components
• Kernel eBPF Layer: Represent the eBPF probes that live in the kernel and collect the raw system events. This includes the C files in pkg/ebpf (such as tracee.bpf.c) and supporting header files.
• Loader/Initialization Module: Show the user-space component (in pkg/cmd/initialize and cmd/tracee-ebpf) that loads the eBPF programs into the kernel and sets up callbacks.
• Signature/Rule Engine: Outline the modules in pkg/signatures and pkg/policy (including the tracee-rules command in cmd/tracee-rules) that analyze events against pre-defined security signatures and rules.
• API Layer & External Interfaces: Include the gRPC server (pkg/server/grpc) and the HTTP server (pkg/server/http) as methods to expose processed events and telemetry information. Also note the CLI entrypoints (cmd/tracee variants) for direct tool interaction.
• Container & Kubernetes Integration: Acknowledge the modules under pkg/containers as well as the Kubernetes CRD and helm charts under deploy/helm and deploy/kubernetes. Also include integration points for container runtimes (docker, containerd, crio).
• Observability & Metrics: Indicate support for metrics collection (pkg/metrics) as well as the Prometheus/Grafana dashboard configurations (performance/dashboard) for performance and monitoring.
• Auxiliary Libraries: Recognize supporting modules such as logging (pkg/logger), error formatting (pkg/errfmt), and utility functions (pkg/utils).
Relationships and Data Flow
• Flow of raw event data from the eBPF layer to the Event Processing Engine.
• From the event processing block, send the data to both the Signature/Rule Engine (for security analysis) and to the Output/API modules.
• Separate flows from the API/CLI components to external consumers (e.g., CLI dashboard, gRPC clients, HTTP clients).
Architectural Patterns and Design Principles
• Modular Design: Emphasize the clear separation between the kernel-level (eBPF probes) and the user-level processing components.
• Loose Coupling: Note the independent modules in the policy/signature engine, event processing, CLI/API, and container integration.
• Extensibility: Identify the “rules” and “signatures” components (tracee-rules and pkg/signatures) that are designed to be extended with minimal impact on the core pipeline.
• Integration with External Tools: Show how the tool is packaged (via Docker, Helm charts), thus reinforcing the “cloud-native” design for container and Kubernetes environments.
Relevant Technologies, Frameworks, or Libraries
• Go (Golang) as the main programming language.
• eBPF via Linux for kernel-level event collection.
• gRPC and HTTP for API servers.
• Helm charts and Kubernetes manifests for deployment.
• Docker for containerized execution.
• Prometheus and Grafana for observability and performance dashboards.