sarif

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(path string, report Report) error

Write persists a SARIF report at path.

Types

type ArtifactLocation

type ArtifactLocation struct {
	URI string `json:"uri"`
}

type Driver

type Driver struct {
	Name           string `json:"name"`
	Version        string `json:"version,omitempty"`
	InformationURI string `json:"informationUri,omitempty"`
	Rules          []Rule `json:"rules,omitempty"`
}

type Location

type Location struct {
	PhysicalLocation PhysicalLocation `json:"physicalLocation"`
}

type Message

type Message struct {
	Text string `json:"text"`
}

type PhysicalLocation

type PhysicalLocation struct {
	ArtifactLocation ArtifactLocation `json:"artifactLocation"`
}

type Report

type Report struct {
	Schema  string `json:"$schema"`
	Version string `json:"version"`
	Runs    []Run  `json:"runs"`
}

func Build

func Build(findings []model.Finding, wrkrVersion string) Report

Build maps Wrkr findings to a deterministic SARIF report.

type Result

type Result struct {
	RuleID    string     `json:"ruleId,omitempty"`
	Level     string     `json:"level,omitempty"`
	Message   Message    `json:"message"`
	Locations []Location `json:"locations,omitempty"`
}

type Rule

type Rule struct {
	ID               string  `json:"id"`
	ShortDescription Message `json:"shortDescription,omitempty"`
}

type Run

type Run struct {
	Tool    Tool     `json:"tool"`
	Results []Result `json:"results,omitempty"`
}

type Tool

type Tool struct {
	Driver Driver `json:"driver"`
}

Jump to

Keyboard shortcuts

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