Documentation
¶
Overview ¶
Package repocheck judges the image references found in a repository: it resolves each one (once per distinct reference) and assesses it with registry.Assess. A reference whose images prove no PHP version is not a finding, but it is counted.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check resolves and assesses every reference, with at most parallel references in flight (default 4). Results are in the order of rs. A reference with a literal FROM --platform (Ref.Platform) is judged on that platform only; Result.Resolution is then filtered to it. A global platform restriction is registry.Options.Platforms.
Types ¶
type Result ¶
type Result struct {
Ref refs.Ref `json:"ref"`
Resolution *registry.Resolution `json:"resolution,omitempty"`
Assessment registry.Assessment `json:"assessment"`
// Error is set when the reference could not be resolved (Assessment is
// then Unresolved).
Error string `json:"error,omitempty"`
// ErrorKind classifies Error: "network", "timeout" and "rate-limited" are
// transient (registry.Transient); "not-found", "denied", "invalid",
// "unsupported" and "offline" are definitive.
ErrorKind string `json:"error_kind,omitempty"`
// Transient is registry.Transient(ErrorKind): the reference may resolve on
// a later attempt, so its absence from the findings proves nothing.
Transient bool `json:"transient,omitempty"`
}
Result is the judgement for one reference.
type Stats ¶
type Stats struct {
Refs int `json:"refs"`
Images int `json:"images"` // distinct references resolved
Vulnerable int `json:"vulnerable"`
Fixed int `json:"fixed"`
Unknown int `json:"unknown"`
NoPHP int `json:"no_php_evidence"`
NoImages int `json:"no_images"`
Unresolved int `json:"unresolved"`
// Transient counts the unresolved references that failed transiently.
Transient int `json:"transient"`
}
Stats counts results by verdict.
Click to show internal directories.
Click to hide internal directories.