Protect legitimate profiles and administrators #1
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/registration-policy-safety"
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?
Summary
Testing
.venv/bin/pytest -q(44 passed)git diff --checkThis is intended to be deployed alongside the Forgejo registration guard, while remaining independently safe to roll out.
/oc review
OpenCode Review
Execution completed for
pleroma/forgejo-janitorat3ac44fdd9184(job #64).Rating: 5/5
The PR reliably shields administrators and low-signal legitimate profiles. Admins are excluded in the candidate SQL for both signup and activity scans, short-circuited in scoring and planning, and every execute path re-checks admin status at UPDATE time (defense in depth against plan/execute TOCTOU, including owner/poster guards for quarantine_repo, redact_issue, and redact_comment). execute_actions now returns psycopg rowcounts so skipped admin targets are not reported as executed. The high-confidence rule now requires a corroborating keyword or suspicious domain for profile_backlink_spam, so a generic homepage with no forge activity is no longer login-prohibited while keyword/domain backlink spammers still are; verified generic(130, no prohibit), seo-helper(165, prohibit), admin(0, no actions), issue spammer(redact+prohibit). All 44 tests pass, compile checks are clean, SQL guards are valid correlated predicates, and parameters remain bound. No concrete defects found.
No findings were reported.
Merge-ready: layered admin protection (fetch, score, plan, execute) is implemented and tested; the scoring relaxation only removes the harshest action for backlink-only profiles and is explicitly asserted by tests; execution counting via rowcount is more accurate than before. No correctness, security, data-integrity, performance, or maintainability regressions identified.
Last reviewed commit:
3ac44fdd9184