internal

package
v0.0.0-...-32808ba Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advisory

type Advisory struct {
	// ID is the unique identifier of the advisory in the WP Sec Adv database.
	// For example, "WPSECADV/AAA/BBB/CCC".
	ID string `json:"advisoryId"`

	Title string `json:"title"`

	// ReportedAt is the date the issue was reported in UTC.
	// For example, "2006-01-02 15:04:05".
	ReportedAt string `json:"reportedAt"`

	Sources []Source `json:"sources"`

	// Link is a URL to issue disclosure.
	Link string `json:"link,omitempty"`

	CVE string `json:"cve,omitempty"`

	// AffectedVersions is a string in form of a composer constraint.
	// For example, ">=1.0.0,<2.0.0|>3.0.0,<=3.4.0|=5.0.0".
	AffectedVersions string `json:"affectedVersions"`

	// Severity is the lowercased CVSS3 severity rating scale.
	// Possible values: "none", "low", "medium", "high", "critical".
	Severity string `json:"severity,omitempty"`
}

func (Advisory) Complete

func (a Advisory) Complete() bool

Complete reports whether the advisory has all required fields to be considered a SecurityAdvisory by Composer.

type Kind

type Kind string
const (
	KindUnknown Kind = "unknown"
	KindCore    Kind = "core"
	KindPlugin  Kind = "plugin"
	KindTheme   Kind = "theme"
	KindWPMU    Kind = "wpmu"
)

type Record

type Record struct {
	Kind     Kind
	Slug     string
	Advisory Advisory
}

func (Record) LogValue

func (r Record) LogValue() slog.Value

type Source

type Source struct {
	// Name is the name of the source.
	// For example, "Wordfence".
	Name string `json:"name"`
	ID   string `json:"remoteId"`
}

Directories

Path Synopsis
gen command
gen/fixture command
gen command

Jump to

Keyboard shortcuts

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