Documentation
¶
Index ¶
- func BuildFixFromIssue(issue testapi.Issue) map[string]string
- func BuildHelpMarkdown(issue testapi.Issue, findingType testapi.FindingType) string
- func BuildLocation(issue testapi.Issue, targetFile string) map[string]interface{}
- func BuildRuleFullDescription(issue testapi.Issue) string
- func BuildRuleShortDescription(issue testapi.Issue) string
- func BuildRuleTags(issue testapi.Issue) []interface{}
- func ConvertTypeToDriverName(s string) string
- func CreateCodeSummary(input *sarif.SarifDocument, projectPath string) *json_schemas.TestSummary
- func FormatIssueMessage(issue testapi.Issue) string
- func GetHighestSuppression(suppressions []sarif.Suppression) (*sarif.Suppression, sarif.SuppresionStatus)
- func GetRuleCVSSScore(issue testapi.Issue) float32
- func IsHighestSuppressionStatus(suppressions []sarif.Suppression, status sarif.SuppresionStatus) bool
- func SarifLevelToSeverity(level string) string
- func SeverityToSarifLevel(severity string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFixFromIssue ¶
BuildFixFromIssue builds SARIF fix from an issue (nil if the issue is not fixable)
func BuildHelpMarkdown ¶
func BuildHelpMarkdown(issue testapi.Issue, findingType testapi.FindingType) string
BuildHelpMarkdown constructs the help markdown section for SARIF rules
func BuildLocation ¶
BuildLocation constructs a SARIF location object from issue data
func BuildRuleFullDescription ¶
BuildRuleFullDescription creates the full description for a SARIF rule
func BuildRuleShortDescription ¶
BuildRuleShortDescription creates the short description for a SARIF rule
func BuildRuleTags ¶
BuildRuleTags creates the tags array for a SARIF rule
func ConvertTypeToDriverName ¶
func CreateCodeSummary ¶
func CreateCodeSummary(input *sarif.SarifDocument, projectPath string) *json_schemas.TestSummary
CreateCodeSummary Iterates through the sarif data and create a summary out of it.
func FormatIssueMessage ¶
FormatIssueMessage creates the SARIF message text for an issue
func GetHighestSuppression ¶
func GetHighestSuppression(suppressions []sarif.Suppression) (*sarif.Suppression, sarif.SuppresionStatus)
GetHighestSuppression returns the suppression details if any and its status. It prioritizes suppressions based on their status: Accepted > UnderReview > Rejected. If multiple suppressions exist, the one with the highest precedence is returned. An empty Status is treated as Accepted. If no suppressions are found, returns nil.
func GetRuleCVSSScore ¶
GetRuleCVSSScore extracts the CVSS score from issue metadata
func IsHighestSuppressionStatus ¶
func IsHighestSuppressionStatus(suppressions []sarif.Suppression, status sarif.SuppresionStatus) bool
IsHighestSuppressionStatus returns true if the suppression with the provided status exists and has the highest precedence.
func SarifLevelToSeverity ¶
Convert Sarif Level to internal Severity
func SeverityToSarifLevel ¶
Types ¶
This section is empty.