Documentation
¶
Index ¶
- Constants
- Variables
- func ExitOnSeverity(severity string, count int, failOnCount int)
- func FailOn(details SevCount, failOnHighCount int, failOnMediumCount int, ...)
- func GetHostname() string
- func IngestSecretScanResults(secretScanMsg string, index string) error
- func PrintColoredSecrets(secrets []SecretFound, isFirstSecret *bool)
- func SecretToSecretInfo(out SecretFound) *pb.SecretInfo
- func SecretsToSecretInfos(out []SecretFound) []*pb.SecretInfo
- func WriteTableOutput(report *[]SecretFound) error
- type JSONDirSecretsOutput
- func (dirOutput *JSONDirSecretsOutput) GetSecrets() []SecretFound
- func (dirOutput *JSONDirSecretsOutput) SetDirName(dirName string)
- func (dirOutput *JSONDirSecretsOutput) SetSecrets(secrets []SecretFound)
- func (dirOutput *JSONDirSecretsOutput) SetTime()
- func (dirOutput JSONDirSecretsOutput) WriteJSON() error
- func (dirOutput JSONDirSecretsOutput) WriteTable() error
- type JSONImageSecretsOutput
- func (imageOutput *JSONImageSecretsOutput) GetSecrets() []SecretFound
- func (imageOutput *JSONImageSecretsOutput) SetImageID(imageID string)
- func (imageOutput *JSONImageSecretsOutput) SetImageName(imageName string)
- func (imageOutput *JSONImageSecretsOutput) SetSecrets(secrets []SecretFound)
- func (imageOutput *JSONImageSecretsOutput) SetTime()
- func (imageOutput JSONImageSecretsOutput) WriteJSON() error
- func (imageOutput JSONImageSecretsOutput) WriteTable() error
- type Publisher
- func (p *Publisher) IngestSecretScanResults(scanID string, secrets []SecretFound) error
- func (p *Publisher) PublishScanError(scanID, errMsg string)
- func (p *Publisher) PublishScanStatusMessage(scanID, message, status string)
- func (p *Publisher) PublishScanStatusPeriodic(scanID, status string)
- func (p *Publisher) SendReport(hostname, imageName, containerID, nodeType string)
- func (p *Publisher) StartScan(nodeID, nodeType string) string
- func (p *Publisher) StopPublishScanStatus()
- type SecretFound
- type SevCount
Constants ¶
View Source
const ( HIGH = "high" MEDIUM = "medium" LOW = "low" )
severity
View Source
const (
Indent = " " // Indentation for Json printing
)
Variables ¶
View Source
var ( MgmtConsoleURL string ToaeKey string )
Functions ¶
func ExitOnSeverity ¶
func GetHostname ¶
func GetHostname() string
func IngestSecretScanResults ¶
func PrintColoredSecrets ¶
func PrintColoredSecrets(secrets []SecretFound, isFirstSecret *bool)
func SecretToSecretInfo ¶
func SecretToSecretInfo(out SecretFound) *pb.SecretInfo
func SecretsToSecretInfos ¶
func SecretsToSecretInfos(out []SecretFound) []*pb.SecretInfo
func WriteTableOutput ¶
func WriteTableOutput(report *[]SecretFound) error
Types ¶
type JSONDirSecretsOutput ¶
type JSONDirSecretsOutput struct {
Timestamp time.Time
DirName string `json:"Directory Name"`
Secrets []SecretFound
}
func (*JSONDirSecretsOutput) GetSecrets ¶
func (dirOutput *JSONDirSecretsOutput) GetSecrets() []SecretFound
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) WriteJSON ¶
func (dirOutput JSONDirSecretsOutput) WriteJSON() error
func (JSONDirSecretsOutput) WriteTable ¶
func (dirOutput JSONDirSecretsOutput) WriteTable() 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) GetSecrets ¶
func (imageOutput *JSONImageSecretsOutput) GetSecrets() []SecretFound
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) WriteJSON ¶
func (imageOutput JSONImageSecretsOutput) WriteJSON() error
func (JSONImageSecretsOutput) WriteTable ¶
func (imageOutput JSONImageSecretsOutput) WriteTable() error
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func (*Publisher) IngestSecretScanResults ¶
func (p *Publisher) IngestSecretScanResults(scanID string, secrets []SecretFound) error
func (*Publisher) PublishScanError ¶
func (*Publisher) PublishScanStatusMessage ¶
func (*Publisher) PublishScanStatusPeriodic ¶
func (*Publisher) SendReport ¶
func (*Publisher) StopPublishScanStatus ¶
func (p *Publisher) StopPublishScanStatus()
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 SevCount ¶
func CountBySeverity ¶
func CountBySeverity(report []SecretFound) SevCount
Click to show internal directories.
Click to hide internal directories.