A Go library for the Linux Landlock sandboxing feature
Go
360
256 commits
updated Sep 15, 2026
📚 Godoc | 🌍 landlock.io
Go-Landlock is a Go library for the Landlock LSM, an unprivileged sandboxing mechanism on Linux.
Landlock is a Linux kernel feature and can restrict the following types of access:
More details and examples in the Go-Landlock documentation and the Linux Userspace API documentation for Landlock. The Landlock LSM was introduced with Linux 5.13 and is today enabled on most major Linux distributions.
In a Go program, after starting up and doing program initialization work, run:
err := landlock.V10.BestEffort().RestrictPaths(
landlock.RODirs("/usr", "/bin"),
landlock.RWDirs("/tmp"),
)
After this invocation, your program can only access the specified paths.
Goals of Go-Landlock are:
Go
100.0%
A Go library for the Linux Landlock sandboxing feature
Go
360
256 commits
updated Sep 15, 2026
📚 Godoc | 🌍 landlock.io
Go-Landlock is a Go library for the Landlock LSM, an unprivileged sandboxing mechanism on Linux.
Landlock is a Linux kernel feature and can restrict the following types of access:
More details and examples in the Go-Landlock documentation and the Linux Userspace API documentation for Landlock. The Landlock LSM was introduced with Linux 5.13 and is today enabled on most major Linux distributions.
In a Go program, after starting up and doing program initialization work, run:
err := landlock.V10.BestEffort().RestrictPaths(
landlock.RODirs("/usr", "/bin"),
landlock.RWDirs("/tmp"),
)
After this invocation, your program can only access the specified paths.
Goals of Go-Landlock are:
Go
100.0%