scope

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package scope evaluates target-scope rules: which flows are "in scope" for an engagement. It focuses the history view, the intercept gate, and the scanner without affecting capture. Safe for concurrent use and live-reloadable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateRule added in v0.20.0

func ValidateRule(r store.ScopeRule) error

ValidateRule reports whether host/path patterns compile. Call before persisting a scope rule so malformed regex is rejected instead of falling back to literal.

Types

type Engine

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

Engine holds a compiled, reloadable rule set.

func New

func New() *Engine

New returns an empty engine (everything in scope until rules are set).

func (*Engine) HasActiveRules added in v0.12.0

func (e *Engine) HasActiveRules() bool

HasActiveRules reports whether any enabled scope rule exists (include or exclude).

func (*Engine) HasIncludes added in v0.2.1

func (e *Engine) HasIncludes() bool

HasIncludes reports whether any active include rule exists — i.e. whether the scope is a real allow-list rather than the default "everything is in scope".

func (*Engine) HostInScope added in v0.12.0

func (e *Engine) HostInScope(host string) bool

HostInScope reports whether a host matches the current rules using host patterns only (path/scheme/port on rules are ignored). Used to gate session header injection on Repeater/Intruder sends where only the target host is known.

func (*Engine) InScope

func (e *Engine) InScope(f *store.Flow) bool

InScope reports whether a flow is in scope: it matches no exclude rule, and (if any include rules exist) matches at least one include rule.

func (*Engine) SetRules

func (e *Engine) SetRules(rules []store.ScopeRule)

SetRules recompiles the active (enabled) rules.

Jump to

Keyboard shortcuts

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