sarifutils

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateMultipleRunsIntoSingle

func AggregateMultipleRunsIntoSingle(runs []*sarif.Run, destination *sarif.Run)

func ConvertSarifReportToString

func ConvertSarifReportToString(report *sarif.Report) (sarifStr string, err error)

func CreateCodeFlow

func CreateCodeFlow(threadFlows ...*sarif.ThreadFlow) *sarif.CodeFlow

func CreateDummyPassingResult

func CreateDummyPassingResult(ruleId string) *sarif.Result

func CreateLocation

func CreateLocation(fileName string, startLine, startCol, endLine, endCol int, snippet string) *sarif.Location

func CreateResultWithLocations

func CreateResultWithLocations(msg, ruleId, level string, locations ...*sarif.Location) *sarif.Result

func CreateResultWithOneLocation

func CreateResultWithOneLocation(fileName string, startLine, startCol, endLine, endCol int, snippet, ruleId, level string) *sarif.Result

func CreateRunWithDummyResultAndRuleProperties

func CreateRunWithDummyResultAndRuleProperties(property, value string, result *sarif.Result) *sarif.Run

func CreateRunWithDummyResults

func CreateRunWithDummyResults(results ...*sarif.Result) *sarif.Run

func CreateThreadFlow

func CreateThreadFlow(locations ...*sarif.Location) *sarif.ThreadFlow

func ExtractRelativePath

func ExtractRelativePath(resultPath string, projectRoot string) string

func GetFullLocationFileName

func GetFullLocationFileName(relative string, invocations []*sarif.Invocation) string

func GetInvocationWorkingDirectory

func GetInvocationWorkingDirectory(invocation *sarif.Invocation) string

func GetLocationEndColumn

func GetLocationEndColumn(location *sarif.Location) int

func GetLocationEndLine

func GetLocationEndLine(location *sarif.Location) int

func GetLocationFileName

func GetLocationFileName(location *sarif.Location) string

func GetLocationId

func GetLocationId(location *sarif.Location) string

func GetLocationRelatedCodeFlowsFromResult

func GetLocationRelatedCodeFlowsFromResult(location *sarif.Location, result *sarif.Result) (codeFlows []*sarif.CodeFlow)

func GetLocationSnippet

func GetLocationSnippet(location *sarif.Location) string

func GetLocationStartColumn

func GetLocationStartColumn(location *sarif.Location) int

func GetLocationStartLine

func GetLocationStartLine(location *sarif.Location) int

func GetRelativeLocationFileName

func GetRelativeLocationFileName(location *sarif.Location, invocations []*sarif.Invocation) string

func GetResultLevel

func GetResultLevel(result *sarif.Result) string

func GetResultMsgText

func GetResultMsgText(result *sarif.Result) string

func GetResultsLocationCount

func GetResultsLocationCount(runs ...*sarif.Run) (count int)

func GetRuleFullDescription

func GetRuleFullDescription(rule *sarif.ReportingDescriptor) string

func GetRulesPropertyCount

func GetRulesPropertyCount(property, value string, runs ...*sarif.Run) (count int)

func GetRunRules

func GetRunRules(run *sarif.Run) []*sarif.ReportingDescriptor

func GetRunsByWorkingDirectory

func GetRunsByWorkingDirectory(workingDirectory string, runs ...*sarif.Run) (filteredRuns []*sarif.Run)

func IsResultKindNotPass

func IsResultKindNotPass(result *sarif.Result) bool

func NewReport

func NewReport() (*sarif.Report, error)

func ReadScanRunsFromFile

func ReadScanRunsFromFile(fileName string) (sarifRuns []*sarif.Run, err error)

func SetLocationFileName

func SetLocationFileName(location *sarif.Location, fileName string)

func SetLocationSnippet

func SetLocationSnippet(location *sarif.Location, snippet string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL