wordpress

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package wordpress fingerprints WordPress sites and runs WordPress-specific checks that the generic analyzers do not name. It works in two passes: a passive pass over the crawled HTML (detection, version disclosure, front-end bloat, the default tagline, ugly permalinks, multilingual/WPML configuration, and leaked Advanced Custom Fields markup) and an opt-in active pass that probes well-known endpoints for security and hygiene problems (xmlrpc.php, REST/author user enumeration, directory listing, readme.html).

The multilingual checks deliberately stop at WordPress-specific signals (which plugin is active, whether it emits hreflang at all, and the language-negotiation style); hreflang correctness itself — invalid codes, missing return links, missing x-default — is the dedicated hreflang analyzer's job and is not duplicated here.

Most WordPress fingerprints live in the shared header/footer template, so they repeat on every page. To avoid flooding the report, the passive checks are aggregated across the crawl and emitted once per site (keyed by the site base URL); only ugly permalinks, which are genuinely per-page, fire per page.

The active probes fetch a handful of extra URLs beyond the crawl, like the geo and sitemap analyzers. They are off by default and enabled via WithSecurityProbes (wired to the `specialized` config flag) so the default analyzer stays passive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

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

Analyzer fingerprints WordPress and runs WordPress-specific checks. The fetcher is used by the opt-in security probes; it is not touched when probes are disabled.

func New

func New(fetcher crawler.Fetcher, opts ...Option) *Analyzer

New returns a WordPress analyzer. The fetcher is used only by the opt-in security probes.

func (Analyzer) Analyze

func (a Analyzer) Analyze(ctx context.Context, result *crawler.Result) []analyze.Issue

func (Analyzer) Description

func (Analyzer) Description() string

func (Analyzer) Name

func (Analyzer) Name() string

type Option

type Option func(*Analyzer)

Option configures a WordPress analyzer.

func WithSecurityProbes

func WithSecurityProbes(on bool) Option

WithSecurityProbes enables the active endpoint probes (xmlrpc.php, REST/author user enumeration, uploads directory listing, readme.html), which are off by default.

Jump to

Keyboard shortcuts

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