MCPcopy Index your code
hub / github.com/NationalSecurityAgency/seabee

github.com/NationalSecurityAgency/seabee @v1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.0 ↗ · + Follow
556 symbols 1,116 edges 77 files 206 documented · 37% updated 7mo agov1.2.0 · 2025-11-03★ 6219 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SeaBee

SeaBee is a stylized acronym for "Security Enhanced Architecture for eBPF".

SeaBee is a framework for hardening other eBPF security tools against intervention by privileged users. For example, eBPF maps can be written to by any privileged user which might make it easy to disrupt security policy or configuration of an eBPF security tool. SeaBee allows an administrator to enforce policies controlling who has access to eBPF tools on a system based on private keys. This makes it harder for an attacker to compromise or subvert security controls implemented in eBPF.

For an overview, see our presentation about SeaBee from the 2025 Linux Security Summit NA

To try out SeaBee, see Getting Started with SeaBee. Then try our tutorial.

Don't hesitate to create an issue or a PR. See CONTRIBUTING.md

Please Note: this project is still under active development. Policy language and apis may receive changes breaking backwards compatibility.

Overview

SeaBee Architecture Diagram

The different elements of SeaBee are highlighted in blue. The other elements show how users interact with SeaBee and how other processes interact with SeaBee.

  • seabeectl is a command line interface for SeaBee. See seabeectl docs
  • The SeaBee userspace manages loading eBPF, tracking policy updates, and logging.
  • eBPF maps are used to store SeaBee policy in the kernel
  • eBPF LSM programs are used to enforce SeaBee policies on processes when they take a particular action that SeaBee cares about. Examples include accessing eBPF maps or files associated with a SeaBee policy.

Use Cases

  • Protect eBPF Security tools from privileged users
  • Enforce isolation between distinct eBPF tools
  • Visibility & auditing of modification or tampering with eBPF tools

Documentation

Documentation is found under docs/docs/ and is hosted at code.nsa.gov/seabee.

To build and view the documentation locally in a browser:

  • make update
  • make -C docs serve-build

Disclaimer of Endorsement

Nothing in this Work is intended to constitute an endorsement, explicit or implied, by the United States Government of any particular manufacturer's product or service.

Any reference made herein by the United States Government to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise, in this Work does not constitute an endorsement, recommendation, or favoring by the United States Government and shall not be construed as a reference for advertising or product endorsement purposes.

Extension points exported contracts — how you extend this code

TestSuite (Interface)
Generic integration testing harness with default implementations for common test lifecycle management [2 implementers]
tests/src/suite.rs
FromYamlPath (Interface)
(no doc) [1 implementers]
seabee/src/policy/policy_file.rs

Core symbols most depended-on inside this repo

log_generic_msg
called by 26
bpf/include/logging.h
test
called by 24
tests/src/command.rs
str_to_abs_path_str
called by 21
seabee/src/utils.rs
list_policies
called by 12
tests/src/policy/shared.rs
policies_on_disk
called by 11
tests/src/policy/shared.rs
remove_if_exists
called by 10
seabee/src/utils.rs
list_keys
called by 10
tests/src/policy/shared.rs
log_buf
called by 10
bpf/include/logging.h

Shape

Function 313
Class 136
Method 73
Enum 32
Interface 2

Languages

Rust69%
C++17%
C14%

Modules by API surface

bpf/src/seabee/seabee.bpf.c36 symbols
tests/src/policy/protect_tool.rs29 symbols
bpf/include/seabee_utils.h29 symbols
seabee/src/utils.rs23 symbols
bpf/include/logging_types.h23 symbols
bpf/src/seabee/seabee_log.h21 symbols
seabee/src/seabeectl_lib.rs19 symbols
seabee/src/policy/runtime_update.rs17 symbols
tests/src/policy/shared.rs16 symbols
seabee/src/crypto.rs15 symbols
tests/src/policy/mod.rs13 symbols
seabee/src/policy/policy_file.rs13 symbols

For agents

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

⬇ download graph artifact

Ask about this repo answers extend the page