From 187b3ddeb70c5f8d99aee5c29b596398a3c7b669 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 9 Oct 2026 09:35:22 -0700 Subject: [PATCH 1/3] Document CDX Evidence and Probe Limits in the 404 Pass Part of #454 Co-Authored-By: Claude Sonnet 5.5 --- OPERATIONS.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OPERATIONS.md b/OPERATIONS.md index 5a230e8..5ee2e60 100644 --- a/OPERATIONS.md +++ b/OPERATIONS.md @@ -299,6 +299,7 @@ The mechanism is the `X-Blog-Check` request header, which the scripted checks se - **The field exists only because the edge is configured to log that header**, which is the host side's to hold and not this repository's. An absent field therefore has two meanings, an untagged request or a capture that stopped, and they are not distinguishable from the log alone. Confirm the capture is live before reading a day's absence as a day of real traffic. - **A hand probe carries it only because whoever runs it adds it.** `check-live-urls.sh` sends it on every request and a bare `curl` sends nothing, so an interactive probe passes `-H "X-Blog-Check: proxmox/media-dev"`. The source half stays `proxmox`, which is where the probe came from, and the id half is where the purpose goes. Two untagged probes turned up against 3,100 tagged ones in the 2026-08-09 deploy window. +- **Keep production probes to a handful per pass, because a burst gets the reviewing network banned.** The edge runs CrowdSec. Its `crowdsecurity/http-probing` scenario overflows past about 10 distinct non-static paths answered 404, 403, or 400, draining one every 10 seconds, and sets a 4-hour ban. Its `crowdsecurity/http-crawl-non_statics` scenario overflows past about 40 distinct non-static paths, draining one every 0.5 seconds. A ban shows as an empty 403 on every production site, which reads like an outage. The allowlist for the reviewing network is host-side and owned by HomeAutomation-Config. Tagging does not exempt a probe, so prefer the Wayback evidence below to a probe wherever it answers the question. - **Absence is not proof of a human**, since a scanner sends no header either, so this pairs with the scanner-shape filters below rather than replacing them. The field is forgeable and must never reach auth, rate limiting, robots handling, or caching. - **Before 2026-08-09 the log carries no such field**, and user agent is the only key for those days: on 2026-08-08, 9,285 of 9,996 requests were `curl/8.5.0`, leaving 711 real ones. That key is a coincidence rather than a rule, since the CI runner's curl and the host's are byte-identical and only the rotating client address separates them, which is why the header exists. - **The header won over four alternatives, and each lost for a reason that still holds.** Other consumers read the user agent, and a runner image bumping curl would silently break a filter built on it. A query parameter pollutes the path, which is the analysis key, and collides with the `?p=` redirects. A source address fails because CI runner addresses rotate daily. A separate check hostname would exercise a different router and certificate, so the check would stop testing what production serves. @@ -319,7 +320,9 @@ Widen `== 404` to `>= 400` for the whole non-200 sweep the table above describes **Filter the scanner shapes by shape, never by investigating them.** A site that used to run WordPress attracts probes for `.env` and its dozen variants, `wp-config.php`, `.git/config`, `phpinfo.php`, cloud credential files, and framework config paths. They dominate the raw list and none is ever a finding. What is left after the three filters above is small enough to read line by line, which is the point of running them. -**Then cross-reference what remains against the contract**, because that is the only step with an action. A surviving 404 whose path appears in [`checks/golden-urls.txt`](./checks/golden-urls.txt) or in [`deploy/maps/`](./deploy/maps/) is a redirect that is not working. A surviving 404 shaped like real content and present in neither is the case this whole pass exists to find, and it is added to the golden list with a redirect per that file's maintenance rules. A run where nothing survives is the expected result and should be recorded as one. +**Then cross-reference what remains against the contract**, because that is the only step with an action. A surviving 404 whose path appears in [`checks/golden-urls.txt`](./checks/golden-urls.txt) or in [`deploy/maps/`](./deploy/maps/) is a redirect that is not working. A surviving 404 shaped like real content and present in neither is the case this whole pass exists to find, and it is added to the golden list with a redirect per that file's maintenance rules, but only where the Wayback Machine shows the old platform answered it. A run where nothing survives is the expected result and should be recorded as one. + +**Establish that an address was ever served from the Wayback Machine's CDX API rather than from a production probe.** Run one query per path prefix, for example `https://web.archive.org/cdx/search/cdx?url=blog.example.com//&matchType=prefix&filter=original:&output=json`, and add `&filter=statuscode:200` to keep only captures that answered. A capture with a 200 is the evidence, and no capture at all rules the class out. A wildcard `url` combined with a filter returned nothing, so use `matchType=prefix` instead. **A missing `Host` header is the third way this data breaks a filter.** `RequestHost` is null on a request that sends none, which router exploits do. String functions reject that where arithmetic tolerates it, so `.RequestHost | startswith(...)` fails with `startswith() requires string inputs` and takes the whole run with it, while `.RequestHost + .RequestPath` quietly yields the path alone. The failure is loud but partial, which is the worst combination, since it aborts part way through a file having already printed real output. Guard the string functions with `// ""`. Equality and concatenation both tolerate a null, so a guard on those is inert and reads as protection that is not there. From 64cf488216794e90fad54ee10e4d6a6f37301547 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 9 Oct 2026 09:37:12 -0700 Subject: [PATCH 2/3] Tighten the 404 Pass Probe and CDX Guidance Part of #454 Co-Authored-By: Claude Sonnet 5.5 --- OPERATIONS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OPERATIONS.md b/OPERATIONS.md index 5ee2e60..e372269 100644 --- a/OPERATIONS.md +++ b/OPERATIONS.md @@ -299,10 +299,10 @@ The mechanism is the `X-Blog-Check` request header, which the scripted checks se - **The field exists only because the edge is configured to log that header**, which is the host side's to hold and not this repository's. An absent field therefore has two meanings, an untagged request or a capture that stopped, and they are not distinguishable from the log alone. Confirm the capture is live before reading a day's absence as a day of real traffic. - **A hand probe carries it only because whoever runs it adds it.** `check-live-urls.sh` sends it on every request and a bare `curl` sends nothing, so an interactive probe passes `-H "X-Blog-Check: proxmox/media-dev"`. The source half stays `proxmox`, which is where the probe came from, and the id half is where the purpose goes. Two untagged probes turned up against 3,100 tagged ones in the 2026-08-09 deploy window. -- **Keep production probes to a handful per pass, because a burst gets the reviewing network banned.** The edge runs CrowdSec. Its `crowdsecurity/http-probing` scenario overflows past about 10 distinct non-static paths answered 404, 403, or 400, draining one every 10 seconds, and sets a 4-hour ban. Its `crowdsecurity/http-crawl-non_statics` scenario overflows past about 40 distinct non-static paths, draining one every 0.5 seconds. A ban shows as an empty 403 on every production site, which reads like an outage. The allowlist for the reviewing network is host-side and owned by HomeAutomation-Config. Tagging does not exempt a probe, so prefer the Wayback evidence below to a probe wherever it answers the question. - **Absence is not proof of a human**, since a scanner sends no header either, so this pairs with the scanner-shape filters below rather than replacing them. The field is forgeable and must never reach auth, rate limiting, robots handling, or caching. - **Before 2026-08-09 the log carries no such field**, and user agent is the only key for those days: on 2026-08-08, 9,285 of 9,996 requests were `curl/8.5.0`, leaving 711 real ones. That key is a coincidence rather than a rule, since the CI runner's curl and the host's are byte-identical and only the rotating client address separates them, which is why the header exists. - **The header won over four alternatives, and each lost for a reason that still holds.** Other consumers read the user agent, and a runner image bumping curl would silently break a filter built on it. A query parameter pollutes the path, which is the analysis key, and collides with the `?p=` redirects. A source address fails because CI runner addresses rotate daily. A separate check hostname would exercise a different router and certificate, so the check would stop testing what production serves. +- **Keep production probes to a handful per pass, because a burst gets the reviewing network banned.** The edge runs CrowdSec. Its `crowdsecurity/http-probing` scenario overflows past about 10 distinct non-static paths answered 404, 403, or 400, and drains one every 10 seconds. Its `crowdsecurity/http-crawl-non_statics` scenario overflows past about 40 distinct non-static paths, and drains one every 0.5 seconds. Either overflow sets a 4-hour ban. A ban shows as an empty 403 on every production site, which reads like an outage. The allowlist for the reviewing network is host-side and owned by HomeAutomation-Config. Prefer the Wayback evidence below to a probe wherever it answers the question. **A referer does not implicate this site unless it points somewhere else.** The rule worth applying is that a 404 carrying a referer is a broken link and a 404 without one is a typed or probed address, and it fails on scanners, which set `Referer` to the request URL itself. Every one of the 36 referer-bearing site-host 404s on 2026-08-08 was self-referential, so the unrefined rule reported three dozen broken links on a site that had none. Discard the matches before counting, and **normalize the scheme rather than comparing it**, because a scanner reaching an HTTPS site routinely sends an `http://` referer for the same address. Comparing against the request's own scheme therefore matches nothing and leaves every false positive in place: on the 2026-08-08 data the naive form kept all 36 where the normalized form kept none. @@ -320,9 +320,9 @@ Widen `== 404` to `>= 400` for the whole non-200 sweep the table above describes **Filter the scanner shapes by shape, never by investigating them.** A site that used to run WordPress attracts probes for `.env` and its dozen variants, `wp-config.php`, `.git/config`, `phpinfo.php`, cloud credential files, and framework config paths. They dominate the raw list and none is ever a finding. What is left after the three filters above is small enough to read line by line, which is the point of running them. -**Then cross-reference what remains against the contract**, because that is the only step with an action. A surviving 404 whose path appears in [`checks/golden-urls.txt`](./checks/golden-urls.txt) or in [`deploy/maps/`](./deploy/maps/) is a redirect that is not working. A surviving 404 shaped like real content and present in neither is the case this whole pass exists to find, and it is added to the golden list with a redirect per that file's maintenance rules, but only where the Wayback Machine shows the old platform answered it. A run where nothing survives is the expected result and should be recorded as one. +**Then cross-reference what remains against the contract**, because that is the only step with an action. A surviving 404 whose path appears in [`checks/golden-urls.txt`](./checks/golden-urls.txt) or in [`deploy/maps/`](./deploy/maps/) is a redirect that is not working. A surviving 404 shaped like real content and present in neither is the case this whole pass exists to find, and it is added to the golden list with a redirect per that file's maintenance rules. It joins the list only where the Wayback Machine shows the address was served. A run where nothing survives is the expected result and should be recorded as one. -**Establish that an address was ever served from the Wayback Machine's CDX API rather than from a production probe.** Run one query per path prefix, for example `https://web.archive.org/cdx/search/cdx?url=blog.example.com//&matchType=prefix&filter=original:&output=json`, and add `&filter=statuscode:200` to keep only captures that answered. A capture with a 200 is the evidence, and no capture at all rules the class out. A wildcard `url` combined with a filter returned nothing, so use `matchType=prefix` instead. +**Use the Wayback Machine's CDX API, not a production probe, to establish that an address was ever served.** Run one query per path prefix, for example `https://web.archive.org/cdx/search/cdx?url=blog.example.com//&matchType=prefix&filter=original:&output=json`. URL-encode the regex, since a raw `+` or `&` changes the filter. Add `&filter=statuscode:200` to keep only captures that answered. A 200 capture is the evidence, and a prefix with no 200 capture was never served. A wildcard `url` combined with a filter returns nothing, so use `matchType=prefix`. **A missing `Host` header is the third way this data breaks a filter.** `RequestHost` is null on a request that sends none, which router exploits do. String functions reject that where arithmetic tolerates it, so `.RequestHost | startswith(...)` fails with `startswith() requires string inputs` and takes the whole run with it, while `.RequestHost + .RequestPath` quietly yields the path alone. The failure is loud but partial, which is the worst combination, since it aborts part way through a file having already printed real output. Guard the string functions with `// ""`. Equality and concatenation both tolerate a null, so a guard on those is inert and reads as protection that is not there. From 053e877af75c4ad563717a48da884cea0a1b3846 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 9 Oct 2026 10:02:48 -0700 Subject: [PATCH 3/3] State That an Empty CDX Result Is Not Proof Part of #454 Co-Authored-By: Claude Sonnet 5.5 --- OPERATIONS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OPERATIONS.md b/OPERATIONS.md index e372269..889c17c 100644 --- a/OPERATIONS.md +++ b/OPERATIONS.md @@ -322,7 +322,7 @@ Widen `== 404` to `>= 400` for the whole non-200 sweep the table above describes **Then cross-reference what remains against the contract**, because that is the only step with an action. A surviving 404 whose path appears in [`checks/golden-urls.txt`](./checks/golden-urls.txt) or in [`deploy/maps/`](./deploy/maps/) is a redirect that is not working. A surviving 404 shaped like real content and present in neither is the case this whole pass exists to find, and it is added to the golden list with a redirect per that file's maintenance rules. It joins the list only where the Wayback Machine shows the address was served. A run where nothing survives is the expected result and should be recorded as one. -**Use the Wayback Machine's CDX API, not a production probe, to establish that an address was ever served.** Run one query per path prefix, for example `https://web.archive.org/cdx/search/cdx?url=blog.example.com//&matchType=prefix&filter=original:&output=json`. URL-encode the regex, since a raw `+` or `&` changes the filter. Add `&filter=statuscode:200` to keep only captures that answered. A 200 capture is the evidence, and a prefix with no 200 capture was never served. A wildcard `url` combined with a filter returns nothing, so use `matchType=prefix`. +**Use the Wayback Machine's CDX API, not a production probe, to establish that an address was ever served.** Run one query per path prefix, for example `https://web.archive.org/cdx/search/cdx?url=blog.example.com//&matchType=prefix&filter=original:&output=json`. URL-encode the regex, since a raw `+` or `&` changes the filter. Add `&filter=statuscode:200` to keep only captures that answered. A 200 capture is the evidence. An empty result is only an absence of evidence, since Wayback coverage is incomplete, so it does not prove the address was never served. A wildcard `url` combined with a filter returns nothing, so use `matchType=prefix`. **A missing `Host` header is the third way this data breaks a filter.** `RequestHost` is null on a request that sends none, which router exploits do. String functions reject that where arithmetic tolerates it, so `.RequestHost | startswith(...)` fails with `startswith() requires string inputs` and takes the whole run with it, while `.RequestHost + .RequestPath` quietly yields the path alone. The failure is loud but partial, which is the worst combination, since it aborts part way through a file having already printed real output. Guard the string functions with `// ""`. Equality and concatenation both tolerate a null, so a guard on those is inert and reads as protection that is not there.