verify

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Check    string             `json:"check"`
	Severity contracts.Severity `json:"severity"`
	URL      string             `json:"url"`
	Element  string             `json:"element,omitempty"`
	Message  string             `json:"message"`
	Fix      string             `json:"fix,omitempty"`
	Evidence string             `json:"evidence,omitempty"`
}

Finding is the neutral verification finding contract shared across Hawk and verification engines.

type Report

type Report struct {
	Target      string             `json:"target"`
	Findings    []Finding          `json:"findings"`
	Stats       Stats              `json:"stats"`
	CrawledURLs int                `json:"crawled_urls"`
	Duration    time.Duration      `json:"duration"`
	FailOn      contracts.Severity `json:"fail_on"`
}

Report is the neutral verification report contract.

func (*Report) Failed

func (r *Report) Failed() bool

Failed reports whether any finding meets or exceeds the configured fail threshold.

func (*Report) MaxSeverity

func (r *Report) MaxSeverity() contracts.Severity

MaxSeverity returns the highest severity present in the report.

type Stats

type Stats struct {
	PagesScanned     int                        `json:"pages_scanned"`
	FindingsTotal    int                        `json:"findings_total"`
	BySeverity       map[contracts.Severity]int `json:"by_severity"`
	ByCheck          map[string]int             `json:"by_check"`
	DurationPerCheck map[string]time.Duration   `json:"duration_per_check"`
}

Stats captures verification execution metrics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL