Remove minimum threat score feature and settings

This commit is contained in:
Ryan Smith
2025-03-19 20:50:21 -07:00
parent f72cf4ddba
commit b23e9b4a9e
4 changed files with 8 additions and 11 deletions

View File

@@ -131,14 +131,13 @@ type Prompt struct {
// can be configured to automatically block communication with IP addresses
// appearing in the threat feed.
type ThreatFeed struct {
Enabled bool `xml:"enabled"`
Port string `xml:"port"`
DatabasePath string `xml:"databasePath"`
ExpiryHours int `xml:"threatExpiryHours"`
IsPrivateIncluded bool `xml:"includePrivateIPs"`
MinimumThreatScore int `xml:"minimumThreatScore"`
CustomThreatsPath string `xml:"customThreatsPath"`
ExcludeListPath string `xml:"excludeListPath"`
Enabled bool `xml:"enabled"`
Port string `xml:"port"`
DatabasePath string `xml:"databasePath"`
ExpiryHours int `xml:"threatExpiryHours"`
IsPrivateIncluded bool `xml:"includePrivateIPs"`
CustomThreatsPath string `xml:"customThreatsPath"`
ExcludeListPath string `xml:"excludeListPath"`
}
// Load reads an optional XML configuration file and unmarshals its contents

View File

@@ -82,7 +82,7 @@ func prepareFeed(options ...feedOptions) feedEntries {
threats := make(feedEntries, 0, len(iocData))
loop:
for ip, ioc := range iocData {
if ioc.expired() || ioc.threatScore < cfg.ThreatFeed.MinimumThreatScore || !ioc.lastSeen.After(opt.seenAfter) {
if ioc.expired() || !ioc.lastSeen.After(opt.seenAfter) {
continue
}