review, cso: a hand-built request cannot settle a header-derived gate - #2860
Open
EmilianoU26 wants to merge 1 commit into
Open
EmilianoU26 wants to merge 1 commit into
EmilianoU26 wants to merge 1 commit into
Conversation
A server that gates state-changing requests on `Origin`, `Referer` or `Sec-Fetch-*` reads a header set the browser DERIVES from policy, navigation and form target. `curl -H "Origin: ..."`, an HTTP client, an in-process test client, or setting the header by hand all fabricate that set — a green result there proves only what the author typed. In the audit: ask what the gate does when `Origin` is absent or literally `null`. Allowed is a CSRF bypass, because the check is decorative and an attacker simply omits the header. Rejected breaks real sign-ins under a known-bad pair — a `Referrer-Policy: no-referrer` response header plus an `Origin` allowlist makes the browser send `Origin: null` on a same-origin form POST. Both branches are findings; neither is "missing hardening". And since a request tool cannot settle it, report `UNVERIFIED` with the browser check named as the next step rather than discarding the finding when curl succeeds. In review: a test that sets those headers by hand is not coverage for this class — real coverage is browser-driven. Same for an account/identity switch covered only by a clean-browser test: starting from no session proves nothing about the transition. `cso/sections/audit-phases.md.tmpl` is the edited source; the `.md` is regenerated output. `review/specialists/testing.md` is hand-maintained. Parity suite: 21/21. Deliberately NOT added to the `/qa` surface, where this doctrine also belongs: `/qa` sits at its parity cap against v1.64.1.0 (adding 318 characters takes the size ratio to 1.084 against a 1.08 maximum), so landing it there needs a trade against existing `/qa` content — a maintainer's call, not something to smuggle in by trimming someone else's paragraph. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A server that gates state-changing requests on
Origin,RefererorSec-Fetch-*reads a header set the browser DERIVES from policy, navigationand form target.
curl -H "Origin: ...", an HTTP client, an in-process testclient, or setting the header by hand all fabricate that set — a green result
there proves only what the author typed.
In the audit: ask what the gate does when
Originis absent or literallynull. Allowed is a CSRF bypass, because the check is decorative and anattacker simply omits the header. Rejected breaks real sign-ins under a
known-bad pair — a
Referrer-Policy: no-referrerresponse header plus anOriginallowlist makes the browser sendOrigin: nullon a same-origin formPOST. Both branches are findings; neither is "missing hardening". And since a
request tool cannot settle it, report
UNVERIFIEDwith the browser check namedas the next step rather than discarding the finding when curl succeeds.
In review: a test that sets those headers by hand is not coverage for this
class — real coverage is browser-driven. Same for an account/identity switch
covered only by a clean-browser test: starting from no session proves nothing
about the transition.
cso/sections/audit-phases.md.tmplis the edited source; the.mdisregenerated output.
review/specialists/testing.mdis hand-maintained.Parity suite: 21/21.
Deliberately NOT added to the
/qasurface, where this doctrine also belongs:/qasits at its parity cap against v1.64.1.0 (adding 318 characters takes thesize ratio to 1.084 against a 1.08 maximum), so landing it there needs a trade
against existing
/qacontent — a maintainer's call, not something to smugglein by trimming someone else's paragraph.
🤖 Generated with Claude Code