probe

package
v0.0.0-...-616f635 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 33 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 ValidateMappedSandboxArgumentsV1

func ValidateMappedSandboxArgumentsV1(args []string, ceiling uint64) error

ValidateMappedSandboxArgumentsV1 lets the host use the actual startup parser before creating an inhibited instance. It grants no runtime qualification.

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)

func InspectSameFile

func InspectSameFile(request RequestV1) (ResponseV1, error)

InspectSameFile emits ordinary observations only when both opened regular files have the same filesystem identity. Byte equality alone is insufficient.

Jump to

Keyboard shortcuts

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