Gitea (with Actions) 🫖

:warning: This post is a work in progress

About Gitea

Blocking Spam on Gitea

I recently noticed a large number (123634 and counting) of spam accounts on my Gitea server. These accounts would have profiles and repositories linking to further spam and possibly nefarious content. I didn’t spend very long investigating the content, but it needed to be removed from the server.

https://community.ui.com/questions/EdgeRouter-6P-Firewall-Rules-to-Block-a-Specific-IP/166d23f4-80df-4437-89e6-790fb708036c

I was able to reduce the creation of spam accounts by setting the following in my Gitea config under service:

REGISTER_EMAIL_CONFIRM: true
ENABLE_CAPTCHA: true
EMAIL_DOMAIN_BLOCKLIST: "spammer.com,mailinator.com,tempmail.com,10minutemail.com,guerrillamail.com,dispostable.com,fakemail.com,maildrop.cc,trashmail.com,yopmail.com,techstrategylab.com,timminsgoldminetour.com,claxyn.org,sise.claxyn.org,blyxen.com,seti.blyxen.com,sise.blyxen.org,ivolix.com,seti.lyvix.org,seti.ivolix.org,semo.ivolix.com,elyquin.org,simu.elyquin.org,semo.claxyn.com,sise.oxilv.com,simu.glinxy.org,simu.hivoltz.org,semo.elyquin.com,prisite.online,sise.dravix.org,dravix.org,semo.glinxy.com,glinxy.com,dark-webmarket.com,seti.juxal.org,juxal.org,9e5d.getir.space,getir.space,topcompanygroup.com,6d43.getir.space,9e2d.mikrowellen-tests.com,verifiedlinklist.com"

and then running the following on my Gitea container to remove existing accounts:

for i in $(seq 24 123634) # first to last account id
do
gitea admin user delete --id $i --purge
done

Some accounts are still being created; however, it is at a slower rate and they are unverified, which prevents the creation of repositories and makes periodic removal a simple task of running one of the jobs from the admin dashboard.