Documentation
¶
Overview ¶
Package secureexec pins an executable identity once and runs bounded child commands inside the CloudRING process-tree and kubeconfig replay boundary.
Index ¶
- type Executable
- func (executable *Executable) Close() error
- func (executable *Executable) IdentitySHA256() string
- func (executable *Executable) Run(ctx context.Context, arguments []string, input []byte, ...) ([]byte, []byte, error)
- func (executable *Executable) RunWithEnvironment(ctx context.Context, arguments []string, input []byte, ...) ([]byte, []byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executable ¶
type Executable struct {
// contains filtered or unexported fields
}
func Pin ¶
func Pin(binary string, timeout time.Duration) (*Executable, error)
Pin resolves binary once, snapshots its exact regular executable content, and returns an identity-stable runner. PATH is never consulted again.
func PinAbsolute ¶
func PinAbsolute(path string, timeout time.Duration) (*Executable, error)
PinAbsolute pins one caller-selected absolute executable identity.
func (*Executable) Close ¶
func (executable *Executable) Close() error
func (*Executable) IdentitySHA256 ¶
func (executable *Executable) IdentitySHA256() string
func (*Executable) Run ¶
func (executable *Executable) Run(ctx context.Context, arguments []string, input []byte, maximumStdout, maximumStderr int64, replay *kubeconfigpipe.Replay) ([]byte, []byte, error)
Run executes the pinned identity with bounded output. The optional replay is attached after the executable descriptor, so its fd is calculated safely.
func (*Executable) RunWithEnvironment ¶
func (executable *Executable) RunWithEnvironment(ctx context.Context, arguments []string, input []byte, maximumStdout, maximumStderr int64, environment []string, replay *kubeconfigpipe.Replay) ([]byte, []byte, error)
RunWithEnvironment executes the pinned identity with an explicit environment. A non-nil environment prevents ambient credentials from being inherited by installation-provided adapters. Kubeconfig replay applies its own further allowlist and anonymous descriptor after this boundary.