[MokoCBRegGuard] [FEATURE] Configurable per-flag risk weights #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature Description
Expose per-flag weight overrides as plugin parameters so administrators can tune the risk scoring to their community's threat profile.
Problem or Use Case
Flag weights are currently hardcoded in
RegGuardHelper::calculateRiskScore()(SFS = 3, IP_FREQUENCY = 2, RDNS_HOSTING = 1, etc.). Different communities have very different threat profiles:BIRTHDAY_AGE_LOWweighted higherRDNS_HOSTINGweighted lowerThere is no way to adjust these without modifying source code.
Proposed Solution
Add per-flag weight parameters to the plugin configuration:
weight_sfs_ip(default: 3)weight_sfs_email(default: 3)weight_ip_frequency(default: 2)weight_birthday_future(default: 2)weight_birthday_invalid(default: 2)weight_birthday_age_low(default: 2)weight_rdns_hosting(default: 1)weight_ip_localhost(default: 1)weight_birthday_suspicious(default: 1)weight_birthday_year_old(default: 1)weight_birthday_age_high(default: 1)Fall back to current hardcoded defaults when a param is not set (backward compatible).
Alternative Solutions
Benefits
Implementation Details (Optional)
cbregguard.xml(one per flag type)RegGuardHelper::calculateRiskScore()to accept params and read weights from configRelevant Standards
Checklist