certreview

package
v0.2.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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