October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Can Tetragon Block npm postinstall Network Access in AWS CodeBuild?

A reported AWS CodeBuild experiment shows Tetragon killing curl from an npm dependency’s postinstall script—but only under a specific executable-and-destination policy.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.Support on Ko-Fi

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

A safer way to evaluate enforcement

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.