README: compose example for the open internet, with common waf settings (closes #381) #413

Merged
clawbot merged 7 commits from issue-381-compose-waf-settings into next 2026-11-19 11:16:16 +01:00
Collaborator

Closes #381 (closes #381).

Adds "On the open internet" to the README's docker-compose examples: one gitea behind traefik, rproxy and waf. It replaces the example posted only as a comment on the issue, which sneak called bad because waf set almost nothing.

  • waf sets nine settings most sites use: instance name, SWW_WAF_APPS, monitoring and office/CI exemptions, trap paths, the Spamhaus DROP blocklist, an admin token file and ntfy alerts.
  • Eight more waf settings follow, commented out, each saying what it does and when to set it. One commented rproxy line raises the request size for large git pushes, since gitea is the example app.
  • Under the file: what to change before the first start, and how to make the admin token file.

Not obvious from the diff:

  • next did not exist, since it was merged into main and deleted on 2026-11-19. I recreated it at main's head (dadd576) as the base for this PR.
  • Unverified: traefik's flags and labels were not run.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/smallwebwaf/issues/381 (closes #381). Adds "On the open internet" to the README's docker-compose examples: one gitea behind traefik, `rproxy` and `waf`. It replaces the example posted only as a comment on the issue, which sneak called bad because `waf` set almost nothing. - `waf` sets nine settings most sites use: instance name, `SWW_WAF_APPS`, monitoring and office/CI exemptions, trap paths, the Spamhaus DROP blocklist, an admin token file and ntfy alerts. - Eight more `waf` settings follow, commented out, each saying what it does and when to set it. One commented `rproxy` line raises the request size for large git pushes, since gitea is the example app. - Under the file: what to change before the first start, and how to make the admin token file. Not obvious from the diff: - `next` did not exist, since it was merged into `main` and deleted on 2026-11-19. I recreated it at `main`'s head (`dadd576`) as the base for this PR. - Unverified: traefik's flags and labels were not run. Model: opus-5-5
clawbot added the needs-review label 2026-11-19 08:45:51 +01:00
clawbot self-assigned this 2026-11-19 08:45:52 +01:00
clawbot added 1 commit 2026-11-19 08:45:52 +01:00
A new example puts one gitea behind traefik, rproxy and waf. waf sets
nine settings most sites use, then eight more commented out, each with
what it does and when to set it.

Model: opus-5-5
clawbot added 4 commits 2026-11-19 09:24:48 +01:00
The example pulled traefik:v3.7.19 by its tag, which the registry can
move; the repository's policy and every other image reference in the
repository name an image by its digest.

Model: opus-5-5
The commented rproxy line said it accepts git pushes up to 1 GiB, but
raised only SWW_RPROXY_MAX_REQUEST_SIZE. SWW_RPROXY_MAX_REQUEST_TIME_MS
still gave the body 60 seconds to arrive, so most such pushes were
answered 408.

Model: opus-5-5
"Which would pass the rate limits" reads as either getting through the
limits or going over them, the opposite reasons for the exemption.

Model: opus-5-5
SWW_WAF_ALERT_NTFY_URL is set to a placeholder on example.com, but the
list of what to change before the first start left it out, so a copied
example sent every alert nowhere.

Model: opus-5-5
Author
Collaborator

Verdict: FAIL
Head: f2fd9cd734

  1. README.md, "On the open internet", traefik service: image: traefik:v3.7.19 names the image by tag, which the registry can move. REPO_POLICIES.md requires every external reference pinned by hash, and every other image in the repository is named by digest. Acceptable: traefik@sha256: and the digest of v3.7.19, with a comment giving the version and date, as in the Dockerfile.
  2. README.md, rproxy service: the comment "Accept git pushes up to 1 GiB" covers only SWW_RPROXY_MAX_REQUEST_SIZE. SWW_RPROXY_MAX_REQUEST_TIME_MS still gives the body 60 seconds, so most 1 GiB pushes are answered 408. Acceptable: a second commented line raising SWW_RPROXY_MAX_REQUEST_TIME_MS, and a comment that says so.
  3. README.md, waf service: "The office and the CI runner, which would pass the rate limits" reads as either getting through the limits or going over them. Acceptable: "exceed".
  4. README.md, "Change these before the first start": SWW_WAF_ALERT_NTFY_URL is a placeholder on example.com but is not in the list, so a copied example sends every alert nowhere. Acceptable: the ntfy topic's URL in that list.
  • Unverified: traefik's flags and labels; the stack was not started.

Model: opus-5-5

Verdict: FAIL Head: f2fd9cd734bd560b33fecc917c14d1d321e0bc15 1. `README.md`, "On the open internet", `traefik` service: `image: traefik:v3.7.19` names the image by tag, which the registry can move. `REPO_POLICIES.md` requires every external reference pinned by hash, and every other image in the repository is named by digest. Acceptable: `traefik@sha256:` and the digest of v3.7.19, with a comment giving the version and date, as in the `Dockerfile`. 2. `README.md`, `rproxy` service: the comment "Accept git pushes up to 1 GiB" covers only `SWW_RPROXY_MAX_REQUEST_SIZE`. `SWW_RPROXY_MAX_REQUEST_TIME_MS` still gives the body 60 seconds, so most 1 GiB pushes are answered `408`. Acceptable: a second commented line raising `SWW_RPROXY_MAX_REQUEST_TIME_MS`, and a comment that says so. 3. `README.md`, `waf` service: "The office and the CI runner, which would pass the rate limits" reads as either getting through the limits or going over them. Acceptable: "exceed". 4. `README.md`, "Change these before the first start": `SWW_WAF_ALERT_NTFY_URL` is a placeholder on `example.com` but is not in the list, so a copied example sends every alert nowhere. Acceptable: the ntfy topic's URL in that list. - Unverified: traefik's flags and labels; the stack was not started. Model: opus-5-5
clawbot added 1 commit 2026-11-19 09:51:43 +01:00
The commented rproxy lines said a git push may take up to 10 minutes to
send, but traefik v3 gives a whole request, body included, 60 seconds by
default, and answers 502 to a slower one. A commented traefik line now
raises its readTimeout to match.

Model: opus-5-5
Author
Collaborator

Verdict: FAIL
Head: 3222c55009

  1. README.md, "On the open internet", rproxy service: the commented lines say a git push may take up to 10 minutes to send, but traefik v3 gives a whole request, body included, 60 seconds by default (respondingTimeouts.readTimeout) and answers 502 to a slower one, so those pushes still fail. Acceptable: a commented traefik flag --entryPoints.websecure.transport.respondingTimeouts.readTimeout=600s in the traefik service, and the rproxy comment naming it.
  • Deviation: this finding is already fixed on the branch; the verdict is posted because my brief requires one.
  • Unverified: make test and make lint were not run, since the change touches only README.md and the host was too loaded for the race tests; the whole stack was not started.

Model: opus-5-5

Verdict: FAIL Head: 3222c55009c77ecafd8fa91c2f654d1543f422e7 1. `README.md`, "On the open internet", `rproxy` service: the commented lines say a git push may take up to 10 minutes to send, but traefik v3 gives a whole request, body included, 60 seconds by default (`respondingTimeouts.readTimeout`) and answers `502` to a slower one, so those pushes still fail. Acceptable: a commented traefik flag `--entryPoints.websecure.transport.respondingTimeouts.readTimeout=600s` in the `traefik` service, and the `rproxy` comment naming it. - Deviation: this finding is already fixed on the branch; the verdict is posted because my brief requires one. - Unverified: `make test` and `make lint` were not run, since the change touches only `README.md` and the host was too loaded for the race tests; the whole stack was not started. Model: opus-5-5
clawbot added 1 commit 2026-11-19 10:16:25 +01:00
The commented SWW_WAF_BAN_RESPONSE line said close drops a refused
client's connection, but in this example traefik is in front and
answers the client 502 when rproxy closes the connection. The comment
now says so, and why someone would set it.

Model: opus-5-5
Author
Collaborator

Verdict: FAIL
Head: 5b5a12e57c

  1. README.md, "On the open internet", the commented SWW_WAF_BAN_RESPONSE: close line: the comment says close drops the refused client's connection. In this example traefik is in front, and SPEC.md says the TLS-terminating proxy then answers the client 502. The comment also gives no reason to set it. Acceptable: the comment says traefik answers 502, so a scraper cannot tell a ban from a broken site.
  • Deviation: finding 1 is fixed on the branch in 330501484756e30ecd14c22c99ee9add76969f50. The verdict is posted because my brief requires one.
  • Unverified: make test and make lint were not run. The race tests use a build cache held in RAM and run 48 at a time, which does not fit this session's memory limit. The change touches only README.md, and no test or lint step reads it.
  • Judgement call: the mkdir and chown steps for the admin token file follow the README's existing ntfy token example. I did not count them against the ruling that bars documenting mkdir or chown of a host data directory.

Model: opus-5-5

Verdict: FAIL Head: 5b5a12e57c086971cd02042f98f68153279cd77b 1. `README.md`, "On the open internet", the commented `SWW_WAF_BAN_RESPONSE: close` line: the comment says `close` drops the refused client's connection. In this example traefik is in front, and `SPEC.md` says the TLS-terminating proxy then answers the client `502`. The comment also gives no reason to set it. Acceptable: the comment says traefik answers `502`, so a scraper cannot tell a ban from a broken site. - Deviation: finding 1 is fixed on the branch in `330501484756e30ecd14c22c99ee9add76969f50`. The verdict is posted because my brief requires one. - Unverified: `make test` and `make lint` were not run. The race tests use a build cache held in RAM and run 48 at a time, which does not fit this session's memory limit. The change touches only `README.md`, and no test or lint step reads it. - Judgement call: the `mkdir` and `chown` steps for the admin token file follow the README's existing ntfy token example. I did not count them against the ruling that bars documenting `mkdir` or `chown` of a host data directory. Model: opus-5-5
Author
Collaborator

Verdict: PASS
Head: 3305014847

The "On the open internet" compose example meets the issue's definition of done: waf sets nine common settings and lists eight more, commented out, each one named and valued as the current code accepts it.

  • Unverified: the test and lint phases were not run. The change touches only README.md, which neither phase reads, and the race tests do not fit this session's memory limit.
  • Unverified: traefik's flags and labels; the stack was not started.
  • Judgement call: the mkdir and chown steps for the admin token file follow the README's existing ntfy token example. I did not count them against the ruling on host data directories.

Model: opus-5-5

Verdict: PASS Head: 330501484756e30ecd14c22c99ee9add76969f50 The "On the open internet" compose example meets the issue's definition of done: `waf` sets nine common settings and lists eight more, commented out, each one named and valued as the current code accepts it. - Unverified: the test and lint phases were not run. The change touches only `README.md`, which neither phase reads, and the race tests do not fit this session's memory limit. - Unverified: traefik's flags and labels; the stack was not started. - Judgement call: the `mkdir` and `chown` steps for the admin token file follow the README's existing ntfy token example. I did not count them against the ruling on host data directories. Model: opus-5-5
clawbot merged commit eb48796f27 into next 2026-11-19 11:16:16 +01:00
Sign in to join this conversation.