18 inherit (llvmPackages_13) clang;
24 src = fetchFromGitHub {
25 owner = "aquasecurity";
28 sha256 = "sha256-w/x7KhopkADKvpDc5TE5Kf34pRY6HP3kX1Lqujnl0b8=";
30 vendorSha256 = "sha256-5RXNRNoMydFcemNGgyfqcUPtfMVgMYdiyWo/sZi8GQw=";
33 ./use-our-libbpf.patch
36 enableParallelBuilding = true;
37 # needed to build bpf libs
38 hardeningDisable = [ "stackprotector" ];
40 nativeBuildInputs = [ pkg-config clang ];
41 buildInputs = [ elfutils libbpf zlib ];
46 # don't actually need git but the Makefile checks for it
53 make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES} bpf-core all
57 # tests require a separate go module
58 # integration tests are ran within a nixos vm
59 # see passthru.tests.integration
65 mkdir -p $out/{bin,share/tracee}
67 cp ./dist/tracee-ebpf $out/bin
68 cp ./dist/tracee-rules $out/bin
70 cp -r ./dist/rules $out/share/tracee/
71 cp -r ./cmd/tracee-rules/templates $out/share/tracee/
76 doInstallCheck = true;
77 installCheckPhase = ''
78 runHook preInstallCheck
80 $out/bin/tracee-ebpf --help
81 $out/bin/tracee-ebpf --version | grep "v${version}"
83 $out/bin/tracee-rules --help
85 runHook postInstallCheck
89 integration = nixosTests.tracee;
90 version = testers.testVersion {
92 version = "v${version}";
93 command = "tracee-ebpf --version";
98 homepage = "https://aquasecurity.github.io/tracee/latest/";
99 changelog = "https://github.com/aquasecurity/tracee/releases/tag/v${version}";
100 description = "Linux Runtime Security and Forensics using eBPF";
102 Tracee is a Runtime Security and forensics tool for Linux. It is using
103 Linux eBPF technology to trace your system and applications at runtime,
104 and analyze collected events to detect suspicious behavioral patterns. It
105 is delivered as a Docker image that monitors the OS and detects suspicious
106 behavior based on a pre-defined set of behavioral patterns.
108 license = licenses.asl20;
109 maintainers = with maintainers; [ jk ];
110 platforms = [ "x86_64-linux" ];