|
16 | 16 | // **not** safe against race conditions where an attacker changes the |
17 | 17 | // filesystem after (or during) the [SecureJoin] operation. |
18 | 18 | // |
19 | | -// The new API is made up of [OpenInRoot] and [MkdirAll] (and derived |
20 | | -// functions). These are safe against racing attackers and have several other |
21 | | -// protections that are not provided by the legacy API. There are many more |
22 | | -// operations that most programs expect to be able to do safely, but we do not |
23 | | -// provide explicit support for them because we want to encourage users to |
24 | | -// switch to [libpathrs] which is a cross-language next-generation library that |
25 | | -// is entirely designed around operating on paths safely. |
| 19 | +// The new API is available in the [pathrs-lite] subpackage, and provide |
| 20 | +// protections against racing attackers as well as several other key |
| 21 | +// protections against attacks often seen by container runtimes. As the name |
| 22 | +// suggests, [pathrs-lite] is a stripped down (pure Go) reimplementation of |
| 23 | +// [libpathrs]. The main APIs provided are [OpenInRoot], [MkdirAll], and |
| 24 | +// [procfs.Handle] -- other APIs are not planned to be ported. The long-term |
| 25 | +// goal is for users to migrate to [libpathrs] which is more fully-featured. |
26 | 26 | // |
27 | 27 | // securejoin has been used by several container runtimes (Docker, runc, |
28 | 28 | // Kubernetes, etc) for quite a few years as a de-facto standard for operating |
|
38 | 38 | // openat2(RESOLVE_BENEATH) which does not fit the usecase of container |
39 | 39 | // runtimes and most system tools. |
40 | 40 | // |
| 41 | +// [pathrs-lite]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin/pathrs-lite |
41 | 42 | // [libpathrs]: https://github.com/openSUSE/libpathrs |
42 | 43 | // [OpenInRoot]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin/pathrs-lite#OpenInRoot |
43 | 44 | // [MkdirAll]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin/pathrs-lite#MkdirAll |
44 | | -// [os.Root]; https:///pkg.go.dev/os#Root |
| 45 | +// [procfs.Handle]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin/pathrs-lite/procfs#Handle |
| 46 | +// [os.Root]: https:///pkg.go.dev/os#Root |
45 | 47 | package securejoin |
0 commit comments