Documentation
¶
Index ¶
- func CalculateScore(errors, warnings, infos int) int
- func FormatHTML(result types.ScanResult) (string, error)
- func FormatJSON(v interface{}) (string, error)
- func ParseResult(data []byte) *types.ScanResult
- func ParseResultFromFile(path string) (*types.ScanResult, error)
- func WriteJSON(w io.Writer, v interface{}) error
- func WriteSARIF(w io.Writer, result *types.ScanResult) error
- type Reporter
- type SARIFArtifactLocation
- type SARIFDriver
- type SARIFLocation
- type SARIFLog
- type SARIFMessage
- type SARIFPhysicalLocation
- type SARIFRegion
- type SARIFResult
- type SARIFRule
- type SARIFRun
- type SARIFTool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateScore ¶
func FormatHTML ¶
func FormatHTML(result types.ScanResult) (string, error)
func FormatJSON ¶
func ParseResult ¶
func ParseResult(data []byte) *types.ScanResult
func ParseResultFromFile ¶
func ParseResultFromFile(path string) (*types.ScanResult, error)
func WriteSARIF ¶
func WriteSARIF(w io.Writer, result *types.ScanResult) error
Types ¶
type Reporter ¶
type Reporter struct{}
func (*Reporter) BuildResult ¶
func (r *Reporter) BuildResult(files []types.FileResult, summary types.ScanSummary, trustScore int, timestamp string, durationMs int64) types.ScanResult
type SARIFArtifactLocation ¶
type SARIFArtifactLocation struct {
URI string `json:"uri"`
}
type SARIFDriver ¶
type SARIFLocation ¶
type SARIFLocation struct {
PhysicalLocation SARIFPhysicalLocation `json:"physicalLocation"`
}
type SARIFLog ¶
type SARIFLog struct {
Version string `json:"version"`
Schema string `json:"$schema"`
Runs []SARIFRun `json:"runs"`
}
func NewSARIFLog ¶
func NewSARIFLog(result *types.ScanResult) (*SARIFLog, error)
type SARIFMessage ¶
type SARIFMessage struct {
Text string `json:"text"`
}
type SARIFPhysicalLocation ¶
type SARIFPhysicalLocation struct {
ArtifactLocation SARIFArtifactLocation `json:"artifactLocation"`
Region SARIFRegion `json:"region,omitempty"`
}
type SARIFRegion ¶
type SARIFResult ¶
type SARIFResult struct {
RuleID string `json:"ruleId"`
Level string `json:"level"`
Message SARIFMessage `json:"message"`
Locations []SARIFLocation `json:"locations,omitempty"`
}
type SARIFRule ¶
type SARIFRule struct {
ID string `json:"id"`
Name string `json:"name"`
ShortDescription SARIFMessage `json:"shortDescription"`
DefaultLevel string `json:"defaultLevel"`
}
type SARIFRun ¶
type SARIFRun struct {
Tool SARIFTool `json:"tool"`
Results []SARIFResult `json:"results"`
Properties map[string]interface{} `json:"properties,omitempty"`
}
type SARIFTool ¶
type SARIFTool struct {
Driver SARIFDriver `json:"driver"`
}
Click to show internal directories.
Click to hide internal directories.