OpenBSD pledge
Hacker ApprovedSyscall filter in Developer tools
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.
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.
16 people gave an opinion
- recommend it
- 14
- criticize it
- 2
- approval share
- 88%
Recommended in 7 of 13 months
- November 2025: recommended
- December 2025: not recommended
- January 2026: not recommended
- February 2026: not recommended
- March 2026: recommended
- April 2026: recommended
- May 2026: recommended
- June 2026: not recommended
- July 2026: recommended
- August 2026: not recommended
- September 2026: recommended
- October 2026: recommended
- November 2026: not recommended (month in progress)
Why it carries the badge
- 14 people recommend itNeeds 10 or more, met.
- 7 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 7 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Easy to add, works by default
“pledge/unveil is easy to drop into any existing code base.”
Comment from 9 Jul 2026 in “OpenBSD has a use-after-free allowing local privilege escalation to root” “Pledge is really good and works by default.”
Comment from 10 Apr 2026 in “FreeBSD Laptop Compatibility: Top Laptops to Use with FreeBSD” “By far the easiest sandboxing out there.”
Comment from 20 Sep 2026 in “Software sandboxing: The basics (2025)” Restricts programs to fewer operations
“It's nice when you look at the code and see the program restrict itself to a smaller set of operations.”
Comment from 21 May 2026 in “GitHub confirms breach of 3,800 repos via malicious VSCode extension” “I prefer it’s model of declaring this is what I want to use, any calls to code outside that error out.”
Comment from 8 May 2026 in “Maybe you shouldn't install new software for a bit” “With pledge(), they can easily lock down the cgi in terms of syscalls it can make”
Comment from 13 Oct 2026 in “A Modern Web App in C” - Comment from 17 Nov 2025 in “Why use OpenBSD?”
Proven in OpenBSD and Chromium
“Compare that instead to OpenBSD, where the Chromium port has used pledge(2) since January 2016”
Comment from 20 Sep 2026 in “Software sandboxing: The basics (2025)” “all the work openbsd has done and is doing to develop stuff like pledge”
Comment from 16 Oct 2026 in “Big Fish: Exploiting a 37-Year-Old Kernel Bug in OpenBSD” Combines with unveil for access limits
“with pledge+unveil to limit what they can access even more”
Comment from 8 Jul 2026 in “OpenBSD has a use-after-free allowing local privilege escalation to root” “pledge/unveil is easy to drop into any existing code base.”
Comment from 9 Jul 2026 in “OpenBSD has a use-after-free allowing local privilege escalation to root”
What people said
15 of the 16 comments that mention it, newest first. Each links to the original comment.
“all the work openbsd has done and is doing to develop stuff like pledge”
“With pledge(), they can easily lock down the cgi in terms of syscalls it can make”
“Works because OpenBSD has totalitarian control of the ecosystem”
“Compare that instead to OpenBSD, where the Chromium port has used pledge(2) since January 2016”
“By far the easiest sandboxing out there.”
“pledge/unveil is easy to drop into any existing code base.”
“with pledge+unveil to limit what they can access even more”
“pledge is interesting although doesn't do much for code that wasn't compiled with it”
“It's nice when you look at the code and see the program restrict itself to a smaller set of operations.”
“Pledge still leaves an entire application in the same security zone.”
“I prefer it’s model of declaring this is what I want to use, any calls to code outside that error out.”
“Pledge is really good and works by default.”
“Pledge might be useful here”
“With landlock, pledge/unveil and similar tech, the developers of the software write and configure it”
“pledge() lets you give high level "I just want to do I/O on what I already have"”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.