layers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

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

Detector represents a struct to detect secret strings located in the layers of a docker image.

func NewDetector

func NewDetector(img image.Image) Detector

NewDetector will construct a new image layer secrets detector

func (Detector) Detect

func (d Detector) Detect() (detections []common.SecretString, err error)

Detect will look for any strings that match any common.SecretStringRule in environment variables and build arguments

func (Detector) UseDefaultRules

func (d Detector) UseDefaultRules() Detector

UseDefaultRules will add the default rules to this list of rules to detect. NOTE: calling this method multiple times will result in duplicate rules being added

func (Detector) WithRules

func (d Detector) WithRules(patterns ...common.SecretStringRule) Detector

WithRules will add the list of rules to this detection list. NOTE: calling this method multiple times with the duplicate rules will r result in duplicate findings being returned

Jump to

Keyboard shortcuts

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