phishing

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default confidence threshold for phishing detection
	DefaultConfidenceThreshold = 0.7

	// High-risk indicators that warrant immediate flagging
	HighRiskScoreThreshold = 8.0

	// ML Model simulation confidence factors
	BrandConfidenceWeight  = 0.3
	LinkAnalysisWeight     = 0.25
	ContentAnalysisWeight  = 0.25
	MetadataAnalysisWeight = 0.2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PhishingDetectionService

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

PhishingDetectionService provides AI-powered phishing detection

func NewPhishingDetectionService

func NewPhishingDetectionService(logger *zap.Logger) *PhishingDetectionService

NewPhishingDetectionService creates a new phishing detection service

func (*PhishingDetectionService) AnalyzeMessage

func (s *PhishingDetectionService) AnalyzeMessage(ctx context.Context, message *domain.Message) (*PhishingResult, error)

AnalyzeMessage performs comprehensive phishing detection using AI techniques

type PhishingIndicator

type PhishingIndicator struct {
	Type        string  `json:"type"`
	Description string  `json:"description"`
	Confidence  float64 `json:"confidence"`
	Severity    string  `json:"severity"` // "low", "medium", "high", "critical"
}

PhishingIndicator represents a potential phishing indicator

type PhishingResult

type PhishingResult struct {
	IsPhishing        bool                `json:"is_phishing"`
	OverallConfidence float64             `json:"overall_confidence"`
	PhishingScore     float64             `json:"phishing_score"`
	RiskLevel         string              `json:"risk_level"` // "low", "medium", "high", "critical"
	Indicators        []PhishingIndicator `json:"indicators"`
	AnalysisTimestamp time.Time           `json:"analysis_timestamp"`
	Recommendations   []string            `json:"recommendations"`
}

PhishingResult represents the result of phishing analysis

Jump to

Keyboard shortcuts

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