scan

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateFileHash added in v0.0.23

func CalculateFileHash(path string) (string, error)

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

func GetFileSize(path string) (int64, error)

Get the size of the given file.

func GetOverlayLayer added in v0.0.23

func GetOverlayLayer(path string, pid uint32) string

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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