Documentation
¶
Overview ¶
Package security_scanner provides OWASP security scanning and vulnerability detection for ZAP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSecurityReport ¶
func GenerateSecurityReport(falconDir string, vulns []Vulnerability, params ScanParams) (string, error)
GenerateSecurityReport persists the vulnerabilities and scan parameters into a Markdown report.
Types ¶
type AuthAuditor ¶
type AuthAuditor struct {
// contains filtered or unexported fields
}
AuthAuditor performs authentication and authorization security audits.
func NewAuthAuditor ¶
func NewAuthAuditor(httpTool *shared.HTTPTool) *AuthAuditor
NewAuthAuditor creates a new auth auditor.
func (*AuthAuditor) AuditAuth ¶
func (a *AuthAuditor) AuditAuth(endpoints map[string]shared.EndpointAnalysis, baseURL, authToken string) ([]Vulnerability, int)
AuditAuth performs authentication and authorization security checks.
type Fuzzer ¶
type Fuzzer struct {
// contains filtered or unexported fields
}
Fuzzer performs input fuzzing with various injection payloads.
func (*Fuzzer) FuzzEndpoints ¶
func (f *Fuzzer) FuzzEndpoints(endpoints map[string]shared.EndpointAnalysis, baseURL string, maxPayload int) ([]Vulnerability, int)
FuzzEndpoints performs fuzzing attacks on endpoints.
type OWASPChecker ¶
type OWASPChecker struct {
// contains filtered or unexported fields
}
OWASPChecker performs OWASP Top 10 security checks.
func NewOWASPChecker ¶
func NewOWASPChecker(httpTool *shared.HTTPTool) *OWASPChecker
NewOWASPChecker creates a new OWASP checker.
func (*OWASPChecker) RunChecks ¶
func (c *OWASPChecker) RunChecks(endpoints map[string]shared.EndpointAnalysis, baseURL string) ([]Vulnerability, int)
RunChecks executes OWASP Top 10 checks on the endpoints.
type ScanParams ¶
type ScanParams struct {
BaseURL string `json:"base_url"` // Base URL of the API
Endpoints []string `json:"endpoints,omitempty"` // Specific endpoints to scan (empty = all)
ScanTypes []string `json:"scan_types,omitempty"` // Types of scans: owasp, fuzz, auth (empty = all)
AuthToken string `json:"auth_token,omitempty"` // Auth token for authenticated endpoints
Depth string `json:"depth,omitempty"` // Scan depth: quick, standard, deep (default: standard)
MaxPayload int `json:"max_payload,omitempty"` // Max payload size for fuzzing (default: 10000)
}
ScanParams defines parameters for security scanning.
type ScanResult ¶
type ScanResult struct {
TotalChecks int `json:"total_checks"`
VulnFound int `json:"vulnerabilities_found"`
Critical int `json:"critical"`
High int `json:"high"`
Medium int `json:"medium"`
Low int `json:"low"`
Vulnerabilities []Vulnerability `json:"vulnerabilities"`
ScanDuration string `json:"scan_duration"`
Summary string `json:"summary"`
ReportPath string `json:"report_path,omitempty"`
}
ScanResult represents the output of a security scan.
type SecurityScannerTool ¶
type SecurityScannerTool struct {
// contains filtered or unexported fields
}
SecurityScannerTool performs comprehensive security scans on APIs.
func NewSecurityScannerTool ¶
func NewSecurityScannerTool(falconDir string, httpTool *shared.HTTPTool) *SecurityScannerTool
NewSecurityScannerTool creates a new security scanner tool.
func (*SecurityScannerTool) Description ¶
func (t *SecurityScannerTool) Description() string
Description returns the tool description.
func (*SecurityScannerTool) Execute ¶
func (t *SecurityScannerTool) Execute(args string) (string, error)
Execute performs the security scan.
func (*SecurityScannerTool) Name ¶
func (t *SecurityScannerTool) Name() string
Name returns the tool name.
func (*SecurityScannerTool) Parameters ¶
func (t *SecurityScannerTool) Parameters() string
Parameters returns the tool parameter description.
type Vulnerability ¶
type Vulnerability struct {
ID string `json:"id"`
Title string `json:"title"`
Severity string `json:"severity"` // critical, high, medium, low
Category string `json:"category"` // owasp, auth, injection, etc.
Endpoint string `json:"endpoint"`
Description string `json:"description"`
Evidence string `json:"evidence,omitempty"`
Remediation string `json:"remediation"`
OWASPRef string `json:"owasp_ref,omitempty"`
CWERef string `json:"cwe_ref,omitempty"`
}
Vulnerability represents a security finding.