Documentation
¶
Overview ¶
Package execguard runs only allowlisted absolute executables with exact argument patterns. No shell, no env inheritance by default.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDenied = errors.New("execguard: command denied") ErrRelativePath = errors.New("execguard: relative executable path") ErrShell = errors.New("execguard: shell execution forbidden") ErrOutputLimit = errors.New("execguard: output size limit exceeded") ErrTimeout = errors.New("execguard: execution timeout") )
Functions ¶
This section is empty.
Types ¶
type CommandRule ¶
type CommandRule struct {
Path string
AllowedArgs [][]string // each inner slice is a full argv after the executable
}
CommandRule allowlists one absolute executable and exact argv patterns.
type Guard ¶
type Guard struct {
// contains filtered or unexported fields
}
Guard evaluates and optionally runs allowlisted commands.
Click to show internal directories.
Click to hide internal directories.