Documentation
¶
Overview ¶
Package models defines the core data structures for agentcheck results.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finding ¶
type Finding struct {
Scanner string `json:"scanner"`
Resource string `json:"resource"`
Severity Severity `json:"severity"`
Description string `json:"description"`
Detail string `json:"detail,omitempty"`
}
Finding represents a single security concern detected during a scan. Resource must never contain actual secret values; key names and file paths only.
type RiskReport ¶
type RiskReport struct {
Summary Summary `json:"summary"`
ScanResults []ScanResult `json:"scan_results"`
}
RiskReport is the top-level result of a full agentcheck scan. Summary is declared first to keep JSON key order: "summary" before "scan_results".
type ScanResult ¶
type ScanResult struct {
ScannerName string `json:"scanner"`
Findings []Finding `json:"findings"`
Skipped bool `json:"skipped"`
SkipReason *string `json:"skip_reason"`
}
ScanResult holds the output of a single scanner's execution.
type Severity ¶
type Severity string
Severity represents the risk level of a finding.
func ParseSeverity ¶
ParseSeverity validates and converts a severity string to a Severity value. Input is case-insensitive. Returns an error for unrecognised values.
func ParseSeverityOrModerate ¶
ParseSeverityOrModerate converts a severity string to a Severity value. If the value is unrecognised or empty, it defaults to MODERATE. Use this for optional config fields where omission means "use the default".
type Summary ¶
type Summary struct {
Critical int `json:"critical"`
High int `json:"high"`
Moderate int `json:"moderate"`
Low int `json:"low"`
Uncertain int `json:"uncertain"`
ConfirmedTotal int `json:"confirmed_total"`
ScannersTotal int `json:"scanners_total"`
ScannersSkipped int `json:"scanners_skipped"`
}
Summary holds objective counts derived from all scan results. These are counts of actual findings, not computed scores. ConfirmedTotal is critical+high+moderate+low; UNCERTAIN findings are excluded because they represent incomplete checks rather than confirmed findings.
type UnknownSeverityError ¶
type UnknownSeverityError struct {
Value string
}
UnknownSeverityError is returned by ParseSeverity for unrecognised values.
func (*UnknownSeverityError) Error ¶
func (e *UnknownSeverityError) Error() string