Security

Who you trust when you pipe a script into a shell, and what the script does to keep that trust small.

Piping a script from the internet into a shell is only as safe as the parties behind it. With installer.dev there are two: the maintainers of the repository you install, whose binary you run in the end, and installer.dev, which serves the script. The script is built so that the second one asks for as little trust as possible.

What you can check

  • The script is readable and the same for everyone. Open the URL in a browser or pipe it into less. The server fills in only the owner, the repository and the URL options. It never adapts the script to the client. The templates are open source in installer/installer.
  • A cut-off download runs nothing. All code sits in functions, and the only top-level command, main, is on the last line. A connection that drops halfway never reaches that line.
  • Every download is verified. The SHA-256 of the release file has to match GitHub’s digest for that file, or the release’s checksum file. A mismatch stops the install. Set INSTL_REQUIRE_CHECKSUM=1 to refuse releases that publish no checksum at all.
  • Only HTTPS. curl runs with --proto '=https' --tlsv1.2. Release files and checksum files must come from github.com.
  • No elevated rights. The script never calls sudo and installs into your own directories. On Windows it writes only to %LOCALAPPDATA% and the user PATH.
  • It touches only its own installs. A directory counts as an install when it holds a receipt. The install, uninstall and remove scripts leave every other directory alone, also when INSTL_HOME points at a directory with other content.
  • No telemetry. The script contacts api.github.com and the GitHub download host, nothing else.

HTTPS-only domain

The whole .dev top-level domain is on the HSTS preload list that browsers ship with. A browser opens installer.dev and its subdomains over HTTPS only, even when you type http:// and even on the first visit, so nobody on the network can swap the script you read for another one. The short domain instl.sh serves the same scripts but has no such guarantee: a browser can make its first request over plain HTTP before it gets redirected.

curl and PowerShell do not use the preload list. Every command in these docs spells out https://. Keep it that way when you copy one, on either domain.

What verification does not cover

A checksum proves that you received the file the maintainers uploaded. It does not prove that the file is harmless. If a maintainer’s account is compromised and a malicious release gets published, its checksum matches. Pin a version you have reviewed when that matters:

Shell
curl -fsSL "https://installer.dev/YOUR/REPO/install.sh?version=v1.2.3" | sh

For audits, save the script, review it, and run the saved copy:

Shell
curl -fsSL https://installer.dev/YOUR/REPO/install.sh -o install.sh
less install.sh
sh install.sh

Maintainers can serve such a reviewed copy from their own repository. Host the script yourself shows how.

Tokens

GITHUB_TOKEN or GH_TOKEN, when set, raises GitHub’s API rate limit. The script sends it only to api.github.com. With curl it passes the token through a configuration file on standard input, so it never appears in the process list. GNU wget reads it from a temporary startup file for the same reason. busybox wget has neither option, so there the token is a command-line argument: prefer curl on shared machines.

Report a vulnerability

Report security issues privately through GitHub’s vulnerability reporting, not in a public issue.