Documentation ¶
Index ¶
- func ExtractAndScanContainerStream(containerId string, namespace string, scanCtx *tasks.ScanContext) (chan output.SecretFound, error)
- func ExtractAndScanImageStream(image string, scanCtx *tasks.ScanContext) (chan output.SecretFound, error)
- func ScanSecretsInDir(layer string, baseDir string, fullDir string, isFirstSecret *bool, ...) ([]output.SecretFound, error)
- func ScanSecretsInDirStream(layer string, baseDir string, fullDir string, isFirstSecret *bool, ...) (chan output.SecretFound, error)
- type ContainerExtractionResult
- type ContainerScan
- type ImageExtractionResult
- type ImageScan
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)