Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go: add io/fs.FS implementation for bindings #32

Open
cyphar opened this issue May 6, 2024 · 0 comments
Open

go: add io/fs.FS implementation for bindings #32

cyphar opened this issue May 6, 2024 · 0 comments
Labels
bindings/go Related to the Go bindings.

Comments

@cyphar
Copy link
Member

cyphar commented May 6, 2024

While a lot of Go users still haven't migrated wholesale to io/fs, it would be nice to have an implementation of that interface that is actually safely constrained by libpathrs.

One key thing to keep in mind is that we must implement io/fs.SubFS, otherwise Go will create insecure filepath.Join-based chroots if you use the fallback implementation of fs.Sub. I suspect we would want to segregate the io.FS interface from our "standard" interface because the methods are kind of weird and most people would probably not want to use them.

@cyphar cyphar added the bindings/go Related to the Go bindings. label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bindings/go Related to the Go bindings.
Projects
None yet
Development

No branches or pull requests

1 participant