Documentation
¶
Index ¶
- func ConvertToSARIF(analysis *api.SecurityAnalysis, consoleUrl string) (string, error)
- type SarifArtifactContent
- type SarifArtifactLocation
- type SarifDriver
- type SarifLocation
- type SarifLog
- type SarifMessage
- type SarifMultiformatMessageString
- type SarifPhysicalLocation
- type SarifRegion
- type SarifResult
- type SarifRule
- type SarifRun
- type SarifTool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToSARIF ¶
func ConvertToSARIF(analysis *api.SecurityAnalysis, consoleUrl string) (string, error)
ConvertToSARIF converts SecurityAnalysis to SARIF format
Types ¶
type SarifArtifactContent ¶
type SarifArtifactContent struct {
Text string `json:"text,omitempty"`
}
type SarifArtifactLocation ¶
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"`
}
SARIF 2.1.0 structures
type SarifMessage ¶
type SarifPhysicalLocation ¶
type SarifPhysicalLocation struct {
ArtifactLocation SarifArtifactLocation `json:"artifactLocation"`
Region SarifRegion `json:"region,omitempty"`
}
type SarifRegion ¶
type SarifRegion struct {
StartLine int `json:"startLine,omitempty"`
StartColumn int `json:"startColumn,omitempty"`
EndLine int `json:"endLine,omitempty"`
EndColumn int `json:"endColumn,omitempty"`
Snippet *SarifArtifactContent `json:"snippet,omitempty"`
}
type SarifResult ¶
type SarifResult struct {
RuleID string `json:"ruleId"`
Level string `json:"level,omitempty"` // "error", "warning", "note", "none"
Message SarifMessage `json:"message"`
Help SarifMultiformatMessageString `json:"help,omitempty"`
HelpUri string `json:"helpUri,omitempty"`
Locations []SarifLocation `json:"locations,omitempty"`
Properties map[string]any `json:"properties,omitempty"`
}
type SarifRule ¶
type SarifRule struct {
ID string `json:"id"`
ShortDescription SarifMultiformatMessageString `json:"shortDescription,omitempty"`
FullDescription SarifMultiformatMessageString `json:"fullDescription,omitempty"`
Help SarifMultiformatMessageString `json:"help,omitempty"`
Properties map[string]any `json:"properties,omitempty"`
}
type SarifRun ¶
type SarifRun struct {
Tool SarifTool `json:"tool"`
Results []SarifResult `json:"results"`
}
type SarifTool ¶
type SarifTool struct {
Driver SarifDriver `json:"driver"`
}
Click to show internal directories.
Click to hide internal directories.