[MokoCBRegGuard] [FEATURE] Username pattern detection #23

Open
opened 2026-06-02 19:31:35 +00:00 by jmiller · 0 comments
Owner

Migrated from MokoCBRegGuard#17

Feature Description

Add regex-based username analysis to detect bot-generated or suspicious usernames during registration.

Problem or Use Case

Spam bots often use formulaic usernames — random character strings, sequential numbers, keyboard walks, or known bot prefixes (user12345, test9876). The plugin currently performs no username analysis.

Proposed Solution

Add configurable regex patterns that flag suspicious usernames:

  • Excessive consecutive digits
  • All-consonant or all-vowel strings
  • Known bot-name patterns (configurable regex list)
  • Very short usernames (< 3 chars)

Generate a USERNAME_SUSPICIOUS flag (weight: 1) when a match is found.

Alternative Solutions

  • Manual moderator review of all usernames (does not scale)
  • Rely on other checks to catch bots (misses username-only signals)

Benefits

  • Who: Sites with high bot registration volume
  • Problem solved: Catches spam bots that pass IP and email checks but use obviously fake usernames
  • Value: Additional signal layer with zero external API dependency

Implementation Details (Optional)

  • New params in cbregguard.xml: enable_username_check, username_suspicious_patterns (textarea, one regex per line)
  • New RegGuardHelper::checkUsername() static method
  • Default patterns provided but fully customizable

Relevant Standards

  • Security best practices
  • Code quality standards

Checklist

  • I have searched for similar feature requests before creating this one
  • I have clearly described the use case and benefits
  • I have considered alternative solutions
  • This feature aligns with the project's goals and scope
> Migrated from MokoCBRegGuard#17 ## Feature Description Add regex-based username analysis to detect bot-generated or suspicious usernames during registration. ## Problem or Use Case Spam bots often use formulaic usernames — random character strings, sequential numbers, keyboard walks, or known bot prefixes (user12345, test9876). The plugin currently performs no username analysis. ## Proposed Solution Add configurable regex patterns that flag suspicious usernames: - Excessive consecutive digits - All-consonant or all-vowel strings - Known bot-name patterns (configurable regex list) - Very short usernames (< 3 chars) Generate a `USERNAME_SUSPICIOUS` flag (weight: 1) when a match is found. ## Alternative Solutions - Manual moderator review of all usernames (does not scale) - Rely on other checks to catch bots (misses username-only signals) ## Benefits - **Who:** Sites with high bot registration volume - **Problem solved:** Catches spam bots that pass IP and email checks but use obviously fake usernames - **Value:** Additional signal layer with zero external API dependency ## Implementation Details (Optional) - New params in `cbregguard.xml`: `enable_username_check`, `username_suspicious_patterns` (textarea, one regex per line) - New `RegGuardHelper::checkUsername()` static method - Default patterns provided but fully customizable ## Relevant Standards - [x] Security best practices - [x] Code quality standards ## Checklist - [x] I have searched for similar feature requests before creating this one - [x] I have clearly described the use case and benefits - [x] I have considered alternative solutions - [x] This feature aligns with the project's goals and scope
jmiller added the pending: testingregguard labels 2026-06-02 19:52:03 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomCommunity#23