certreview

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 6 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 {
	Domain   string   `json:"domain"`
	Severity Severity `json:"severity"`
	Check    string   `json:"check"`
	Message  string   `json:"message"`
	RuleID   string   `json:"rule_id,omitempty"`
}

Finding is one certificate review result.

type Options

type Options struct {
	// ExpiryWarningDays is the number of days before expiry to trigger a warning.
	ExpiryWarningDays int

	// ExpiryCriticalDays is the number of days before expiry to trigger a critical alert.
	ExpiryCriticalDays int

	// MinRSABits is the minimum acceptable RSA key size.
	MinRSABits int
}

Options controls certificate review behavior.

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns production-safe review defaults.

type ReviewResult

type ReviewResult struct {
	OK         bool      `json:"ok"`
	Total      int       `json:"total"`
	Critical   int       `json:"critical"`
	Warnings   int       `json:"warnings"`
	Info       int       `json:"info"`
	Findings   []Finding `json:"findings"`
	ReviewedAt int64     `json:"reviewed_at"`
}

ReviewResult is the output of a full certificate review.

type Reviewer

type Reviewer struct {
	// contains filtered or unexported fields
}

Reviewer performs certificate health checks.

func NewReviewer

func NewReviewer(store *certstore.Store, rules func() []engine.Rule, opts Options) *Reviewer

NewReviewer creates a certificate reviewer. The rules function provides the current running rules (lazy, called at review time).

func (*Reviewer) Review

func (r *Reviewer) Review() ReviewResult

Review executes all certificate health checks and returns the result.

type Severity

type Severity string

Severity describes the urgency of a finding.

const (
	SeverityCritical Severity = "critical"
	SeverityWarning  Severity = "warning"
	SeverityInfo     Severity = "info"
)

Jump to

Keyboard shortcuts

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