Documentation ¶
Index ¶
- type CheckFunc
- type Code
- type CodeOption
- type CustomChecks
- type EngineMetadata
- type FlatRange
- type FlatResult
- type Line
- type MetadataProvider
- type Occurrence
- type Result
- func (r *Result) AbsolutePath(fsRoot string, metadata defsecTypes.Metadata) string
- func (r Result) Annotation() string
- func (r Result) Description() string
- func (r *Result) Flatten() FlatResult
- func (r *Result) GetCode(opts ...CodeOption) (*Code, error)
- func (r *Result) IsWarning() bool
- func (r Result) Metadata() defsecTypes.Metadata
- func (r *Result) Occurrences() []Occurrence
- func (r *Result) OverrideAnnotation(annotation string)
- func (r *Result) OverrideDescription(description string)
- func (r *Result) OverrideMetadata(metadata defsecTypes.Metadata)
- func (r *Result) OverrideSeverity(s severity.Severity)
- func (r *Result) OverrideStatus(status Status)
- func (r Result) Range() defsecTypes.Range
- func (r Result) RegoNamespace() string
- func (r Result) RegoRule() string
- func (r *Result) RelativePathTo(fsRoot, to string, metadata defsecTypes.Metadata) string
- func (r Result) Rule() Rule
- func (r *Result) SetRule(ru Rule)
- func (r Result) Severity() severity.Severity
- func (r Result) Status() Status
- func (r Result) Traces() []string
- type Results
- func (r *Results) Add(description string, source interface{})
- func (r *Results) AddIgnored(source interface{}, descriptions ...string)
- func (r *Results) AddPassed(source interface{}, descriptions ...string)
- func (r *Results) AddPassedRego(namespace string, rule string, traces []string, source interface{})
- func (r *Results) AddRego(description string, namespace string, rule string, traces []string, ...)
- func (r Results) Flatten() []FlatResult
- func (r *Results) GetFailed() Results
- func (r *Results) GetIgnored() Results
- func (r *Results) GetPassed() Results
- func (r *Results) SetRule(rule Rule)
- func (r *Results) SetSourceAndFilesystem(source string, f fs.FS, logicalSource bool)
- type Rule
- type Status
- type TerraformCustomCheck
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶ added in v0.51.0
type Code struct {
Lines []Line
}
func (*Code) IsCauseMultiline ¶ added in v0.51.0
type CodeOption ¶ added in v0.57.3
type CodeOption func(*codeSettings)
func OptionCodeWithDarkTheme ¶ added in v0.57.3
func OptionCodeWithDarkTheme() CodeOption
func OptionCodeWithHighlighted ¶ added in v0.58.0
func OptionCodeWithHighlighted(include bool) CodeOption
func OptionCodeWithLightTheme ¶ added in v0.57.3
func OptionCodeWithLightTheme() CodeOption
func OptionCodeWithMaxLines ¶ added in v0.58.0
func OptionCodeWithMaxLines(lines int) CodeOption
func OptionCodeWithTheme ¶ added in v0.57.3
func OptionCodeWithTheme(theme string) CodeOption
func OptionCodeWithTruncation ¶ added in v0.57.3
func OptionCodeWithTruncation(truncate bool) CodeOption
type CustomChecks ¶
type CustomChecks struct {
Terraform *TerraformCustomCheck
}
type EngineMetadata ¶
type FlatResult ¶
type FlatResult struct { RuleID string `json:"rule_id"` LongID string `json:"long_id"` RuleSummary string `json:"rule_description"` RuleProvider providers.Provider `json:"rule_provider"` RuleService string `json:"rule_service"` Impact string `json:"impact"` Resolution string `json:"resolution"` Links []string `json:"links"` Description string `json:"description"` RangeAnnotation string `json:"-"` Severity severity.Severity `json:"severity"` Warning bool `json:"warning"` Status Status `json:"status"` Resource string `json:"resource"` Occurrences []Occurrence `json:"occurrences,omitempty"` Location FlatRange `json:"location"` }
type Line ¶ added in v0.51.0
type Line struct { Number int `json:"Number"` Content string `json:"Content"` IsCause bool `json:"IsCause"` Annotation string `json:"Annotation"` Truncated bool `json:"Truncated"` Highlighted string `json:"Highlighted,omitempty"` FirstCause bool `json:"FirstCause"` LastCause bool `json:"LastCause"` }
type MetadataProvider ¶
type MetadataProvider interface { GetMetadata() defsecTypes.Metadata GetRawValue() interface{} }
type Occurrence ¶ added in v0.91.0
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) AbsolutePath ¶ added in v0.52.0
func (r *Result) AbsolutePath(fsRoot string, metadata defsecTypes.Metadata) string
func (Result) Annotation ¶
func (Result) Description ¶
func (*Result) Flatten ¶
func (r *Result) Flatten() FlatResult
func (*Result) GetCode ¶ added in v0.51.0
func (r *Result) GetCode(opts ...CodeOption) (*Code, error)
nolint
func (Result) Metadata ¶
func (r Result) Metadata() defsecTypes.Metadata
func (*Result) Occurrences ¶ added in v0.91.0
func (r *Result) Occurrences() []Occurrence
func (*Result) OverrideAnnotation ¶
func (*Result) OverrideDescription ¶
func (*Result) OverrideMetadata ¶
func (r *Result) OverrideMetadata(metadata defsecTypes.Metadata)
func (*Result) OverrideSeverity ¶
func (*Result) OverrideStatus ¶
func (Result) Range ¶
func (r Result) Range() defsecTypes.Range
func (Result) RegoNamespace ¶
func (*Result) RelativePathTo ¶ added in v0.52.0
func (r *Result) RelativePathTo(fsRoot, to string, metadata defsecTypes.Metadata) string
type Results ¶
type Results []Result
func (*Results) AddIgnored ¶
func (*Results) AddPassedRego ¶ added in v0.47.1
func (Results) Flatten ¶
func (r Results) Flatten() []FlatResult
func (*Results) GetIgnored ¶
type Rule ¶
type Rule struct { AVDID string `json:"avd_id"` Aliases []string `json:"aliases"` ShortCode string `json:"short_code"` Summary string `json:"summary"` Explanation string `json:"explanation"` Impact string `json:"impact"` Resolution string `json:"resolution"` Provider providers.Provider `json:"provider"` Service string `json:"service"` Links []string `json:"links"` Severity severity.Severity `json:"severity"` Terraform *EngineMetadata `json:"terraform,omitempty"` CloudFormation *EngineMetadata `json:"cloud_formation,omitempty"` CustomChecks CustomChecks `json:"-"` RegoPackage string `json:"-"` Frameworks map[framework.Framework][]string `json:"frameworks"` }
func (Rule) ServiceDisplayName ¶
func (Rule) ShortCodeDisplayName ¶
Click to show internal directories.
Click to hide internal directories.