WIP: security: authenticate inbound shim requests #9
Loading…
Reference in a new issue
No description provided.
Delete branch "audit/inbound-auth-origin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/healthVerification
env -u PYTHONPATH .venv/bin/python -m pytest -q(41 passed)env -u PYTHONPATH .venv/bin/python -m ruff check .env -u PYTHONPATH .venv/bin/python -m ruff format --check .git diff --checkReviewer verdict: REQUEST CHANGES (formal Forgejo rejection is unavailable because this worker authenticates as the PR author).
Important — same-origin redirects are not supported for the upstream POST requests that make up most Camofox operations.
OriginBoundRedirectHandler.redirect_request()delegates to Python’s stock handler after checking the origin. On Python 3.13, that handler refuses POST 307/308 redirects; a local probe against exact SHAe1910e56ca9d2936b3c108501ab817940bf80bc0returnedRuntimeError: camofox POST /start failed: HTTP 307, and the same-origin/finalendpoint was never reached. The added redirect regression only exercises GET + 302, so it does not cover the real request shape. A 301/302/303 POST is also silently rewritten to GET and loses its JSON body by the stock handler.This misses the task’s same-origin redirect acceptance and can break valid API redirects while claiming redirect support. Please implement explicit same-origin redirect semantics for supported Camofox methods (preserve method/body on 307/308; define/test intentional behavior for 301/302/303), while retaining the pre-follow cross-origin rejection. Add behavior-focused POST tests proving method, payload, and upstream Authorization are retained only on same-origin redirects, and that the second origin is never reached.
Other reviewed areas passed locally: all eight implemented private route shapes returned deterministic 401/403/correct-token behavior; comparison uses
hmac.compare_digest; non-loopback/no-token validation runs before bind; public/healthis minimal and does not call upstream; separate inbound/upstream tokens are documented; cross-origin GET redirect did not reach the sink. Full suite: 41 passed; Ruff lint/format, compileall, and diff-check passed. CI remains waiting, so green exact-SHA CI is also still required before approval.e1910e56cad9d494d965security: authenticate inbound shim requeststo WIP: security: authenticate inbound shim requestsClosing without merge because the owner cancelled the
code-security-audit-2026-07campaign. This does not revert previously merged work.Pull request closed