项目
在 GitHub 查看
landlock-lsm/go-landlock
关于
A Go library for the Linux Landlock sandboxing feature
安全与隐私实测星标增长
- 24小时
- +1
- 7天
- +2
- 15天
- +4
- 1个月
- +8
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Go-Landlock is a Go library for the Landlock LSM, an unprivileged sandboxing mechanism on Linux.
What is Landlock?
Landlock is a Linux kernel feature and can restrict the following types of access:
- Filesystem access
- Some network operations
- Some IPC operations
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.
TL;DR: Example
In a Go program, after starting up and doing program initialization work, run:
err := landlock.V11.BestEffort().RestrictPaths(
landlock.RODirs("/usr", "/bin"),
landlock.RWDirs("/tmp"),
)
After this invocation, your program can only access the specified paths.
Goals
Goals of Go-Landlock are:
- Make unprivileged sandboxing easy to use and effective.
- Keep Go-Landlock's implementation at an easily auditable size.
How to...
探索相关项目
加载中…