Documentation ¶
Index ¶
- Constants
- type ArtifactLocation
- type CsvReporter
- type Driver
- type Failure
- type Finding
- type FullDescription
- type JsonReporter
- type JunitReporter
- type Locations
- type Message
- type PartialFingerPrints
- type PhysicalLocation
- type Properties
- type Region
- type Reporter
- type Results
- type Rules
- type Runs
- type Sarif
- type SarifReporter
- type ShortDescription
- type Snippet
- type TemplateReporter
- type TestCase
- type TestSuite
- type TestSuites
- type Tool
Constants ¶
View Source
const ( // https://cwe.mitre.org/data/definitions/798.html CWE = "CWE-798" CWE_DESCRIPTION = "Use of Hard-coded Credentials" StdoutReportPath = "-" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactLocation ¶
type ArtifactLocation struct {
URI string `json:"uri"`
}
type CsvReporter ¶ added in v8.21.3
type CsvReporter struct { }
func (*CsvReporter) Write ¶ added in v8.21.3
func (r *CsvReporter) Write(w io.WriteCloser, findings []Finding) error
type Finding ¶
type Finding struct { Description string StartLine int EndLine int StartColumn int EndColumn int Line string `json:"-"` Match string // Secret contains the full content of what is matched in // the tree-sitter query. Secret string // File is the name of the file containing the finding File string SymlinkFile string Commit string // Entropy is the shannon entropy of Value Entropy float32 Author string Email string Date string Message string Tags []string // Rule is the name of the rule that was matched RuleID string // unique identifier Fingerprint string }
Finding contains information about strings that have been captured by a tree-sitter query.
type FullDescription ¶
type FullDescription struct {
Text string `json:"text"`
}
type JsonReporter ¶ added in v8.21.3
type JsonReporter struct { }
func (*JsonReporter) Write ¶ added in v8.21.3
func (t *JsonReporter) Write(w io.WriteCloser, findings []Finding) error
type JunitReporter ¶ added in v8.21.3
type JunitReporter struct { }
func (*JunitReporter) Write ¶ added in v8.21.3
func (r *JunitReporter) Write(w io.WriteCloser, findings []Finding) error
type Locations ¶
type Locations struct {
PhysicalLocation PhysicalLocation `json:"physicalLocation"`
}
type PartialFingerPrints ¶
type PhysicalLocation ¶
type PhysicalLocation struct { ArtifactLocation ArtifactLocation `json:"artifactLocation"` Region Region `json:"region"` }
type Properties ¶ added in v8.17.0
type Properties struct {
Tags []string `json:"tags"`
}
type Reporter ¶ added in v8.21.3
type Reporter interface {
Write(w io.WriteCloser, findings []Finding) error
}
type Results ¶
type Results struct { Message Message `json:"message"` RuleId string `json:"ruleId"` Locations []Locations `json:"locations"` PartialFingerPrints `json:"partialFingerprints"` Properties Properties `json:"properties"` }
type Rules ¶
type Rules struct { ID string `json:"id"` Description ShortDescription `json:"shortDescription"` }
type SarifReporter ¶ added in v8.21.3
func (*SarifReporter) Write ¶ added in v8.21.3
func (r *SarifReporter) Write(w io.WriteCloser, findings []Finding) error
type ShortDescription ¶
type ShortDescription struct {
Text string `json:"text"`
}
type TemplateReporter ¶ added in v8.21.3
type TemplateReporter struct {
// contains filtered or unexported fields
}
func NewTemplateReporter ¶ added in v8.21.3
func NewTemplateReporter(templatePath string) (*TemplateReporter, error)
func (*TemplateReporter) Write ¶ added in v8.21.3
func (t *TemplateReporter) Write(w io.WriteCloser, findings []Finding) error
writeTemplate renders the findings using the user-provided template. https://www.digitalocean.com/community/tutorials/how-to-use-templates-in-go
type TestSuites ¶ added in v8.17.0
Click to show internal directories.
Click to hide internal directories.