sarif

package
v0.59.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelError   = "error"
	LevelWarning = "warning"
	LevelNote    = "note"
	LevelNone    = "none"
)

Variables

This section is empty.

Functions

func FromSmithyEnrichedIssuesRun

func FromSmithyEnrichedIssuesRun(responses []*v1.EnrichedLaunchToolResponse, reportDuplicates bool) (*sarif.Report, error)

FromSmithyEnrichedIssuesRun transforms a set of LaunchToolResponse to ONE sarif document with one run per launch tool response, by default it skips duplicates unless reportDuplicates is set to true.

func FromSmithyRawIssuesRun

func FromSmithyRawIssuesRun(responses []*v1.LaunchToolResponse) (*sarif.Report, error)

FromSmithyRawIssuesRun accepts a set of Smithy LaunchToolResponses and transforms them to a Sarif file.

Types

type ExtraContextLanguage added in v0.58.0

type ExtraContextLanguage string
const (
	ExtraContextLanguageUnspecified ExtraContextLanguage = "unspecified"
	ExtraContextLanguagePython      ExtraContextLanguage = "python"
	ExtraContextLanguageJS          ExtraContextLanguage = "javascript"
)

type SmithyIssueCollection

type SmithyIssueCollection struct {
	ToolName string
	Issues   []*v1.Issue
}

SmithyIssueCollection represents all the findings in a single Sarif file converted to smithy format.

func ToSmithy

func ToSmithy(inFile string, language ExtraContextLanguage) ([]*SmithyIssueCollection, error)

ToSmithy accepts a sarif file and transforms each run to SmithyIssueCollection ready to be written to a results file.

Jump to

Keyboard shortcuts

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