feat(similarity): sign-up similarity check #31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "thelion/signup-similarity"
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?
Flags sign-ups that look like existing accounts (same SSH key, IP, normalised email, proxy client; medium/weak signals), escalates strong matches with banned accounts. Relay/CDN/own hosts never count.
When a sign-up arrives, and whenever staff open a request, managebot now says whether it looks like the same person as an existing account, which one, and why. It's a warning, never a ban. Signals (internal/services/similarity/signals.go): - strong (60/50): the same SSH key fingerprint; the same exact, non-shared IP from any source (signup, ssh, znc, irc); the same normalised email (case folded, +tags and Gmail dots dropped); the same proxy client (the abuse scan's proxy_client links) - medium: the same exact IP on a hosting/VPN network (20); the same /24 or /64 on a residential or mobile network (20); the same name stem once digits and separators are gone, or one edit apart for 6+ letters (25; stems under 4 letters, common words and names on more than 8 accounts don't count); the match is in a cluster staff banned as linked (15). Two different medium signals together count as strong. - weak, context only (5 each): same ASN, same IRC client version, sign-ups within 48 hours. Matches are only reported on a medium or strong signal. Shared infrastructure never counts as an address match: iCloud Private Relay and CDN/WARP egress (by range, ASN and organisation), Tor exits when the list has any, private addresses, the IRC box (ZNC, the webchat gateway and the ZNC user vhosts), the VPS and the shells host, its NAT and IPv6. The list is SharedInfrastructure in shared.go, extendable with CHECK_SHARED_NETS. Addresses on more than 5 accounts, subnets on more than 6 and anything staff accounts have used are ignored too. Results are cached in similarity_results (migration 000020), worked out at intake, on demand (GET/POST /api/requests/{id}/similar) and every 6 hours for all requests. The request page has a "similar accounts" panel linking each match and showing bans; the queue badges rows with the best match. A strong match with a banned account adds a similar.banned reason and turns an auto-approval into an escalation (never a rejection); accounts already approved are left alone. Only local data is used: the database and the local GeoLite ASN file. Also: the queue table's sr-only header no longer widens the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.