sandbox

package
v0.0.125 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(args []string) error

Handle is the production entry for kool sandbox.

func RunEmbedded

func RunEmbedded(sealed []byte, args []string) int

RunEmbedded decrypts a sealed pack payload, materializes files under a session directory, applies packed env + SANDBOX_ROOT, executes the guest command with cwd at the materialize root, then removes the session directory.

args are the sealed binary's argv after the program name (os.Args[1:]). A leading "--" is skipped. Returns the guest process exit code (or a non-zero code on runner errors).

Types

type PackBlob

type PackBlob struct {
	Version   int               `json:"version"`
	Name      string            `json:"name"`
	CreatedAt time.Time         `json:"created_at"`
	ExpiresAt *time.Time        `json:"expires_at,omitempty"`
	Comment   string            `json:"comment,omitempty"`
	Files     []PackFile        `json:"files"`
	Env       map[string]string `json:"env"`
}

PackBlob is the cleartext payload sealed into a sandbox binary.

type PackFile

type PackFile struct {
	Path    string `json:"path"`
	Mode    uint32 `json:"mode"`
	Content []byte `json:"content"`
}

PackFile is one packed file entry.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL