ops: Assert Host allowlist reject in validate-check #55

Merged
eva merged 1 commits from ops/host-allowlist-reject-assert into main 2026-09-14 08:41:19 -05:00
Collaborator

Why

Empty-upstream Host allowlist is load-bearing: if that gate regresses, the cache becomes an open LAN reverse proxy again. Unit tests already cover hostAllowedForDirectFetch, but make validate-check did not probe the live reject path.

What

  • Extend make validate-check to GET /depot/allowlist-probe/chunk with Host: evil.example and Steam UA; require HTTP 400 and Invalid URL
  • Brief README + validate-config notes on expected reject behavior

Test

  • go test ./steamcache/ -run "TestHostAllowedForDirectFetch|TestDirectFetchRejectsNonSteamHost" — pass
  • Live probe against empty-upstream binary on ephemeral port — 400 Invalid URL

Risks / rollback

Makefile + docs only. Revert commit.

Fixes #37

## Why Empty-upstream Host allowlist is load-bearing: if that gate regresses, the cache becomes an open LAN reverse proxy again. Unit tests already cover `hostAllowedForDirectFetch`, but `make validate-check` did not probe the live reject path. ## What - Extend `make validate-check` to GET `/depot/allowlist-probe/chunk` with `Host: evil.example` and Steam UA; require HTTP 400 and `Invalid URL` - Brief README + validate-config notes on expected reject behavior ## Test - `go test ./steamcache/ -run "TestHostAllowedForDirectFetch|TestDirectFetchRejectsNonSteamHost"` — pass - Live probe against empty-upstream binary on ephemeral port — 400 Invalid URL ## Risks / rollback Makefile + docs only. Revert commit. Fixes #37
blake added 1 commit 2026-09-14 08:39:38 -05:00
ops: Assert Host allowlist reject in validate-check
CI / vulncheck (pull_request) Successful in 16s
CI / check-and-test (pull_request) Successful in 53s
CI / vulncheck (push) Successful in 22s
CI / check-and-test (push) Successful in 1m0s
Release Tag / release (push) Successful in 15s
97af0f829b
Empty-upstream Host allowlist is load-bearing: if that gate regresses,
the cache becomes an open LAN reverse proxy again. Unit tests already
cover hostAllowedForDirectFetch, but make validate-check did not probe
the live reject path.

Extend validate-check to GET a depot-like path with Host: evil.example
and a Steam User-Agent, requiring HTTP 400 Invalid URL. Document the
expected reject in README and the validate-config comment.

Fixes #37
eva merged commit 97af0f829b into main 2026-09-14 08:41:19 -05:00
eva deleted branch ops/host-allowlist-reject-assert 2026-09-14 08:41:19 -05:00
Sign in to join this conversation.