Curl Pipe Guard

Curl Pipe Guard is a copy-paste React component that stops ran an untrusted install script before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/curl-pipe-guard
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsRan an untrusted install script

Was this component page useful?

How do I install Curl Pipe Guard?

pnpm dlx shadcn@latest add @bollard/curl-pipe-guard

The files land in your project. They're yours to edit.

How do I use Curl Pipe Guard in React?

curl-pipe-guard-usage.tsx
import { CurlPipeGuard } from "@/components/ui/curl-pipe-guard"

<CurlPipeGuard
  key={pick}
  {...example}
  onCopy={(_, mode) => setLog(mode === "steps" ? "Copied the safer steps." : "Copied the one-liner.")}
  onRun={(_, mode) => new Promise<void>((resolve) => setTimeout(() => (setLog(`Ran the ${mode === "steps" ? "steps" : "one-liner"} in the terminal.`), resolve()), 700))}
/>

What input mistakes does Curl Pipe Guard catch?

  • Plain http:// and raw IP addresses
  • Link shorteners and hosts that aren't the product's own domain
  • sudo and -k/--insecure
  • No checksum and no -f (fail on HTTP errors)
  • A safer download, inspect, verify and run sequence to copy instead

What props does Curl Pipe Guard accept?

CurlPipeGuard props
PropTypeDefault
command* (required)

The install one-liner as the docs show it, e.g. `curl -fsSL https://bun.sh/install | bash`.

string—
mode

Controlled copy mode.

CurlPipeMode—
defaultMode

Initial mode when uncontrolled. Defaults to the safer steps whenever something is flagged.

CurlPipeMode—
onModeChange

Called when the user switches between the one-liner and the steps.

(mode: CurlPipeMode) => void—
onCopy

Called after a successful copy with exactly what was copied.

(text: string, mode: CurlPipeMode) => void—
onRun

Shows a Run button (for terminals and IDEs). May return a Promise; the button shows a pending state and ignores repeat clicks.

(text: string, mode: CurlPipeMode) => void | Promise<void>—
messages

Any visible string.

Partial<CurlPipeMessages>—

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

How is Curl Pipe Guard accessible?

  • Copy mode is a role="radiogroup" with roving tabIndex and arrow keys
  • HTTPS vs HTTP is shown with icons and text
  • Findings are written out in text

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Parses the command text; it cannot tell whether the script itself is safe
  • Command forms it can't parse are flagged as unparsed rather than analysed
  • A matching domain can still serve a compromised script

What expensive mistakes does Curl Pipe Guard stop?

Ran an untrusted install script

Also known as

curl | sh · curl bash · install script · one-liner · wget · powershell iex · terminal · copy command

Field type

What dependencies does Curl Pipe Guard require?

Curl Pipe Guard facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameCurl Pipe Guard
Registry identifier@bollard/curl-pipe-guard
Install commandnpx shadcn@latest add @bollard/curl-pipe-guard
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Curl Pipe Guard

What form validation mistake does Curl Pipe Guard catch?

Curl Pipe Guard prevents ran an untrusted install script. Shows where a curl | sh install script really comes from and offers download, inspect and verify steps instead, before an untrusted script runs. Catches: Plain http:// and raw IP addresses, Link shorteners and hosts that aren't the product's own domain, sudo and -k/--insecure, No checksum and no -f (fail on HTTP errors), A safer download, inspect, verify and run sequence to copy instead. Limitation: validate curl-pipe-guard schemas on backend.

How do I install curl-pipe-guard with shadcn?

Run `npx shadcn@latest add @bollard/curl-pipe-guard`. Sources added: registry/default/curl-pipe-guard/curl-pipe-guard.tsx, registry/default/curl-pipe-guard/curl-pipe.ts. Package requirements: lucide-react.

What props customize Curl Pipe Guard?

Curl Pipe Guard accepts `command`, `mode`, `defaultMode`, `onModeChange`, `onCopy`. Configures curl | sh, curl bash, install script behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of curl-pipe-guard?

Parses the command text; it cannot tell whether the script itself is safe. Command forms it can't parse are flagged as unparsed rather than analysed. A matching domain can still serve a compromised script Server requirement: backend verification for curl-pipe-guard.

How does Curl Pipe Guard meet accessibility guidelines?

Copy mode is a role="radiogroup" with roving tabIndex and arrow keys. HTTPS vs HTTP is shown with icons and text. Findings are written out in text. Minimizes errors: curl pipe bash unsafe, install script from wrong domain.

Which components pair with Curl Pipe Guard?