Static Host UK

Inside the Sealed Container That Builds Your Site

Your build runs code you didn't write. Ours runs it with no network, no root, a read-only disk and a ten-minute limit.

By , founder and sysadmin of Static Host UK

I'm Axel Segebrecht. I build privacy-first platforms, advise small businesses on AI governance, and create free tools for the neurodiverse community.

Every time you push, your site is built from scratch, and the build runs code you didn’t write: Hugo or Jekyll, a theme, and for a JavaScript site every npm package it depends on, plus everything those depend on in turn.

What happened in September 2025

On 14 September 2025 GitHub was told about Shai-Hulud, a worm that spread through npm by taking over maintainers’ accounts and adding a post-install script to their packages (GitHub). Installing an infected package ran the script. It looked for npm, GitHub, AWS and Google Cloud tokens on the machine, and installed TruffleHog, an open-source secret scanner, to find more (Infosecurity Magazine). With a stolen npm token it published infected versions of that maintainer’s other packages. GitHub removed more than 500 compromised packages from the registry.

An install script runs on whatever machine does the install, and it can see what that machine can see. For a site, that machine is the build server.

How a build runs here

Two steps, kept apart (build configuration).

First, dependencies. If your repository has a package.json and no node_modules, we run npm install, and a Hugo site with a go.mod gets its modules vendored. This step has network access, because it has to download packages. Your site’s environment variables are not passed to it.

Second, your build command, in a container with:

  • no network access
  • a read-only filesystem, apart from your project folder and a 256 MB /tmp
  • 1 GB of memory and 2 CPUs
  • a ten-minute limit
  • a non-root user

Your environment variables are available in this step, where there is no network to send them anywhere (secure builds).

What that stops, and what it doesn’t

A malicious script that runs during the build and reads your API key has nowhere to send it. One that runs during the install can reach the network, but it doesn’t find your site’s variables there.

Neither step can stop a compromised package from changing what it builds. If a package you depend on writes a bad script into your pages, the pages we serve will carry it.

What you can do

  • Commit your lockfile, package-lock.json, so the install fetches the versions you tested and not whatever was published that morning.
  • Keep secrets out of your repository. Put them in Site settings, Environment variables, up to 20 per site.
  • After updating dependencies, read the build log before you trust the result.

Two days ago we covered what static hosting can’t fix, on the database side of AI-built sites.

get started

Ready to Deploy?

Join Jamstack developers across the UK hosting their static sites with privacy and performance built in. Hosting is free for good, no credit card needed, with Plus features when you want them.