Documentation ¶
Index ¶
Constants ¶
View Source
const ( SchemaVersion = 2 FormatTable = "table" FormatJSON = "json" FormatTemplate = "template" FormatSarif = "sarif" FormatCycloneDX = "cyclonedx" FormatSPDX = "spdx" FormatSPDXJSON = "spdx-json" FormatGitHub = "github" FormatCosignVuln = "cosign-vuln" )
Variables ¶
View Source
var CustomTemplateFuncMap = map[string]interface{}{}
CustomTemplateFuncMap is used to overwrite existing functions for testing.
View Source
var ( SupportedFormats = []string{ FormatTable, FormatJSON, FormatTemplate, FormatSarif, FormatCycloneDX, FormatSPDX, FormatSPDXJSON, FormatGitHub, FormatCosignVuln, } )
View Source
var ( SupportedSBOMFormats = []string{ FormatCycloneDX, FormatSPDX, FormatSPDXJSON, FormatGitHub, } )
Functions ¶
Types ¶
type JSONWriter ¶
JSONWriter implements result Writer
type Option ¶
type Option struct { AppVersion string Format string Report string Output io.Writer Tree bool Severities []dbTypes.Severity OutputTemplate string Compliance spec.ComplianceSpec // For misconfigurations IncludeNonFailures bool Trace bool // For licenses LicenseRiskThreshold int IgnoredLicenses []string }
type SarifWriter ¶
type SarifWriter struct { Output io.Writer Version string // contains filtered or unexported fields }
SarifWriter implements result Writer
type TemplateWriter ¶
TemplateWriter write result in custom format defined by user's template
func NewTemplateWriter ¶
func NewTemplateWriter(output io.Writer, outputTemplate string) (*TemplateWriter, error)
NewTemplateWriter is the factory method to return TemplateWriter object
Click to show internal directories.
Click to hide internal directories.