engine

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TargetURL  string
	Threads    int
	Timeout    time.Duration
	UserAgent  string
	Modules    []string // empty = all
	MinScore   int
	OutputJSON bool
	Verbose    bool
}

func DefaultConfig

func DefaultConfig(target string) *Config

type Engine

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

func New

func New(cfg *Config) *Engine

func (*Engine) Register

func (e *Engine) Register(m Module)

func (*Engine) Run

func (e *Engine) Run() ScoreResult

type Finding

type Finding struct {
	Module      string   `json:"module"`
	Severity    Severity `json:"severity"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Evidence    string   `json:"evidence,omitempty"`
	Remediation string   `json:"remediation,omitempty"`
	CWE         string   `json:"cwe,omitempty"`
	CVSS        float64  `json:"cvss,omitempty"`
}

func (Finding) String

func (f Finding) String() string

type Grade

type Grade string
const (
	GradeA Grade = "A"
	GradeB Grade = "B"
	GradeC Grade = "C"
	GradeD Grade = "D"
	GradeF Grade = "F"
)

type Module

type Module interface {
	Name() string
	Description() string
	Run(cfg *Config) ([]Finding, error)
}

type ScoreResult

type ScoreResult struct {
	Score    int              `json:"score"`
	Grade    Grade            `json:"grade"`
	Findings []Finding        `json:"findings"`
	Summary  map[Severity]int `json:"summary"`
}

func ComputeScore

func ComputeScore(findings []Finding) ScoreResult

type Severity

type Severity int
const (
	SevInfo Severity = iota
	SevLow
	SevMedium
	SevHigh
	SevCritical
)

func (Severity) Points

func (s Severity) Points() int

func (Severity) String

func (s Severity) String() string

Jump to

Keyboard shortcuts

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