sarif

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPropertyTag

func AddPropertyTag(properties sarif.Properties, tagName, tagValue string) sarif.Properties

func GenerateSarifReport

func GenerateSarifReport(sarifInformation *SarifReportInformation) (*sarif.Report, error)

func WriteSarifContentAtomic added in v0.0.19

func WriteSarifContentAtomic(sarifReport *sarif.Report, output string) error

WriteSarifContentAtomic writes the report to a temp file in the same directory as output and atomically renames it into place, so a reader (or a kill mid-write) never observes a partially written file.

Types

type SarifReportInformation

type SarifReportInformation struct {
	Violations    []model.Violation
	InputTokens   int32
	OutputTokens  int32
	FilesAnalyzed []string
	FileResults   []model.FileResult
	Rules         []api.AiPrompt
}

func GenerateSarifInformation

func GenerateSarifInformation(opts *model.AnalysisOptions, filesResults []model.FileResult) SarifReportInformation

Generate the information to process the SARIF file. Also, make sure that we filter the files analyzed in case the datadog driver is present.

Jump to

Keyboard shortcuts

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