output

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: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Indent = "  " // Indentation for Json printing
)

Variables

View Source
var (
	MgmtConsoleUrl string
	DeepfenceKey   string
)

Functions

func IngestSecretScanResults

func IngestSecretScanResults(secretScanMsg string, index string) error

func PrintColoredSecrets

func PrintColoredSecrets(secrets []SecretFound, isFirstSecret *bool)

func SecretToSecretInfo

func SecretToSecretInfo(out SecretFound) *pb.SecretInfo

func SecretsToSecretInfos

func SecretsToSecretInfos(out []SecretFound) []*pb.SecretInfo

Types

type JsonDirSecretsOutput

type JsonDirSecretsOutput struct {
	Timestamp time.Time
	DirName   string `json:"Directory Name"`
	Secrets   []SecretFound
}

func (JsonDirSecretsOutput) PrintJsonFooter

func (dirOutput JsonDirSecretsOutput) PrintJsonFooter()

func (JsonDirSecretsOutput) PrintJsonHeader

func (dirOutput JsonDirSecretsOutput) PrintJsonHeader()

func (*JsonDirSecretsOutput) SetDirName

func (dirOutput *JsonDirSecretsOutput) SetDirName(dirName string)

func (*JsonDirSecretsOutput) SetSecrets

func (dirOutput *JsonDirSecretsOutput) SetSecrets(Secrets []SecretFound)

func (*JsonDirSecretsOutput) SetTime

func (dirOutput *JsonDirSecretsOutput) SetTime()

func (JsonDirSecretsOutput) WriteSecrets

func (dirOutput JsonDirSecretsOutput) WriteSecrets(outputFilename string) error

type JsonImageSecretsOutput

type JsonImageSecretsOutput struct {
	Timestamp   time.Time
	ImageName   string `json:"Image Name"`
	ImageId     string `json:"Image ID"`
	ContainerId string `json:"Container ID"`
	Secrets     []SecretFound
}

func (JsonImageSecretsOutput) PrintJsonFooter

func (imageOutput JsonImageSecretsOutput) PrintJsonFooter()

func (JsonImageSecretsOutput) PrintJsonHeader

func (imageOutput JsonImageSecretsOutput) PrintJsonHeader()

func (*JsonImageSecretsOutput) SetImageId

func (imageOutput *JsonImageSecretsOutput) SetImageId(imageId string)

func (*JsonImageSecretsOutput) SetImageName

func (imageOutput *JsonImageSecretsOutput) SetImageName(imageName string)

func (*JsonImageSecretsOutput) SetSecrets

func (imageOutput *JsonImageSecretsOutput) SetSecrets(Secrets []SecretFound)

func (*JsonImageSecretsOutput) SetTime

func (imageOutput *JsonImageSecretsOutput) SetTime()

func (JsonImageSecretsOutput) WriteSecrets

func (imageOutput JsonImageSecretsOutput) WriteSecrets(outputFilename string) error

type SecretFound

type SecretFound struct {
	LayerID               string  `json:"Image Layer ID,omitempty"`
	RuleID                int     `json:"Matched Rule ID,omitempty"`
	RuleName              string  `json:"Matched Rule Name,omitempty"`
	PartToMatch           string  `json:"Matched Part,omitempty"`
	Match                 string  `json:"String to Match,omitempty"`
	Regex                 string  `json:"Signature to Match,omitempty"`
	Severity              string  `json:"Severity,omitempty"`
	SeverityScore         float64 `json:"Severity Score,omitempty"`
	PrintBufferStartIndex int     `json:"Starting Index of Match in Original Content,omitempty"`
	MatchFromByte         int     `json:"Relative Starting Index of Match in Displayed Substring"`
	MatchToByte           int     `json:"Relative Ending Index of Match in Displayed Substring"`
	CompleteFilename      string  `json:"Full File Name,omitempty"`
	MatchedContents       string  `json:"Matched Contents,omitempty"`
}

type SecretstOutput

type SecretstOutput interface {
	WriteSecrets(string) error
}

Jump to

Keyboard shortcuts

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