Documentation ¶
Index ¶
- func CustReg(scanOut, regString string) []string
- func CustSplit(s, d string, i int) string
- func GetLayerInfo(mountPath string) (string, error)
- func GetRootFS(containerID string) (string, error)
- func MountOverlayFS(layers []string, cID string) (string, error)
- func PrepCrioScan(cCon models.Status)
- func PrepDockerScan(dCon docker.DockerContainer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustReg ¶
CustReg takes 2 arguments and returns a string slice.
scanOut is the string output from the container /proc/$PID/mountinfo file.
regString is the `raw string` containing the regex match pattern to use.
func CustSplit ¶
CustSplit takes 3 parameters and returns a string. s is the string to split. d is the delimiter by which to split s. i is the slice index of the string to return, if applicable. Usually 1 or 0. If the string was not split, the original string is returned idempotently.
func GetLayerInfo ¶
GetLayerInfo reads /host/proc/<PID>/mountinfo and returns the line containing OverlayFS mount directories.
func GetRootFS ¶
GetRootFS returns the root file system path for a container returned by "runc state <containerID>"
func MountOverlayFS ¶
MountOverlayFS takes a slice of strings containing OverlayFS layer paths and mounts them to a read-only /mnt dir named after their container ID.
func PrepCrioScan ¶
PrepCrioScan gets a slice of container filesystem layers from getCrioLayers and then initiates a scan for each of the returned layers.
func PrepDockerScan ¶
func PrepDockerScan(dCon docker.DockerContainer)
PrepDockerScan gets a slice of container filesystem layers from getDockerLayers and then initiates a scan for each of the returned layers.
Types ¶
This section is empty.