diff --git a/pkg/apis/softwarecomposition/types.go b/pkg/apis/softwarecomposition/types.go index 8003b526c..ddc61af2b 100644 --- a/pkg/apis/softwarecomposition/types.go +++ b/pkg/apis/softwarecomposition/types.go @@ -244,9 +244,10 @@ type RulePolicy struct { } type ExecCalls struct { - Path string - Args []string - Envs []string + Path string + Args []string + Envs []string + ProcessTree StackTrace } const sep = "␟" @@ -267,8 +268,9 @@ func (e ExecCalls) String() string { } type OpenCalls struct { - Path string - Flags []string + Path string + Flags []string + ProcessTree StackTrace } func (e OpenCalls) String() string { @@ -282,6 +284,20 @@ func (e OpenCalls) String() string { return s.String() } +type StackTrace struct { + Root FileName + Nodes map[FileName]StackFrame +} + +type StackFrame struct { + File FileName + Address uint64 + Children []FileName + Parents []FileName +} + +type FileName string + type ApplicationProfileStatus struct { } diff --git a/pkg/apis/softwarecomposition/v1beta1/types.go b/pkg/apis/softwarecomposition/v1beta1/types.go index 4b5b22336..25b6a75af 100644 --- a/pkg/apis/softwarecomposition/v1beta1/types.go +++ b/pkg/apis/softwarecomposition/v1beta1/types.go @@ -225,16 +225,32 @@ type ApplicationProfileContainer struct { } type ExecCalls struct { - Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` - Args []string `json:"args,omitempty" protobuf:"bytes,2,opt,name=args"` - Envs []string `json:"envs,omitempty" protobuf:"bytes,3,opt,name=envs"` + Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` + Args []string `json:"args,omitempty" protobuf:"bytes,2,opt,name=args"` + Envs []string `json:"envs,omitempty" protobuf:"bytes,3,opt,name=envs"` + ProcessTree StackTrace `json:"processTree,omitempty" protobuf:"bytes,4,opt,name=processTree"` } type OpenCalls struct { - Path string `json:"path" yaml:"path" protobuf:"bytes,1,req,name=path"` - Flags []string `json:"flags" yaml:"flags" protobuf:"bytes,2,rep,name=flags"` + Path string `json:"path" yaml:"path" protobuf:"bytes,1,req,name=path"` + Flags []string `json:"flags" yaml:"flags" protobuf:"bytes,2,rep,name=flags"` + ProcessTree StackTrace `json:"processTree,omitempty" protobuf:"bytes,4,opt,name=processTree"` } +type StackTrace struct { + Root FileName `json:"root" protobuf:"bytes,1,opt,name=root"` + Nodes map[FileName]StackFrame `json:"nodes" protobuf:"bytes,2,rep,name=nodes"` +} + +type StackFrame struct { + File FileName `json:"file" protobuf:"bytes,1,opt,name=file"` + Address uint64 `json:"address" protobuf:"bytes,2,opt,name=address"` + Children []FileName `json:"children" protobuf:"bytes,3,rep,name=children"` + Parents []FileName `json:"parents" protobuf:"bytes,4,rep,name=parents"` +} + +type FileName string + type ApplicationProfileStatus struct { }