scan

package
v0.0.0-...-b63ef67 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAndScanContainerStream

func ExtractAndScanContainerStream(containerId string, namespace string,
	scanCtx *tasks.ScanContext) (chan output.SecretFound, error)

func ExtractAndScanImageStream

func ExtractAndScanImageStream(image string, scanCtx *tasks.ScanContext) (chan output.SecretFound, error)

func ScanSecretsInDir

func ScanSecretsInDir(layer string, baseDir string, fullDir string,
	isFirstSecret *bool, scanCtx *tasks.ScanContext) ([]output.SecretFound, error)

ScanSecretsInDir Scans a given directory recursively to find all secrets inside any file in the dir @parameters layer - layer ID, if we are scanning directory inside container image baseDir - Parent directory fullDir - Complete path of the directory to be scanned isFirstSecret - indicates if some secrets are already printed, used to properly format json @returns []output.SecretFound - List of all secrets found Error - Errors if any. Otherwise, returns nil

func ScanSecretsInDirStream

func ScanSecretsInDirStream(layer string, baseDir string, fullDir string,
	isFirstSecret *bool, scanCtx *tasks.ScanContext) (chan output.SecretFound, error)

ScanSecretsInDirStream Scans a given directory recursively to find all secrets inside any file in the dir @parameters layer - layer ID, if we are scanning directory inside container image baseDir - Parent directory fullDir - Complete path of the directory to be scanned isFirstSecret - indicates if some secrets are already printed, used to properly format json @returns chan output.SecretFound - Channel of all secrets found Error - Errors if any. Otherwise, returns nil

Types

type ContainerExtractionResult

type ContainerExtractionResult struct {
	Secrets     []output.SecretFound
	ContainerId string
}

func ExtractAndScanContainer

func ExtractAndScanContainer(containerId string, namespace string,
	scanCtx *tasks.ScanContext) (*ContainerExtractionResult, error)

type ContainerScan

type ContainerScan struct {
	// contains filtered or unexported fields
}

type ImageExtractionResult

type ImageExtractionResult struct {
	Secrets []output.SecretFound
	ImageId string
}

func ExtractAndScanFromTar

func ExtractAndScanFromTar(tarFolder string, imageName string,
	scanCtx *tasks.ScanContext) (*ImageExtractionResult, error)

func ExtractAndScanImage

func ExtractAndScanImage(image string) (*ImageExtractionResult, error)

type ImageScan

type ImageScan struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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