Safety v0.3.5 on main

Checks where a secret is headed before it leaves.

customs

Outbound secret gate. Before a Bash command or WebFetch URL leaves the machine, checks it for secret-shaped literals and asks when one is headed to a host that is not where that kind of secret goes. A GitHub token to api.github.com passes; the same token to anywhere else asks. The counterpart to warden, which guards what comes in. Builds on the Onlooker ecosystem plugin.

Install /plugin install customs@onlooker-community

Problem

A coding agent runs shell commands and fetches URLs, and a command can carry a token with it. A GitHub token sent to api.github.com is ordinary work. The same token sent to a paste site is a leak, and nothing in the command looks different except the host. Warden guards what comes in; Customs guards what goes out.

How it works

  1. On PreToolUse for Bash and WebFetch, Customs scans the call for secret-shaped literals. A Bash command with no network tool, or a call with no secret, passes silently.
  2. It reads the destination hosts from the URLs and network-tool arguments in the call, and treats any host it cannot read as unknown.
  3. A kind of secret is trusted only at its own hosts: a GitHub token passes to api.github.com, and the same token to anywhere else asks.
  4. A miss returns ask, or deny under mode: "deny". The reason names the kind of secret and the host, never the value. Customs is opt-in and does nothing until you enable it.