Documentation ¶
Index ¶
- type Artifact
- type ArtifactLocation
- type AutomationDetails
- type CodeFlow
- type ContextRegion
- type DefaultConfiguration
- type DefaultProperties
- type Descriptor
- type Driver
- type Help
- type InvocationProperties
- type Invocations
- type Location
- type Locations
- type LogicalLocation
- type Message
- type OriginalUriBaseIds
- type PhysicalLocation
- type Region
- type RelatedLocation
- type RelatedPhysicalLocation
- type RelatedRegion
- type Relationships
- type Results
- type Runs
- type SARIF
- type SarifLocation
- type SarifProperties
- type SarifRule
- type SarifRuleProperties
- type SnippetSarif
- type SrcRoot
- type SupportedTaxonomies
- type Target
- type Taxa
- type Taxonomies
- type ThreadFlow
- type Tool
- type ToolComponent
- type ToolExecutionNotifications
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶ added in v1.203.0
type Artifact struct { Location SarifLocation `json:"location"` Length int `json:"length"` MimeType string `json:"mimeType"` Encoding string `json:"encoding"` }
Artifact These structs are relevant to the artifacts object
type ArtifactLocation ¶
ArtifactLocation describing the path of the artifact
type AutomationDetails ¶ added in v1.203.0
type AutomationDetails struct {
Id string `json:"id"`
}
AutomationDetails These structs are relevant to the automationDetails object
type CodeFlow ¶ added in v1.203.0
type CodeFlow struct {
ThreadFlows []ThreadFlow `json:"threadFlows"`
}
CodeFlow
type ContextRegion ¶ added in v1.203.0
type ContextRegion struct { StartLine int `json:"startLine"` EndLine int `json:"endLine"` Snippet SnippetSarif `json:"snippet"` }
ContextRegion provides the context for the finding
type DefaultConfiguration ¶
type DefaultConfiguration struct { Properties DefaultProperties `json:"properties,omitempty"` Level string `json:"level,omitempty"` //This exists in the template, but not sure how it is populated. TODO. }
DefaultConfiguration
type DefaultProperties ¶
type DefaultProperties struct {
DefaultSeverity string `json:"DefaultSeverity,omitempty"`
}
DefaultProperties
type Driver ¶
type Driver struct { Name string `json:"name"` Version string `json:"version"` InformationUri string `json:"informationUri,omitempty"` Rules []SarifRule `json:"rules"` SupportedTaxonomies []SupportedTaxonomies `json:"supportedTaxonomies,omitempty"` }
Driver meta information for the scan and tool context
type Help ¶
type Help struct { Text string `json:"text,omitempty"` Markdown string `json:"markdown,omitempty"` }
Help provides additional guidance to resolve the finding
type InvocationProperties ¶ added in v1.203.0
type InvocationProperties struct {
Platform string `json:"Platform"`
}
InvocationProperties
type Invocations ¶ added in v1.203.0
type Invocations struct { CommandLine string `json:"commandLine"` StartTimeUtc string `json:"startTimeUtc"` ToolExecutionNotifications []ToolExecutionNotifications `json:"toolExecutionNotifications"` ExecutionSuccessful bool `json:"executionSuccessful"` Machine string `json:"machine"` Account string `json:"account"` Properties InvocationProperties `json:"properties"` }
Invocations These structs are relevant to the Invocations object
type Location ¶
type Location struct { PhysicalLocation PhysicalLocation `json:"physicalLocation"` Message *Message `json:"message,omitempty"` }
Location of the finding
type Locations ¶ added in v1.203.0
type Locations struct { Location *Location `json:"location,omitempty"` Kinds []string `json:"kinds,omitempty"` Index int `json:"index,omitempty"` }
Locations
type LogicalLocation ¶
type LogicalLocation struct {
FullyQualifiedName string `json:"fullyQualifiedName"`
}
LogicalLocation of the finding
type Message ¶
type Message struct {
Text string `json:"text,omitempty"`
}
Message to detail the finding
type OriginalUriBaseIds ¶ added in v1.203.0
type OriginalUriBaseIds struct {
SrcRoot SrcRoot `json:"%SRCROOT%"`
}
OriginalUriBaseIds These structs are relevant to the originalUriBaseIds object
type PhysicalLocation ¶ added in v1.203.0
type PhysicalLocation struct { ArtifactLocation ArtifactLocation `json:"artifactLocation"` Region Region `json:"region"` ContextRegion ContextRegion `json:"contextRegion"` LogicalLocations []LogicalLocation `json:"logicalLocations,omitempty"` }
PhysicalLocation
type Region ¶
type Region struct { StartLine int `json:"startLine,omitempty"` StartColumn int `json:"startColumn,omitempty"` EndLine int `json:"EndLine,omitempty"` EndColumn int `json:"EndColumn,omitempty"` ByteOffset int `json:"ByteOffset,omitempty"` ByteLength int `json:"ByteLength,omitempty"` Snippet SnippetSarif `json:"snippet"` }
Region where the finding was detected
type RelatedLocation ¶ added in v1.203.0
type RelatedLocation struct { ID int `json:"id"` PhysicalLocation RelatedPhysicalLocation `json:"physicalLocation"` }
RelatedLocation
type RelatedPhysicalLocation ¶ added in v1.203.0
type RelatedPhysicalLocation struct { ArtifactLocation ArtifactLocation `json:"artifactLocation"` Region RelatedRegion `json:"region"` }
RelatedPhysicalLocation
type RelatedRegion ¶ added in v1.203.0
type RelatedRegion struct { StartLine int `json:"startLine"` StartColumn int `json:"startColumn,omitempty"` }
RelatedRegion
type Relationships ¶
Relationships
type Results ¶
type Results struct { RuleID string `json:"ruleId"` RuleIndex int `json:"ruleIndex"` Level string `json:"level,omitempty"` Message *Message `json:"message,omitempty"` AnalysisTarget *ArtifactLocation `json:"analysisTarget,omitempty"` Locations []Location `json:"locations,omitempty"` CodeFlows []CodeFlow `json:"codeFlows,omitempty"` RelatedLocations []RelatedLocation `json:"relatedLocations,omitempty"` Properties SarifProperties `json:"properties"` }
Results these structs are relevant to the Results object
type Runs ¶
type Runs struct { Results []Results `json:"results"` Tool Tool `json:"tool"` Invocations []Invocations `json:"invocations,omitempty"` OriginalUriBaseIds *OriginalUriBaseIds `json:"originalUriBaseIds,omitempty"` Artifacts []Artifact `json:"artifacts,omitempty"` AutomationDetails AutomationDetails `json:"automationDetails,omitempty"` ColumnKind string `json:"columnKind,omitempty" default:"utf16CodeUnits"` ThreadFlowLocations []Locations `json:"threadFlowLocations,omitempty"` Taxonomies []Taxonomies `json:"taxonomies,omitempty"` }
Runs of a Tool and related Results
type SARIF ¶
type SARIF struct { Schema string `json:"$schema" default:"https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos01/schemas/sarif-schema-2.1.0.json"` Version string `json:"version" default:"2.1.0"` Runs []Runs `json:"runs"` }
SARIF format related JSON structs
type SarifLocation ¶ added in v1.203.0
SarifLocation
type SarifProperties ¶
type SarifProperties struct { InstanceID string `json:"InstanceID,omitempty"` InstanceSeverity string `json:"InstanceSeverity,omitempty"` Confidence string `json:"Confidence,omitempty"` FortifyCategory string `json:"FortifyCategory,omitempty"` Audited bool `json:"Audited"` ToolSeverity string `json:"ToolSeverity"` ToolSeverityIndex int `json:"ToolSeverityIndex"` ToolState string `json:"ToolState"` ToolStateIndex int `json:"ToolStateIndex"` ToolAuditMessage string `json:"ToolAuditMessage"` UnifiedAuditState string `json:"UnifiedAuditState"` }
SarifProperties adding additional information/context to the finding
type SarifRule ¶
type SarifRule struct { ID string `json:"id"` GUID string `json:"guid,omitempty"` Name string `json:"name,omitempty"` ShortDescription *Message `json:"shortDescription,omitempty"` FullDescription *Message `json:"fullDescription,omitempty"` DefaultConfiguration *DefaultConfiguration `json:"defaultConfiguration,omitempty"` HelpURI string `json:"helpUri,omitempty"` Help *Help `json:"help,omitempty"` Relationships []Relationships `json:"relationships,omitempty"` Properties *SarifRuleProperties `json:"properties,omitempty"` }
SarifRule related rule use to identify the finding
type SarifRuleProperties ¶
type SarifRuleProperties struct { Accuracy string `json:"Accuracy,omitempty"` Impact string `json:"Impact,omitempty"` Probability string `json:"Probability,omitempty"` Tags []string `json:"tags,omitempty"` Precision string `json:"precision,omitempty"` }
SarifRuleProperties
type SnippetSarif ¶ added in v1.203.0
type SnippetSarif struct {
Text string `json:"text"`
}
SnippetSarif holds the code snippet where the finding appears
type SupportedTaxonomies ¶
type SupportedTaxonomies struct { Name string `json:"name"` Index int `json:"index"` Guid string `json:"guid"` }
SupportedTaxonomies
type Target ¶
type Target struct { Id string `json:"id"` ToolComponent ToolComponent `json:"toolComponent"` }
Target
type Taxonomies ¶ added in v1.203.0
type Taxonomies struct { Guid string `json:"guid"` Name string `json:"name"` Organization string `json:"organization"` ShortDescription Message `json:"shortDescription"` Taxa []Taxa `json:"taxa"` }
Taxonomies These structs are relevant to the taxonomies object
type ThreadFlow ¶ added in v1.203.0
type ThreadFlow struct {
Locations []Locations `json:"locations"`
}
ThreadFlow
type Tool ¶
type Tool struct {
Driver Driver `json:"driver"`
}
Tool these structs are relevant to the Tool object
type ToolComponent ¶
ToolComponent
type ToolExecutionNotifications ¶ added in v1.203.0
type ToolExecutionNotifications struct { Message Message `json:"message"` Descriptor Descriptor `json:"descriptor"` }
ToolExecutionNotifications