vuln

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package vuln is responsible for wrapping nuclei in order to manage the custom templates that are used within the webscan tool. This package is used to load custom templates, build template filters, and execute the nuclei tool against a target to identify vulnerabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTemplateFilters

func BuildTemplateFilters(ctx context.Context, tags []string, severity string) nuclei.NucleiSDKOptions

BuildTemplateFilters builds template filters based on the provided tags and severity, updating the NucleiSDKOptions instance with the template filters.

func LoadCustomTemplates

func LoadCustomTemplates(ctx context.Context, customTemplatePath string) nuclei.NucleiSDKOptions

LoadCustomTemplates loads custom templates from the provided customTemplatePath and the default templates directory. Updating the NuclieSDKOptions instance with the custom templates loaded.

Types

type VulnerabilityContext

type VulnerabilityContext struct {
	TemplateID       string   `json:"template-id"`
	Host             string   `json:"host"`
	URL              string   `json:"url"`
	Port             string   `json:"port"`
	FullPath         string   `json:"full-path"`
	ExtractedResults []string `json:"extracted-results"`
}

VulnerabilityContext represents an instance of a vulnerability, with all of the information needed to contextualize that particular vulnerability.

type VulnerabilityFinding

type VulnerabilityFinding struct {
	ID      string               `json:"id"`
	Info    model.Info           `json:"info"`
	Context VulnerabilityContext `json:"context"`
}

A VulnerabilityFinding represents a single vulnerability that was found during a vulnerability scan. The Context is included in each finding to simplify the data integration and automation process.

type VulnerabilityReport

type VulnerabilityReport struct {
	Target  string                 `json:"target"`
	Reports []VulnerabilityFinding `json:"report"`
}

A VulnerabilityReport represents a holistic report of all the vulnerabilities that were found during a vulnerability scan.

func PerformVulnScan

func PerformVulnScan(ctx context.Context, target string, tags []string, severity string, templateDirectory string, customTemplateDirectory string) (VulnerabilityReport, error)

PerformVulnScan performs a vulnerability scan against a target URL, using the provided tags and severity to filter the templates that are used in the scan. The scan uses the provided templateDirectory and customTemplateDirectory to load the templates that are used in the scan.

Jump to

Keyboard shortcuts

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