scanner

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package scanner provides protocol security scanning and vulnerability detection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatReport

func FormatReport(r *ScanResult) string

FormatReport formats a scan result as a security report.

Types

type ScanResult

type ScanResult struct {
	Target          string          `json:"target"`
	Protocol        string          `json:"protocol"`
	StartTime       time.Time       `json:"start_time"`
	EndTime         time.Time       `json:"end_time"`
	Vulnerabilities []Vulnerability `json:"vulnerabilities"`
	RiskLevel       string          `json:"risk_level"` // "low", "medium", "high", "critical"
	Score           float64         `json:"score"`      // 0-10
}

ScanResult holds the results of a security scan.

type ScanRule

type ScanRule struct {
	ID       string
	Name     string
	Severity string
	Check    func(protocol string, data []byte) *Vulnerability
}

ScanRule defines a security scanning rule.

type Scanner

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

Scanner performs protocol security scans.

func NewScanner

func NewScanner() *Scanner

NewScanner creates a new security scanner.

func (*Scanner) Scan

func (s *Scanner) Scan(protocol string, data []byte) *ScanResult

Scan performs a security scan on protocol data.

type Vulnerability

type Vulnerability struct {
	ID          string `json:"id"`
	Protocol    string `json:"protocol"`
	Severity    string `json:"severity"` // "low", "medium", "high", "critical"
	Title       string `json:"title"`
	Description string `json:"description"`
	Remediation string `json:"remediation"`
	CVE         string `json:"cve,omitempty"`
}

Vulnerability represents a detected vulnerability.

Jump to

Keyboard shortcuts

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