Skip to content

0.11.0

Choose a tag to compare

@batrapulkit batrapulkit released this 15 Oct 08:18
ff09ff0

Closes every bypass from an outside security review, and keeps them closed

Kaustubh tested 0.9.1 by feeding the hook tool calls and reading its decisions. Seven of his cases still ran on 0.10.1. All are stopped now, and each one is a test that has to keep passing on every release (tests/test_reported_bypasses.py): 16 of 16 stopped, and the everyday version of each still runs. False positives on bench/chains are unchanged at 3 of 41 routine steps.

Stopped now

  • Scripts get the same checks as typed commands. A script, Makefile target or package.json script goes line by line through the same command checks, rules.yaml rules and self-protection as a command typed directly. A script that uploads ~/.ssh/id_rsa is held, just like the line itself.
  • Downloaded code that runs right away: bash <(curl …), source <(…), cat setup.sh | bash, and anything else piped into a shell or interpreter.
  • A file downloaded and then run, sourced or chmod +x'd in the same conversation, for example curl -o x.sh URL followed by sh x.sh.
  • Secrets sent out:
    • curl -d "$(env)"
    • uploads of ~/.ssh, ~/.aws, .env or key files
    • the same through nc or scp
  • npm install / npm ci / yarn read the project's own preinstall, install, postinstall and prepare scripts. --ignore-scripts runs none of them. A new dependency's scripts can't be read before it's downloaded; see THREAT_MODEL.md.

Setup hardening

  • The agent key is no longer in the agents' settings. It moves to ~/.squidbrake/data/hook-keys.json, which is readable only by you and not by agents. Existing installs keep working; run squidbrake connect all once to move the key.
  • Owner-only files on macOS and Linux: the data folder is 700, and the keys, database, secrets and rules.yaml are 600. The hook warns if its key file can be read by others.
  • New opt-in setting, when_unreachable: warn, for a laptop that reboots. While Squidbrake is down, actions run with a loud warning. When it's back, they go on the record as protection.was_off. The default stays block_risky.

Install this version (0.11.0)

Windows (PowerShell):

$env:SQUIDBRAKE_VERSION="0.11.0"; irm https://pilots.squidbrake.com/install.ps1 | iex

macOS / Linux:

curl -fsSL https://pilots.squidbrake.com/install.sh | SQUIDBRAKE_VERSION=0.11.0 sh

With pip: pip install squidbrake==0.11.0. Docker: docker pull ghcr.io/batrapulkit/squidbrake:0.11.0

Running the line again without SQUIDBRAKE_VERSION goes back to the newest. Every version:
https://github.com/batrapulkit/squidbrake/releases

Thanks to Kaustubh Sawant for the security review behind this release.