templates

package
v0.4.13 Latest Latest
Warning

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

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

Documentation

Overview

Package templates runs declarative YAML detection templates against a live target — a safe, Nuclei-compatible subset. Detections become data: a new CVE, exposed panel or misconfiguration check is a YAML file, not Go code, and users can drop their own into a templates directory without recompiling.

Safety (Scout stays detective, never weaponized): only GET/HEAD requests with no body run. Templates that use raw requests, request bodies, fuzzing payloads or variable/interpolation expressions in the path (anything beyond {{BaseURL}} and {{Hostname}}) are skipped — Scout will not fire an exploit from a template.

Index

Constants

This section is empty.

Variables

View Source
var UserDir = os.Getenv("SCOUT_TEMPLATES")

UserDir is an extra directory of user templates, loaded alongside the built-in ones. Set by the CLI (--templates) or the SCOUT_TEMPLATES env var.

Functions

This section is empty.

Types

type Check

type Check struct{}

func (Check) Category

func (Check) Category() core.Category

func (Check) Description

func (Check) Description() string

func (Check) ID

func (Check) ID() string

func (Check) Mode

func (Check) Mode() core.Mode

func (Check) OWASP

func (Check) OWASP() []string

func (Check) Run

func (c Check) Run(ctx context.Context, t core.Target) ([]core.Finding, error)

type Classification

type Classification struct {
	CVE   string      `yaml:"cve-id"`
	CWE   flexStrings `yaml:"cwe-id"`
	OWASP flexStrings `yaml:"owasp"`
}

type Info

type Info struct {
	Name           string         `yaml:"name"`
	Severity       string         `yaml:"severity"`
	Description    string         `yaml:"description"`
	Remediation    string         `yaml:"remediation"`
	Reference      flexStrings    `yaml:"reference"`
	Tags           string         `yaml:"tags"`
	Classification Classification `yaml:"classification"`
}

type Matcher

type Matcher struct {
	Type      string      `yaml:"type"`
	Words     flexStrings `yaml:"words"`
	Regex     flexStrings `yaml:"regex"`
	Status    []int       `yaml:"status"`
	Part      string      `yaml:"part"`
	Condition string      `yaml:"condition"`
	Negative  bool        `yaml:"negative"`
}

type Request

type Request struct {
	Method       string            `yaml:"method"`
	Path         []string          `yaml:"path"`
	Headers      map[string]string `yaml:"headers"`
	Body         string            `yaml:"body"`
	Raw          []string          `yaml:"raw"`
	MatchersCond string            `yaml:"matchers-condition"`
	Matchers     []Matcher         `yaml:"matchers"`
}

type Template

type Template struct {
	ID   string    `yaml:"id"`
	Info Info      `yaml:"info"`
	HTTP []Request `yaml:"http"`
	// Nuclei v1 used "requests"; accept it too.
	Requests []Request `yaml:"requests"`
}

Jump to

Keyboard shortcuts

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