probe

package
v0.0.0-...-4e39522 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumeCopySourceRoot = "/.reploy-volume-copy/source"
	VolumeCopyTargetRoot = "/.reploy-volume-copy/target"
)
View Source
const (
	RequestSchemaV1  = "reploy-probe-request-v1"
	ResponseSchemaV1 = "reploy-probe-response-v1"
)
View Source
const PortableToolEnvironmentProfileV1 = "portable-tool-v1"

Variables

This section is empty.

Functions

func Main

func Main(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int

func ValidateRequestV1

func ValidateRequestV1(request RequestV1) error

func ValidateResponseV1

func ValidateResponseV1(request RequestV1, response ResponseV1) error

Types

type AccessObservationV1

type AccessObservationV1 struct {
	Path string `json:"path"`
	Kind string `json:"kind"`
	Mode string `json:"mode"`
	UID  string `json:"uid"`
	GID  string `json:"gid"`
}

type EnvironmentVariableV1

type EnvironmentVariableV1 struct {
	Name  string
	Value string
}

func PortableToolEnvironmentV1

func PortableToolEnvironmentV1() []EnvironmentVariableV1

PortableToolEnvironmentV1 returns a fresh copy of the fixed environment installed by restricted-exec for portable-tool validation probes.

type ExecutableInspectionV1

type ExecutableInspectionV1 struct {
	ID             string `json:"id"`
	InvocationPath string `json:"invocation_path"`
}

type ExecutableObservationV1

type ExecutableObservationV1 struct {
	ID             string                `json:"id"`
	InvocationPath string                `json:"invocation_path"`
	Links          []LinkObservationV1   `json:"links"`
	Terminal       FileObservationV1     `json:"terminal"`
	Access         []AccessObservationV1 `json:"access"`
}

type FileObservationV1

type FileObservationV1 struct {
	Path   string           `json:"path"`
	Kind   string           `json:"kind"`
	Mode   string           `json:"mode"`
	Size   string           `json:"size"`
	SHA256 canonical.Digest `json:"sha256"`
	UID    string           `json:"uid"`
	GID    string           `json:"gid"`
}

type LinkObservationV1

type LinkObservationV1 struct {
	Path         string `json:"path"`
	Target       string `json:"target"`
	ResolvedPath string `json:"resolved_path"`
	Mode         string `json:"mode"`
	UID          string `json:"uid"`
	GID          string `json:"gid"`
}

type RequestV1

type RequestV1 struct {
	Schema      string                   `json:"schema"`
	Inspections []ExecutableInspectionV1 `json:"inspections"`
}

func DecodeRequestV1

func DecodeRequestV1(content []byte) (RequestV1, error)

type ResponseV1

type ResponseV1 struct {
	Schema       string                    `json:"schema"`
	Observations []ExecutableObservationV1 `json:"observations"`
}

func DecodeResponseV1

func DecodeResponseV1(request RequestV1, content []byte) (ResponseV1, error)

DecodeResponseV1 accepts only the closed canonical response schema and binds every observation to the request that caused it.

func Inspect

func Inspect(request RequestV1) (ResponseV1, error)

Jump to

Keyboard shortcuts

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