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)
Click to show internal directories.
Click to hide internal directories.