Documentation
¶
Index ¶
- Constants
- type CommandRun
- func (rc *CommandRun) Attest(ctx *attestation.AttestationContext) error
- func (rc *CommandRun) Data() *CommandRun
- func (rc *CommandRun) Name() string
- func (rc *CommandRun) RunType() attestation.RunType
- func (a *CommandRun) Schema() *jsonschema.Schema
- func (rc *CommandRun) TracingEnabled() bool
- func (rc *CommandRun) Type() string
- type CommandRunAttestor
- type Option
- type ProcessInfo
Constants ¶
View Source
const ( Name = "command-run" Type = "https://witness.dev/attestations/command-run/v0.1" RunType = attestation.ExecuteRunType )
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"`
Processes []ProcessInfo `json:"processes,omitempty"`
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) *CommandRun
func (*CommandRun) Attest ¶
func (rc *CommandRun) Attest(ctx *attestation.AttestationContext) error
func (*CommandRun) Data ¶ added in v0.4.0
func (rc *CommandRun) Data() *CommandRun
func (*CommandRun) Name ¶
func (rc *CommandRun) Name() string
func (*CommandRun) RunType ¶
func (rc *CommandRun) RunType() attestation.RunType
func (*CommandRun) Schema ¶ added in v0.4.0
func (a *CommandRun) Schema() *jsonschema.Schema
func (*CommandRun) TracingEnabled ¶ added in v0.7.0
func (rc *CommandRun) TracingEnabled() bool
func (*CommandRun) Type ¶
func (rc *CommandRun) Type() string
type CommandRunAttestor ¶ added in v0.4.0
type CommandRunAttestor interface {
// Attestor
Name() string
Type() string
RunType() attestation.RunType
Attest(ctx *attestation.AttestationContext) error
Data() *CommandRun
}
type Option ¶
type Option func(*CommandRun)
func WithCommand ¶
func WithMaterials ¶
func WithMaterials(materials map[string]cryptoutil.DigestSet) Option
func WithSilent ¶
func WithTracing ¶
type ProcessInfo ¶
type ProcessInfo struct {
Program string `json:"program,omitempty"`
ProcessID int `json:"processid"`
ParentPID int `json:"parentpid"`
ProgramDigest cryptoutil.DigestSet `json:"programdigest,omitempty"`
Comm string `json:"comm,omitempty"`
Cmdline string `json:"cmdline,omitempty"`
ExeDigest cryptoutil.DigestSet `json:"exedigest,omitempty"`
OpenedFiles map[string]cryptoutil.DigestSet `json:"openedfiles,omitempty"`
Environ string `json:"environ,omitempty"`
SpecBypassIsVuln bool `json:"specbypassisvuln,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.