shellsafe

package
v0.1.57 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgContainsUnsafeMeta

func ArgContainsUnsafeMeta(arg string) bool

func GitCommandReadOnly

func GitCommandReadOnly(argv []string) bool

func SplitAndList

func SplitAndList(command string) ([]string, bool)

SplitAndList splits on `&&` only. `||` is intentionally not handled: its semantics are "run the right side if the left side fails", which makes it impossible to prove statically that all branches stay read-only. Callers that need to classify `||` chains as safe must do so explicitly.

func SplitPipeline

func SplitPipeline(command string) ([]string, bool)

func SplitSequence added in v0.1.23

func SplitSequence(command string) ([]string, bool)

SplitSequence splits on `;` only. It is intended for conservative static classification where every command in a sequential list must independently be safe.

Types

This section is empty.

Jump to

Keyboard shortcuts

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