safeshell

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package safeshell provides a secure wrapper for subprocess command execution to prevent shell injection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandContext

func CommandContext(ctx context.Context, name string, args ...string) (*exec.Cmd, error)

CommandContext creates a validated, secure exec.Cmd wrapper. It checks the command name and arguments to block dynamic shell injection and execution features.

func Validate

func Validate(val string) error

Validate checks a string argument or command name for injection indicators (e.g. pipes, redirects, operators).

Types

This section is empty.

Jump to

Keyboard shortcuts

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