sarif

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(r *report.Report) ([]byte, error)

Render builds SARIF JSON for the report findings.

Types

type Document

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

Document is a minimal SARIF 2.1.0 document for findings.

type Driver

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

Driver is the tool driver metadata.

type Message

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

Message is SARIF text.

type Result

type Result struct {
	RuleID  string  `json:"ruleId"`
	Level   string  `json:"level"`
	Message Message `json:"message"`
}

Result is one finding.

type Rule

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

Rule is a SARIF reporting descriptor.

type Run

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

Run is one SARIF run.

type Tool

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

Tool describes cpulse.

Jump to

Keyboard shortcuts

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