Documentation
¶
Index ¶
- Constants
- Variables
- func AreUnixSocketsReachable() bool
- func Available() error
- func BaselineExecutablePaths() []string
- func BaselineReadablePaths() []string
- func BaselineWritablePaths() []string
- func FindDenyPaths(patterns []string, root string) ([]string, error)
- func FindDenyPathsSkipping(patterns []string, root string, skip string) ([]string, error)
- func FirstSymlinkBeneath(path string, writableRoots []string) (string, bool)
- func Init()
- func IsIPv6Reachable() bool
- func KillNotice(result Result, policy Policy) string
- func OverrunNotice(result Result, policy Policy) string
- func RuntimeReadablePaths() []string
- func RuntimeWritablePaths() []string
- func Supported(ctx context.Context) error
- type ArgvRunner
- type Command
- type DenySearch
- type Output
- type Policy
- func (self Policy) Clone() Policy
- func (self Policy) DiscoverDenyPaths() ([]string, error)
- func (self Policy) DiscoverDenyPathsWith(search DenySearch) ([]string, error)
- func (self Policy) WithRead(paths ...string) Policy
- func (self Policy) WithSetEnv(name string, value string) Policy
- func (self Policy) WithWrite(paths ...string) Policy
- func (self Policy) WithoutRead(paths ...string) Policy
- func (self Policy) Writable() bool
- type Result
- type Runner
Constants ¶
View Source
const ( TmpDir = "/tmp" )
Variables ¶
View Source
var ErrNoShell = errors.New("commands require " + shell + "; please install bash")
Functions ¶
func AreUnixSocketsReachable ¶
func AreUnixSocketsReachable() bool
func BaselineExecutablePaths ¶ added in v0.11.0
func BaselineExecutablePaths() []string
func BaselineReadablePaths ¶
func BaselineReadablePaths() []string
func BaselineWritablePaths ¶ added in v0.11.0
func BaselineWritablePaths() []string
func FindDenyPaths ¶ added in v0.9.0
func FindDenyPathsSkipping ¶ added in v0.15.0
func FirstSymlinkBeneath ¶
func IsIPv6Reachable ¶
func IsIPv6Reachable() bool
func KillNotice ¶
func OverrunNotice ¶
func RuntimeReadablePaths ¶ added in v0.11.0
func RuntimeReadablePaths() []string
func RuntimeWritablePaths ¶ added in v0.11.0
func RuntimeWritablePaths() []string
Types ¶
type ArgvRunner ¶ added in v0.14.0
type ArgvRunner interface {
RunArgv(ctx context.Context, directory string, arguments []string, policy Policy) (Result, error)
StartArgv(
ctx context.Context,
directory string,
arguments []string,
policy Policy,
output Output,
) (Command, error)
}
func ArgvFor ¶ added in v0.17.1
func ArgvFor(isUnconfined bool) ArgvRunner
func DirectArgv ¶ added in v0.14.0
func DirectArgv() ArgvRunner
func UnconfinedArgv ¶ added in v0.14.0
func UnconfinedArgv() ArgvRunner