Documentation ¶
Index ¶
- type ArtifactLocation
- type Category
- type CodeFlow
- type DefaultConfiguration
- type Driver
- type ExampleCommitFix
- type Fingerprints
- type Help
- type IgnoredBy
- type Location
- type PhysicalLocation
- type Region
- type Result
- type ResultMessage
- type ResultProperties
- type Rule
- type RuleProperties
- type Run
- type RunProperties
- type SarifCoverage
- type SarifDocument
- type SarifResponse
- type ShortDescription
- type SnykPolicyV1
- type Suppression
- type SuppressionProperties
- type ThreadFlow
- type ThreadFlowLocation
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactLocation ¶
type CodeFlow ¶
type CodeFlow struct {
ThreadFlows []ThreadFlow `json:"threadFlows"`
}
type DefaultConfiguration ¶
type DefaultConfiguration struct {
Level string `json:"level"`
}
type ExampleCommitFix ¶
type Fingerprints ¶
type Location ¶
type Location struct { ID int `json:"id"` PhysicalLocation PhysicalLocation `json:"physicalLocation"` }
type PhysicalLocation ¶
type PhysicalLocation struct { ArtifactLocation ArtifactLocation `json:"artifactLocation"` Region Region `json:"region"` }
type Result ¶
type Result struct { RuleID string `json:"ruleId"` RuleIndex int `json:"ruleIndex"` Level string `json:"level"` Message ResultMessage `json:"message"` Locations []Location `json:"locations"` Fingerprints Fingerprints `json:"fingerprints"` CodeFlows []CodeFlow `json:"codeFlows"` Properties ResultProperties `json:"properties"` Suppressions []Suppression `json:"suppressions"` }
type ResultMessage ¶
type ResultProperties ¶
type ResultProperties struct { PriorityScore int `json:"priorityScore"` PriorityScoreFactors []struct { Label bool `json:"label"` Type string `json:"type"` } `json:"priorityScoreFactors"` IsAutofixable bool `json:"isAutofixable"` Policy *SnykPolicyV1 `json:"snykPolicy/v1,omitempty"` }
type Rule ¶
type Rule struct { ID string `json:"id"` Name string `json:"name"` ShortDescription ShortDescription `json:"shortDescription"` DefaultConfiguration DefaultConfiguration `json:"defaultConfiguration"` Help Help `json:"help"` Properties RuleProperties `json:"properties"` }
type RuleProperties ¶
type RuleProperties struct { Tags []string `json:"tags"` Categories []string `json:"categories"` ExampleCommitFixes []ExampleCommitFix `json:"exampleCommitFixes"` ExampleCommitDescriptions []string `json:"exampleCommitDescriptions"` Precision string `json:"precision"` RepoDatasetSize int `json:"repoDatasetSize"` Cwe []string `json:"cwe"` }
type Run ¶
type Run struct { Tool Tool `json:"tool"` Results []Result `json:"results"` Properties RunProperties `json:"properties"` }
type RunProperties ¶
type SarifCoverage ¶ added in v1.6.1
type SarifDocument ¶ added in v1.4.1
type SarifDocument struct { Schema string `json:"$schema"` Version string `json:"version"` Runs []Run `json:"runs"` }
SarifDocument matches the spec in https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/schemas/sarif-schema-2.1.0.json
type SarifResponse ¶
type SarifResponse struct { Type string `json:"type"` Progress float64 `json:"progress"` Status string `json:"status"` Timing struct { FetchingCode int `json:"fetchingCode"` Queue int `json:"queue"` Analysis int `json:"analysis"` } `json:"timing"` Coverage []SarifCoverage `json:"coverage"` Sarif SarifDocument `json:"sarif"` }
type ShortDescription ¶
type ShortDescription struct {
Text string `json:"text"`
}
type SnykPolicyV1 ¶ added in v1.11.1
type Suppression ¶
type Suppression struct { Justification string `json:"justification"` Properties SuppressionProperties `json:"properties"` }
type SuppressionProperties ¶
type SuppressionProperties struct { Category Category `json:"category"` Expiration *string `json:"expiration"` IgnoredOn string `json:"ignoredOn"` // https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/sarif-v2.1.0-errata01-os-complete.html#_Toc141790703 IgnoredBy IgnoredBy `json:"ignoredBy"` }
type ThreadFlow ¶
type ThreadFlow struct {
Locations []ThreadFlowLocation `json:"locations"`
}
type ThreadFlowLocation ¶
type ThreadFlowLocation struct {
Location Location `json:"location"`
}
Click to show internal directories.
Click to hide internal directories.