No description
Find a file
2025-07-12 15:41:27 -04:00
.gitignore Initial commit 2025-07-12 15:41:27 -04:00
delete.py Initial commit 2025-07-12 15:41:27 -04:00
find.py Initial commit 2025-07-12 15:41:27 -04:00
LICENSE Initial commit 2025-07-12 15:41:27 -04:00
README.md Initial commit 2025-07-12 15:41:27 -04:00
requirements.txt Initial commit 2025-07-12 15:41:27 -04:00

GitLab User Cleanup

Two Python scripts for cleaning up spam users and bots from GitLab instances.

Scripts

find.py - Finds problematic users and exports them to JSON files delete.py - Deletes users from the JSON files created by find.py

Setup

  1. Install requirements:

    pip install -r requirements.txt
    
  2. Create .env file:

    GITLAB_URL=https://your-gitlab-instance.com
    ACCESS_TOKEN=your_admin_token_here
    

Usage

  1. Run python find.py to identify spam users
  2. Review the generated JSON files
  3. Run python delete.py to remove users

The find script detects users based on unverified emails, no repositories, suspicious domains, and spam patterns. The delete script permanently removes users with confirmation prompts.

Warning

User deletion is permanent and cannot be undone.

LICENSE