scan

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScanSecretsInDir

func ScanSecretsInDir(layer string, baseDir string, fullDir string, isFirstSecret *bool,
	numSecrets *uint, matchedRuleSet map[uint]uint) ([]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

Types

type ContainerExtractionResult

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

func ExtractAndScanContainer

func ExtractAndScanContainer(containerId string, namespace string) (*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) (*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