MCPcopy Index your code
hub / github.com/cilium/tetragon

github.com/cilium/tetragon @v1.7.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.7.0 ↗ · + Follow
8,961 symbols 31,977 edges 910 files 2,550 documented · 28%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

<img src="https://github.com/cilium/tetragon/raw/v1.7.0/docs/assets/icons/logo-dark.svg" width="400">

License License License


Cilium’s new Tetragon component enables powerful real-time, eBPF-based Security Observability and Runtime Enforcement.

Tetragon detects and is able to react to security-significant events, such as

  • Process execution events
  • System call activity
  • I/O activity including network & file access

When used in a Kubernetes environment, Tetragon is Kubernetes-aware - that is, it understands Kubernetes identities such as namespaces, pods and so on - so that security event detection can be configured in relation to individual workloads.

Tetragon Overview Diagram

See more about how Tetragon is using eBPF.

Getting started

Refer to the official documentation of Tetragon.

To get started with Tetragon, take a look at the getting started guides to: - Try Tetragon on Kubernetes - Try Tetragon on Linux - Deploy Tetragon - Install the Tetra CLI

Tetragon is able to observe critical hooks in the kernel through its sensors and generates events enriched with Linux and Kubernetes metadata: 1. Process lifecycle: generating process_exec and process_exit events by default, enabling full process lifecycle observability. Learn more about these events on the process lifecycle use case page. 1. Generic tracing: generating process_kprobe, process_tracepoint and process_uprobe events for more advanced and custom use cases. Learn more about these events on the TracingPolicy concept page and discover multiple use cases like: - 🌏 network observability - 📂 filename access - 🔑 credentials monitoring - 🔓 privileged execution

See further resources: - Conference Talks, Books, Blog Posts, and Labs - Frequently Asked Question - References

Join the community

Join the Tetragon 💬 Slack channel and the 📅 Community Call to chat with developers, maintainers, and other users. This is a good first stop to ask questions and share your experiences.

How to Contribute

For getting started with local development, you can refer to the Contribution Guide. If you plan to submit a PR, please "sign-off" your commits.

Adopters

A list of adopters of the Tetragon project and who is deploying it in production, and of their use cases, can be found in the USERS.md file.

Extension points exported contracts — how you extend this code

Entry (Interface)
Entry is an interface for table entries [8 implementers]
pkg/idtable/idtable.go
OnBuildFilter (Interface)
OnBuildFilter is invoked while building a flow filter [19 implementers]
pkg/filters/filters.go
Unloader (Interface)
Unloader describes how to unload a sensor resource, e.g. programs or maps. [10 implementers]
pkg/sensors/unloader/unloader.go
Listener (Interface)
Listener defines the interface to receive events from Observer. Listeners will merge and complete out-of-order events be [20 …
pkg/observer/listener.go
GranularCustomMetric (Interface)
GranularCustomMetric represents a metric collected independently of prometheus package, for example in a BPF map. It's [4 …
pkg/metrics/custommetric.go
EventEncoder (Interface)
EventEncoder is an interface for encoding tetragon.GetEventsResponse. [4 implementers]
pkg/encoder/encoder.go
Message (Interface)
(no doc) [15 implementers]
pkg/reader/notify/notify.go
MsgGenericKprobeArg (Interface)
(no doc) [28 implementers]
pkg/api/tracingapi/client_kprobe.go

Core symbols most depended-on inside this repo

Equal
called by 803
pkg/k8s/slim/k8s/apis/labels/selector.go
New
called by 544
pkg/sensors/program/map.go
GetLogger
called by 534
pkg/logger/log.go
Warn
called by 373
pkg/logger/slog.go
Wait
called by 352
tests/e2e/checker/rpcchecker.go
Close
called by 310
pkg/policyfilter/policyfilter.go
Run
called by 307
pkg/bench/trace.go
Error
called by 298
pkg/logger/slog.go

Shape

Function 3,903
Method 3,469
Struct 869
Class 513
TypeAlias 99
Interface 73
FuncType 26
Enum 9

Languages

Go88%
C++7%
C4%
TypeScript1%
Python1%

Modules by API surface

api/v1/tetragon/tetragon.pb.go703 symbols
api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go674 symbols
api/v1/tetragon/sensors.pb.go353 symbols
pkg/sensors/tracing/kprobe_test.go287 symbols
api/v1/tetragon/events.pb.go175 symbols
bpf/process/types/basic.h132 symbols
pkg/api/tracingapi/client_kprobe.go115 symbols
api/v1/tetragon/tetragon.pb.json.go104 symbols
pkg/sensors/tracing/fentry_test.go100 symbols
api/v1/tetragon/sensors_grpc.pb.go96 symbols
pkg/k8s/slim/k8s/apis/labels/selector.go83 symbols
api/v1/tetragon/sensors.pb.json.go76 symbols

For agents

$ claude mcp add tetragon \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact