Page MenuHomePhabricator

Small Wiki Toolkits: How-to guidelines and/or potential recommendations for AbuseFilter
Closed, ResolvedPublic

Description

I sometimes find requests from newly created wikis for help with setting up AbuseFilter rules on that wiki.
Recent example: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29#Creating_an_Abuse_filter (and static permalink)

So I'm wondering which specific docs to point to (and if docs might welcome some improvements).
Is https://en.wikipedia.org/wiki/Wikipedia:Edit_filter/Requested the best place these days, or are there better places?

Event Timeline

Aklapper triaged this task as Lowest priority.Mar 3 2020, 4:38 AM
Aklapper created this task.
Aklapper updated the task description. (Show Details)

Task might welcome input from stewards. :)

Quiddity pointed out that I might be wrong about

"Should https://www.mediawiki.org/wiki/Extension:AbuseFilter/Global really be linked here?

in the task description, as it's related to "Global abuse filters were subsequently implemented and are set and operated from Meta-Wiki.". So I'll remove that.

https://phabricator.wikimedia.org/T242441 as an example for help requests that made me create this task

I'm going to look into this but your help is definitely very welcome if you have experience in this area. :)

Aklapper raised the priority of this task from Lowest to Medium.Apr 10 2020, 11:07 AM

@Aklapper Please do feel free to ask me anything, should you need any clarification.

@Daimona: Thank you! :)

I created a (hopefully) simple and short text to explain the basics for a new small wiki community which does not have tech expertise but people willing to learn new things. If you or anyone else interested could give it a read, that would be great: https://www.mediawiki.org/wiki/User:AKlapper_(WMF)/Sandbox/T246734
Feel free to correct, edit, either directly on-wiki or via feedback in this task.

I think the only question I want to confirm is if https://en.wikipedia.org/wiki/en:Wikipedia:Edit_filter/Requested is really the place to recommend when someone needs help with writing a filter. (What I already learned in the last hours: Default global filter rules exist; the correct terminology is "filters consist of rules and actions".)

And I wonder if we should "warn" people in that text already if they want to write their own filters that they should have basic knowledge of regexes, or be willing to learn regexes.

I created a (hopefully) simple and short text to explain the basics for a new small wiki community which does not have tech expertise but people willing to learn new things. If you or anyone else interested could give it a read, that would be great: https://www.mediawiki.org/wiki/User:AKlapper_(WMF)/Sandbox/T246734
Feel free to correct, edit, either directly on-wiki or via feedback in this task.

I gave it a read, and found that it's already great! Below are some suggestions. I'm not writing them on-wiki directly because I have a bad habit of being too technical :) Feel free to ignore some (or all!) of the suggestions, I'm writing them for completeness.


The filters automatically check every edit [...]

And also other actions like account creation and page move, although edit is the most common.

When an edit matches conditions in a rule, then an action is performed.

More than one action can be specified (this is especially useful with warn + block)

The filter can also tag the edit summary, warn the editor, revoke the editor's autoconfirmed status, and/or block the edit.

I'd suggest changing the wording to "disallow the edit": the filter can also block the editor, block an IP range, and remove all user groups from the editor (the latter two being very uncommon).

Global filters are enabled on all small wikis by default.

Perhaps mention that it's possible to enable them for other wikis, too?

then you need to be in the edit filter manager group.

This is config-dependant. By default, these rights are assigned to all sysops. Some wikis (like enwiki) do have specific AF-related groups, but not all of them. https://meta.wikimedia.org/wiki/AbuseFilter has a nice overview of the status quo.

To write a filter, use Special:AbuseFilter/tools

I think it should be Special:AbuseFilter/new? /tools is for testing filter syntax without referring to a specific edit (whereas /test allows testing filter syntax on a batch of edits).

If you need access to the data in the edit filter logs, contact the Abuse filter helpers global group.

I don't get why the global group. Contacting local sysops/AF-helpers is probably faster?


I think the only question I want to confirm is if https://en.wikipedia.org/wiki/en:Wikipedia:Edit_filter/Requested is really the place to recommend when someone needs help with writing a filter.

I think that might be for enwiki only? Alternatively, you could suggest https://www.mediawiki.org/wiki/Extension_talk:AbuseFilter -- I've seen it used for rule requests in the past. Or perhaps we should create a brand new help page, maybe on meta?

And I wonder if we should "warn" people in that text already if they want to write their own filters that they should have basic knowledge of regexes, or be willing to learn regexes.

In theory, it's not necessary. Sure, most filters checking stuff in the page content will have to use regexps, but it's not mandatory. Some filters only need plain string comparison (or substring check). Others don't even mess with strings at all. I was curious to see how many filters actually use regexps. On itwiki, out of 176 active filters, 140 use regexps.

@Daimona: Thanks for the quick feedback! I incorporated everything in https://www.mediawiki.org/w/index.php?title=User%3AAKlapper_%28WMF%29%2FSandbox%2FT246734&type=revision&diff=3772321&oldid=3771854 except for two items below which I need to better understand:

then you need to be in the edit filter manager group.

This is config-dependant. By default, these rights are assigned to all sysops. Some wikis (like enwiki) do have specific AF-related groups, but not all of them. https://meta.wikimedia.org/wiki/AbuseFilter has a nice overview of the status quo.

Ah, alright... If I was a member of a small community which has a pretty new wiki and I'd want to create our first local Abusefilter filter, would I have to contact sysops for that, to get permissions to create that filter myself? That page is good but also confusing if you don't know much about user groups (like me). :)

If you need access to the data in the edit filter logs, contact the Abuse filter helpers global group.

I don't get why the global group. Contacting local sysops/AF-helpers is probably faster?

The page mostly targets small wikis. Would they have local sysops/AF-helpers?
But yes, I should probably rewrite and make clear "first try local. And if there are no local folks, try global"?

if https://en.wikipedia.org/wiki/en:Wikipedia:Edit_filter/Requested is really the place to recommend when someone needs help

I think that might be for enwiki only? Alternatively, you could suggest https://www.mediawiki.org/wiki/Extension_talk:AbuseFilter -- I've seen it used for rule requests in the past. Or perhaps we should create a brand new help page, maybe on meta?

Good question... I've linked to both now, because I'd like to avoid [more] fragmentation of discussion venues (Wikimedia is already bad when it comes to that).

Looks perfect!

then you need to be in the edit filter manager group.

This is config-dependant. By default, these rights are assigned to all sysops. Some wikis (like enwiki) do have specific AF-related groups, but not all of them. https://meta.wikimedia.org/wiki/AbuseFilter has a nice overview of the status quo.

Ah, alright... If I was a member of a small community which has a pretty new wiki and I'd want to create our first local Abusefilter filter, would I have to contact sysops for that, to get permissions to create that filter myself? That page is good but also confusing if you don't know much about user groups (like me). :)

On a fresh wiki, sysops should be the ones who can create filters. In order for you to get the permissions, you'd likely have to become a sysop. It's possible to create a dedicated group (like on enwiki), but that depends on what the community decides to do.

If you need access to the data in the edit filter logs, contact the Abuse filter helpers global group.

I don't get why the global group. Contacting local sysops/AF-helpers is probably faster?

The page mostly targets small wikis. Would they have local sysops/AF-helpers?
But yes, I should probably rewrite and make clear "first try local. And if there are no local folks, try global"?

If the wiki has no local sysops, then they could try contacting someone in the new Abuse filter maintainer group. Explicating "local, then global" sounds good, too.

if https://en.wikipedia.org/wiki/en:Wikipedia:Edit_filter/Requested is really the place to recommend when someone needs help

I think that might be for enwiki only? Alternatively, you could suggest https://www.mediawiki.org/wiki/Extension_talk:AbuseFilter -- I've seen it used for rule requests in the past. Or perhaps we should create a brand new help page, maybe on meta?

Good question... I've linked to both now, because I'd like to avoid [more] fragmentation of discussion venues (Wikimedia is already bad when it comes to that).

WFM

On a fresh wiki, sysops should be the ones who can create filters. In order for you to get the permissions, you'd likely have to become a sysop. It's possible to create a dedicated group (like on enwiki), but that depends on what the community decides to do.

If the wiki has no local sysops, then they could try contacting someone in the new Abuse filter maintainer group. Explicating "local, then global" sounds good, too.

@Daimona: Interesting, thanks! I had only found https://meta.wikimedia.org/wiki/Global_sysops#Permissions mentioning AbuseFilter filter modifications but had not known about the Abuse Filter maintainer group. I now wrote If your wiki has no local sysops, then you can contact the [[meta:Abuse filter maintainer|global Abuse filter maintainer group]] for help, or [[meta:Global sysops|global sysops]].

See https://www.mediawiki.org/w/index.php?title=User%3AAKlapper_%28WMF%29%2FSandbox%2FT246734&type=revision&diff=3778816&oldid=3772321

Alright, see https://meta.wikimedia.org/wiki/Small_wiki_toolkits/Starter_kit/AbuseFilter - further improvements / edits on that page welcome!

And again BIG THANKS, especially to Daimona!

@Daimona: Interesting, thanks! I had only found https://meta.wikimedia.org/wiki/Global_sysops#Permissions mentioning AbuseFilter filter modifications but had not known about the Abuse Filter maintainer group.

That's not surprising, as the group was created after this vote two weeks ago :)

And again BIG THANKS, especially to Daimona!

Happy to help, I remain available should you need further clarifications!

@Daimona: Interesting, thanks! I had only found https://meta.wikimedia.org/wiki/Global_sysops#Permissions mentioning AbuseFilter filter modifications but had not known about the Abuse Filter maintainer group. I now wrote If your wiki has no local sysops, then you can contact the [[meta:Abuse filter maintainer|global Abuse filter maintainer group]] for help, or [[meta:Global sysops|global sysops]].

See https://www.mediawiki.org/w/index.php?title=User%3AAKlapper_%28WMF%29%2FSandbox%2FT246734&type=revision&diff=3778816&oldid=3772321

Neither abuse filter maintainers nor global sysops can create abuse filters locally; they can only modify them. How do we go about supporting small wikis in this instance? If the wiki has no local sysops, these two groups are unable to help.

@Daimona: Interesting, thanks! I had only found https://meta.wikimedia.org/wiki/Global_sysops#Permissions mentioning AbuseFilter filter modifications but had not known about the Abuse Filter maintainer group. I now wrote If your wiki has no local sysops, then you can contact the [[meta:Abuse filter maintainer|global Abuse filter maintainer group]] for help, or [[meta:Global sysops|global sysops]].

See https://www.mediawiki.org/w/index.php?title=User%3AAKlapper_%28WMF%29%2FSandbox%2FT246734&type=revision&diff=3778816&oldid=3772321

Neither abuse filter maintainers nor global sysops can create abuse filters locally; they can only modify them.

Is it explicit in the policy of GS? For AFM, at least, I don't see anything against creating new filters, if the local community wishes so.

@Daimona: Interesting, thanks! I had only found https://meta.wikimedia.org/wiki/Global_sysops#Permissions mentioning AbuseFilter filter modifications but had not known about the Abuse Filter maintainer group. I now wrote If your wiki has no local sysops, then you can contact the [[meta:Abuse filter maintainer|global Abuse filter maintainer group]] for help, or [[meta:Global sysops|global sysops]].

See https://www.mediawiki.org/w/index.php?title=User%3AAKlapper_%28WMF%29%2FSandbox%2FT246734&type=revision&diff=3778816&oldid=3772321

Neither abuse filter maintainers nor global sysops can create abuse filters locally; they can only modify them.

Is it explicit in the policy of GS? For AFM, at least, I don't see anything against creating new filters, if the local community wishes so.

Scratch that - this is permissable, https://meta.wikimedia.org/wiki/Global_sysops#Permissions transcludes MediaWiki:Right-abusefilter-modify mislead me to believe only modification was permitted. Fix requested in T250592.