path_relative_stylesheet

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleID    = "path-relative-stylesheet"
	ModuleName  = "Path-Relative Stylesheet Import (PRSSI)"
	ModuleShort = "Detects path-relative stylesheet imports on a page reachable via path-info confusion without nosniff"
)

Variables

View Source
var (
	ModuleDesc = `` /* 707-byte string literal not displayed */

	ModuleConfirmation = "" /* 208-byte string literal not displayed */
	ModuleSeverity     = severity.Low
	ModuleConfidence   = severity.Firm
	ModuleTags         = []string{"client-side", "css-injection", "prssi", "moderate"}
)

Functions

This section is empty.

Types

type Module

type Module struct {
	modkit.BaseActiveModule
	// contains filtered or unexported fields
}

Module implements the path-relative stylesheet import (PRSSI) scanner.

func New

func New() *Module

New creates a new PRSSI module.

func (*Module) CanProcess

func (m *Module) CanProcess(ctx *httpmsg.HttpRequestResponse) bool

CanProcess restricts to GET requests with a response (idempotent re-fetches).

func (*Module) IncludesBaseCanProcess

func (m *Module) IncludesBaseCanProcess() bool

func (*Module) ScanPerRequest

func (m *Module) ScanPerRequest(
	ctx *httpmsg.HttpRequestResponse,
	httpClient *http.Requester,
	scanCtx *modkit.ScanContext,
) ([]*output.ResultEvent, error)

ScanPerRequest confirms PRSSI with three gates: the page carries a path-relative stylesheet and omits nosniff; a path-info-confused URL serves the same page; and a genuinely nonexistent sibling does NOT (so a universal catch-all is excluded).

Jump to

Keyboard shortcuts

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