# OpenBSD pledge

Hacker Approved page: https://hackerapproved.com/p/pledge/

11 people recommended OpenBSD pledge in Hacker News comments, 3 had mixed feelings and 2 criticized it, November 2025 to October 2026. It was recommended in 7 of 12 months, in 9 threads. It meets the Hacker Approved badge rule.

**Verdict:** Lets a program declare the system calls it needs and blocks the rest, easy sandboxing on OpenBSD. Critics say it does little for code not built with it.

Summary written by Claude from 15 comments.

## Why people recommend it

- Restricts programs to fewer operations (4 comments in the sample): "It's nice when you look at the code and see the program restrict itself to a smaller set of operations." ([source](https://news.ycombinator.com/item?id=48218308)) "I prefer it’s model of declaring this is what I want to use, any calls to code outside that error out." ([source](https://news.ycombinator.com/item?id=48058825)) "With pledge(), they can easily lock down the cgi in terms of syscalls it can make" ([source](https://news.ycombinator.com/item?id=50074601))
- Easy to add, works by default (3 comments in the sample): "pledge/unveil is easy to drop into any existing code base." ([source](https://news.ycombinator.com/item?id=48848005)) "Pledge is really good and works by default." ([source](https://news.ycombinator.com/item?id=47713185)) "By far the easiest sandboxing out there." ([source](https://news.ycombinator.com/item?id=49779826))
- Proven in OpenBSD and Chromium (2 comments in the sample): "Compare that instead to OpenBSD, where the Chromium port has used pledge(2) since January 2016" ([source](https://news.ycombinator.com/item?id=49780694)) "all the work openbsd has done and is doing to develop stuff like pledge" ([source](https://news.ycombinator.com/item?id=50121690))
- Combines with unveil for access limits (1 comment in the sample): "with pledge+unveil to limit what they can access even more" ([source](https://news.ycombinator.com/item?id=48835991))

## What people recommend instead

- [seccomp](https://hackerapproved.com/p/seccomp/): 6 recommend, 5 mixed, 5 criticize

## The badge

A product earns the Hacker Approved badge when at least 10 people recommend it, recommenders outnumber critics at least 2 to 1 (mixed feelings count toward neither side), it was recommended in at least 4 of the 12 months and in at least 5 different threads, and no single thread supplies more than half of the people who recommend it. Health and money products are never badged.

## Cite as

Hacker Approved, "OpenBSD pledge", https://hackerapproved.com/p/pledge/ (11 recommend, 3 mixed, 2 criticize; Hacker News comments, November 2025 to October 2026).

Counts updated 2 Nov 2026, with data through October 31, 2026.
