commandrun

package
v0.0.1-alpha6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "CommandRun"
	Type = "https://witness.testifysec.com/attestations/CommandRun/v0.1"
)
View Source
const (
	MAX_PATH_LEN = 4096
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandRun

type CommandRun struct {
	Cmd       []string           `json:"cmd"`
	Stdout    string             `json:"stdout,omitempty"`
	Stderr    string             `json:"stderr,omitempty"`
	ExitCode  int                `json:"exitcode"`
	Products  *artifact.Attestor `json:"products"`
	Processes []ProcessInfo      `json:"processes,omitempty"`
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *CommandRun

func (*CommandRun) Attest

func (*CommandRun) Name

func (rc *CommandRun) Name() string

func (*CommandRun) Subjects

func (rc *CommandRun) Subjects() map[string]cryptoutil.DigestSet

func (*CommandRun) Type

func (rc *CommandRun) Type() string

type Option

type Option func(*CommandRun)

func WithCommand

func WithCommand(cmd []string) Option

func WithMaterials

func WithMaterials(materials map[string]cryptoutil.DigestSet) Option

func WithSilent

func WithSilent(silent bool) Option

func WithTracing

func WithTracing(enabled bool) Option

type ProcessInfo

type ProcessInfo struct {
	ProcessID   int            `json:"processid"`
	Program     string         `json:"program,omitempty"`
	OpenedFiles map[string]int `json:"openedFiles,omitempty"`
}

Jump to

Keyboard shortcuts

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