Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultLanguage = "en-US"
View Source
const Schema = "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json"
View Source
const Version = "2.1.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactLocation ¶
type Location ¶
type Location struct { ID int `json:"id,omitempty"` PhysicalLocation *PhysicalLocation `json:"physicalLocation,omitempty"` // This might be something that is not necessary for the current version of the tool. // LogicalLocation LogicalLocation `json:"logicalLocation,omitempty"` Message *Message `json:"message,omitempty"` Annotations []Region `json:"annotations,omitempty"` }
type Log ¶
type LogicalLocation ¶
type LogicalLocation struct { Index int `json:"index,omitempty"` Name string `json:"name"` Kind LogicationLocationKind `json:"kind,omitempty"` DecoratedName string `json:"decoratedName,omitempty"` FullyQualifiedName string `json:"fullyQualifiedName,omitempty"` ParentIndex int `json:"parentIndex,omitempty"` }
LogicalLocation object represents a logical location such as a function, a class, or a module.
type LogicationLocationKind ¶
type LogicationLocationKind string
const ( LogicalLocationKingFunction LogicationLocationKind = "function" LogicalLocationKingMember LogicationLocationKind = "member" LogicalLocationKingModule LogicationLocationKind = "module" LogicalLocationKingNamespace LogicationLocationKind = "namespace" LogicalLocationKingResource LogicationLocationKind = "resource" LogicalLocationKingType LogicationLocationKind = "type" LogicalLocationKingReturnType LogicationLocationKind = "returnType" LogicalLocationKingParameter LogicationLocationKind = "parameter" LogicalLocationKingVariable LogicationLocationKind = "variable" )
type PhysicalLocation ¶
type PhysicalLocation struct { ArtifactLocation *ArtifactLocation `json:"artifactLocation,omitempty"` Region *Region `json:"region,omitempty"` ContextRegion *Region `json:"contextRegion,omitempty"` }
type RDProperties ¶ added in v0.0.2
type RDProperties struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Kind string `json:"kind,omitempty"` Precision string `json:"precision,omitempty"` Tags []string `json:"tags,omitempty"` Problem string `json:"problem.severity,omitempty"` }
type ReportingDescriptor ¶ added in v0.0.2
type ReportingDescriptor struct { ID string `json:"id"` Name string `json:"name,omitempty"` HelpURI string `json:"helpUri,omitempty"` ShortDescription *MultiFormatMessageString `json:"shortDescription,omitempty"` FullDescription *MultiFormatMessageString `json:"fullDescription,omitempty"` Help *MultiFormatMessageString `json:"help,omitempty"` // propertyBag that makes sense for this tool. Properties *RDProperties `json:"properties,omitempty"` }
type Result ¶
type Result struct { Message *Message `json:"message"` RuleID string `json:"ruleId,omitempty"` RuleIndex int `json:"ruleIndex,omitempty"` // default -1 & minimum -1 Rule *ReportingDescriptor `json:"rule,omitempty"` Level Level `json:"level,omitempty"` Locations []Location `json:"locations,omitempty"` }
type Snippet ¶
type Snippet struct {
Text string `json:"text,omitempty"`
}
Snippet object represents a portion of the artifact that is relevant to the result. It is not necessarily an object defined in the SARIF specification.
type Tool ¶
type Tool struct {
Driver ToolComponent `json:"driver"`
}
type ToolComponent ¶
type ToolComponent struct { Name string `json:"name"` GUID string `json:"guid,omitempty"` SemanitcVersion string `json:"semanticVersion,omitempty"` Language string `json:"language,omitempty"` ShortDescription *MultiFormatMessageString `json:"shortDescription,omitempty"` FullDescription *MultiFormatMessageString `json:"fullDescription,omitempty"` InformationURI string `json:"informationUri,omitempty"` Rules []ReportingDescriptor `json:"rules,omitempty"` }
Click to show internal directories.
Click to hide internal directories.