Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finding ¶
type Finding struct {
Rule string `json:"rule"`
Outcome Outcome `json:"outcome"`
Risk rule.Risk `json:"risk"`
Message string `json:"message"`
Location *Location `json:"location,omitempty"`
Remediation *rule.Remediation `json:"remediation,omitempty"`
}
Finding represents a finding. nolint: govet
func (*Finding) WithLocation ¶
WithLocation adds a location to an existing finding. No copy is made.
func (*Finding) WithMessage ¶
WithMessage adds a message to an existing finding. No copy is made.
func (*Finding) WithOutcome ¶
WithOutcome adds an outcome to an existing finding. No copy is made. WARNING: this function should be called at most once for a finding.
type Location ¶
type Location struct {
Type FileType `json:"type"`
Value string `json:"value"`
LineStart *uint `json:"lineStart,omitempty"`
LineEnd *uint `json:"lineEnd,omitempty"`
Snippet *string `json:"snippet,omitempty"`
}
Location represents the location of a finding. nolint: govet
type Outcome ¶
type Outcome int
Outcome is the result of a finding.
const ( // OutcomeNegative indicates a negative outcome. OutcomeNegative Outcome = iota // OutcomePositive indicates a positive outcome. OutcomePositive // OutcomeNotApplicable indicates a non-applicable outcome. OutcomeNotApplicable // OutcomeNotSupported indicates a non-supported outcome. OutcomeNotSupported )
Click to show internal directories.
Click to hide internal directories.