scriptdir

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package scriptdir is a reference sandbox provider that writes scripts into a temp directory and runs them via /bin/sh. It does NOT provide isolation and exists only to demonstrate the script-injection pattern.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	BaseDir string
}

Options configures a scriptdir.Provider.

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is the scriptdir reference provider.

func New

func New(opts Options) *Provider

New returns a scriptdir provider.

func (*Provider) Name

func (p *Provider) Name() string

Name returns "scriptdir".

func (*Provider) Prepare

func (p *Provider) Prepare(ctx context.Context, spec cwtypes.SandboxSpec, scripts []sandbox.Script) (sandbox.Instance, error)

Prepare creates a temp directory, writes every script into it, and returns an Instance whose Exec runs the entrypoint via /bin/sh.

Jump to

Keyboard shortcuts

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