Documentation ¶
Index ¶
- func CalculateFileHash(path string) (string, error)
- func GetContainerImageID(clientset *kubernetes.Clientset, namespace, podName, containerName string) (string, error)
- func GetFileSize(path string) (int64, error)
- func GetOverlayLayer(path string, pid uint32) string
- type MalwareDescription
- type Overlay
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateFileHash ¶ added in v0.0.23
Calculate the SHA256 hash of the given file.
func GetContainerImageID ¶ added in v0.0.23
func GetContainerImageID(clientset *kubernetes.Clientset, namespace, podName, containerName string) (string, error)
GetContainerImageID returns the image ID of the given container in the given pod.
func GetFileSize ¶ added in v0.0.23
Get the size of the given file.
func GetOverlayLayer ¶ added in v0.0.23
Types ¶
type MalwareDescription ¶
type MalwareDescription struct { // Name of the malware Name string `json:"malware_name"` // Description of the malware Description string `json:"description"` // Path to the file that was infected Path string `json:"path"` // Hash of the file that was infected Hash string `json:"hash"` // Size of the file that was infected Size string `json:"size"` // Is part of the image IsPartOfImage bool `json:"is_part_of_image"` // K8s resource that was infected Resource schema.GroupVersionResource `json:"resource"` // K8s namespace that was infected Namespace string `json:"namespace"` // K8s pod that was infected PodName string `json:"kind"` // K8s container that was infected ContainerName string `json:"container_name"` // K8s container ID that was infected ContainerID string `json:"container_id"` // K8s container image that was infected ContainerImage string `json:"container_image"` }
type Overlay ¶ added in v0.0.23
type Overlay struct { // UpperDir is the path to the upper directory of the overlay filesystem. UpperDir string // WorkDir is the path to the work directory of the overlay filesystem. WorkDir string // MergedDir is the path to the merged directory of the overlay filesystem. MergedDir string // LowerDirs is the path to the lower directory of the overlay filesystem. LowerDirs []string }
Click to show internal directories.
Click to hide internal directories.