Documentation ¶
Index ¶
Constants ¶
View Source
const ( KindTerraform FileKind = "TF" KindJSON FileKind = "JSON" KindYAML FileKind = "YAML" SeverityHigh = "HIGH" SeverityMedium = "MEDIUM" SeverityLow = "LOW" SeverityInfo = "INFO" IssueTypeMissingAttribute IssueType = "MissingAttribute" IssueTypeRedundantAttribute IssueType = "RedundantAttribute" IssueTypeIncorrectValue IssueType = "IncorrectValue" )
Variables ¶
View Source
var ( AllSeverities = []Severity{ SeverityHigh, SeverityMedium, SeverityLow, SeverityInfo, } AllIssueTypesAsString = []string{ string(IssueTypeMissingAttribute), string(IssueTypeRedundantAttribute), string(IssueTypeIncorrectValue), } )
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document map[string]interface{}
func (Document) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Document) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Document) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Document) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Documents ¶
type Documents struct {
Documents []Document `json:"document"`
}
func (Documents) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Documents) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Documents) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Documents) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Extensions ¶
type Extensions map[string]struct{}
func (Extensions) Include ¶
func (e Extensions) Include(ext string) bool
func (Extensions) MatchedFilesRegex ¶
func (e Extensions) MatchedFilesRegex() string
type FileMetadata ¶
type FileMetadatas ¶
type FileMetadatas []FileMetadata
func (FileMetadatas) Combine ¶
func (m FileMetadatas) Combine() Documents
func (FileMetadatas) ToMap ¶
func (m FileMetadatas) ToMap() map[string]FileMetadata
type QueryMetadata ¶
type SeverityCounter ¶
type SeveritySummary ¶
type SeveritySummary struct { ScanID string `json:"scanId"` SeverityCounters []SeverityCounter `json:"severityCounters"` TotalCounter int `json:"totalCounter"` }
type Summary ¶
type Summary struct { Counters Queries []VulnerableQuery `json:"queries"` }
func CreateSummary ¶
func CreateSummary(counters Counters, vulnerabilities []Vulnerability) Summary
type Vulnerability ¶
type Vulnerability struct { ID int `json:"id"` ScanID string `db:"scan_id" json:"-"` FileID string `db:"file_id" json:"-"` FileName string `db:"file_name" json:"fileName"` QueryID string `db:"query_id" json:"queryID"` QueryName string `db:"query_name" json:"queryName"` Severity Severity `json:"severity"` Line int `json:"line"` IssueType IssueType `db:"issue_type" json:"issueType"` SearchKey string `db:"search_key" json:"searchKey"` KeyExpectedValue string `db:"key_expected_value" json:"expectedValue"` KeyActualValue string `db:"key_actual_value" json:"actualValue"` Value *string `db:"value" json:"value"` Output string `json:"-"` }
type VulnerableFile ¶
type VulnerableQuery ¶
type VulnerableQuery struct { QueryName string `json:"query_name"` QueryID string `json:"query_id"` Severity Severity `json:"severity"` Files []VulnerableFile `json:"files"` }
Click to show internal directories.
Click to hide internal directories.