Yes, in a reported CodeBuild experiment, Tetragon enforced a policy that killed /usr/bin/curl when it tried to connect to an address outside 127.0.0.0/8. The curl process was launched by a dependency’s postinstall script during npm ci. This shows that a configured Tetragon policy blocked that particular request; it does not show that Tetragon identified a malicious package or sandboxed all traffic from npm.
What the CodeBuild experiment demonstrated
Atsushi Suzuki’s reported experiment used an application and a custom dependency. Installing the application with npm ci ran the dependency’s postinstall script, which invoked /usr/bin/curl. A Node.js HTTP server on the same CodeBuild runner listened on port 18080 and recorded a fixed dummy value. The demonstration kept both the curl process and receiver local; it did not send credentials or malware over the Internet. Read the experiment account.
The tracing policy matched the tcp_connect function, selected the /usr/bin/curl binary, excluded loopback destinations, and applied the Sigkill action. In other words, its rule was based on the executable and destination range—not a judgment about whether a package or connection was malicious.
Reported results by mode
| Run | Policy connection events | curl outcome | Dummy value received |
|---|---|---|---|
| Baseline | 0 | Exit 0 | Yes |
| Observe | 1 | Exit 0 | Yes |
| Enforce | 1 | Killed by SIGKILL | No |
These are the author’s results from that controlled experiment, not an independently reproduced test or a general performance or false-positive benchmark. Baseline and observe allowed the request; enforce terminated curl and the local receiver recorded nothing. The workflow treated the simulated block as a successful test outcome.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
What the policy does—and does not—protect
It enforces a rule, not a malware verdict
Tetragon applies the condition you configure. Here, any matching /usr/bin/curl connection to a non-loopback destination would be subject to termination, whether the destination was part of a malicious install script or a legitimate download. The result should therefore be described as blocking a matching connection, not detecting a compromised dependency.
It is not an npm-wide network sandbox
The demonstrated rule does not establish that a process was launched by npm, nor does it cover every executable or network path a package script might use. The experiment account identifies tracing parent-child process relationships and narrowing enforcement to curl processes launched specifically from npm as future work. Do not treat the sample condition as proof that all network traffic initiated by npm is isolated.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Reported CodeBuild setup and compatibility checks
The experiment account reports using the aws/codebuild/amazonlinux-x86_64-standard:5.0 image, LINUX_KERNEL_6, and privileged mode. The author says privileged mode enabled Tetragon to load and attach eBPF programs, and that BTF type information was available in the selected Linux 6 environment. Tetragon was started during CodeBuild’s PRE_BUILD phase, before the GitHub Actions job. These are the author’s reported setup details, not a current availability guarantee.
AWS documents buildspec phases such as install, pre_build, build, and post_build; pre_build is for commands run before the build, including examples such as logging in to a Docker registry. See the AWS CodeBuild buildspec reference for the phase model. Before relying on the experiment’s kernel, privileged-mode, runner-label, or buildspec-override details, confirm they are supported by your current CodeBuild project and runner configuration.
Tetragon’s official enforcement guide demonstrates kernel-level policy enforcement, including terminating a selected process with SIGKILL for an external TCP connection. That guide’s example is for Kubernetes: it supports Tetragon’s general enforcement capability, but does not independently establish CodeBuild compatibility.
Quick Recap
Rank #4
A safer way to evaluate enforcement
- Confirm the execution environment. Verify the CodeBuild project and runner type, selected kernel, BTF availability, and permissions needed to attach eBPF programs. The reported experiment used Linux kernel 6 and privileged mode, but those settings may not be available or appropriate in every current project.
- Start with observation. The experiment’s observe run recorded a matching connection while allowing curl to complete. Use an observation period to identify normal behavior before enabling a rule that can interrupt installation.
- Define the policy scope deliberately. Decide whether the actual requirement is to block a particular executable, destinations outside a range, or processes with a verified npm ancestry. The reported rule implements the first two conditions, not the third.
- Test legitimate installation paths. Check whether required dependency setup or downloads would match the policy. An enforced rule can fail a legitimate install if its curl process connects outside loopback.
- Enable enforcement only with a recovery path. Test that the build reports a clear failure when a process is killed, and ensure you can disable or revise the policy if it blocks required build traffic.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




