sarif

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactLocation

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

type Level

type Level string
const (
	LevelError   Level = "error"
	LevelWarning Level = "warning"
	LevelNote    Level = "note"
)

type Location

type Location struct {
	PhysicalLocation *PhysicalLocation `json:"physicalLocation,omitempty"`
	Message          *Message          `json:"message,omitempty"`
}

type Log

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

type Message

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

type MultiformatMessageString

type MultiformatMessageString struct {
	Text     *string `json:"text"`
	Markdown *string `json:"markdown,omitempty"`
}

type PhysicalLocation

type PhysicalLocation struct {
	ArtifactLocation *ArtifactLocation `json:"artifactLocation,omitempty"`
}

type PropertyBag

type PropertyBag map[string]interface{}

type ReportingDescriptor

type ReportingDescriptor struct {
	ID               string                    `json:"id"` // Required
	Name             *string                   `json:"name,omitempty"`
	ShortDescription *MultiformatMessageString `json:"shortDescription,omitempty"`
	FullDescription  *MultiformatMessageString `json:"fullDescription,omitempty"`
	Help             *MultiformatMessageString `json:"help,omitempty"`
	Properties       *PropertyBag              `json:"properties,omitempty"`
}

type Result

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

type Run

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

type Tool

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

type ToolComponent

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

ToolComponent describes the tool that produced the results. Pointers are used for optional bits.

Jump to

Keyboard shortcuts

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