Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/architecture/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ The sandbox filesystem is an `internal/mountfs` composite of two mounts:

A write outside `/tmp` fails, and a redirect into `/src` aborts the script.

`internal/kefkash` vendors the unexported `billysh` handler wiring from kefka.
Its `OpenHandler` is adapted to permit writes, so `/tmp` redirections work.
The filesystem is what enforces the read-only `/src`.
`internal/kefkash` mirrors kefka's `billysh` handler wiring, which was
internal when it was vendored. Its `OpenHandler` is adapted to permit writes,
so `/tmp` redirections work. The filesystem is what enforces the read-only
`/src`.
`internal/mountfs` also provides read-only directory handles for the WASI
programs, which need to open `/` and directories below it to resolve paths.
Open files report their full mounted path so WASI can stat them after open.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.26.3

require (
github.com/Xe/erofs v0.8.0
github.com/Xe/kefka v0.1.2
github.com/Xe/kefka v0.2.0
github.com/aws/aws-sdk-go-v2 v1.41.7
github.com/aws/aws-sdk-go-v2/service/s3 v1.102.0
github.com/aws/smithy-go v1.26.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/ProtonMail/go-crypto v1.4.1 h1:9RfcZHqEQUvP8RzecWEUafnZVtEvrBVL9BiF67
github.com/ProtonMail/go-crypto v1.4.1/go.mod h1:e1OaTyu5SYVrO9gKOEhTc+5UcXtTUa+P3uLudwcgPqo=
github.com/Xe/erofs v0.8.0 h1:OSD900oSKFP91cM+RyCTXW0FyamjtpwA5jTGLEeyxuw=
github.com/Xe/erofs v0.8.0/go.mod h1:GGxvJkCKU4yKfJ+Trap2xC8iN0HGuTUEsD5oz+olLJI=
github.com/Xe/kefka v0.1.2 h1:/kMg+glM3w01AulP20PNszIntNtoNmFd3bHsbFLICl8=
github.com/Xe/kefka v0.1.2/go.mod h1:22dif/zXQZvScR1WPA8ZERvyREtx/cScRlxNs7o55V8=
github.com/Xe/kefka v0.2.0 h1:YXfeAlwxGFvljPX6CK7gqa8XVtLK9SS+K6LGo2gklGU=
github.com/Xe/kefka v0.2.0/go.mod h1:22dif/zXQZvScR1WPA8ZERvyREtx/cScRlxNs7o55V8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
Expand Down
8 changes: 4 additions & 4 deletions internal/kefkash/kefkash.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Package kefkash wires a billy.Filesystem into an mvdan.cc/sh interpreter the
// way the kefka virtual shell does. The handler constructors are vendored from
// kefka's internal/billysh (github.com/Xe/kefka), which is not importable
// because it lives under internal/. They depend only on kefka's public
// command/registry package.
// way the kefka virtual shell does. The handler constructors mirror kefka's
// billysh package (github.com/Xe/kefka/billysh), which was internal when this
// package was first vendored. It stays a local fork for the deviation below;
// importing upstream billysh directly would break /tmp redirections.
//
// One deliberate deviation from upstream: FsysOpenHandler permits write opens
// and delegates them to the filesystem's OpenFile. objgit hands the sandbox a
Expand Down
Loading