docs(permalink): require explicit buyer action before cart merge - #789
Open
vishkaty wants to merge 1 commit into
Open
docs(permalink): require explicit buyer action before cart merge#789vishkaty wants to merge 1 commit into
vishkaty wants to merge 1 commit into
Conversation
Closes the CSRF-class gap identified in ucp#666: merging rendered permalink state into the existing cart of an authenticated buyer must now follow an explicit buyer action on that rendered state. Automatic merges on load, on redirect, or through a pre-filled submission do not satisfy this requirement. Rule proposed in the issue thread and tightened with westonale-facet on 2026-08-14. Fixes Universal-Commerce-Protocol#666
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.
Description
Adds a normative rule to the permalink specification that closes the CSRF-class
gap raised in #666. A permalink is an unauthenticated browser GET, and the spec
already notes that browsers, prefetchers, link-preview bots, and security
scanners load permalink URLs without buyer intent. When a Business merges
permalink-initiated state into the existing cart of an authenticated buyer
automatically, on page load, on redirect, or through a pre-filled submission,
that merge carries no evidence the buyer ever saw or intended it. A hostile
link can then mutate the cart of a signed-in buyer with no attacker
interaction beyond getting the link loaded.
The added rule requires a Business to obtain an explicit buyer action on the
rendered permalink state before performing that merge. This is scoped
narrowly: it leaves the existing irreversible-action rule untouched (a
Business MUST NOT treat loading a permalink as authorization to place an
order, charge payment, or complete checkout), and it adds no friction to the
legitimate flow, since a buyer confirming what they can already see is a
normal step, not an extra one.
As discussed in #666, this is the tightened form of the rule agreed in that
thread: an automatic merge on load, on redirect, or through a pre-filled
submit does not satisfy the requirement. Only an action the buyer takes on
state they can see does.
Verification & Testing
(
.github/linters/.markdownlint.json): 0 issues..cspell.json): 0 issues.uv run python scripts/validate_examples.py --schema-base source/schemas/:343 passed, 0 failed (unchanged from before this diff).
uv run python scripts/test_validate_examples.py: 52 passed.uv run yamllint -c .github/linters/.yamllint.yml .: clean (pre-existingwarnings only, unrelated to this file).
DOCS_MODE=spec uv run mkdocs build --strict: aborts locally only oncairosvg social-card generation, which requires a system libcairo not
present on this machine; confirmed identical on unmodified upstream/main
before this diff, so this is an environment gap, not a regression.
docs/specification/for other merge or authenticated-cart languagethat could contradict or duplicate this rule: none found. The only other
permalink construct that constructs shopping state is the
checkout/index.mdCheckout Permalink, a separate, stateless, REST-specificreconstruction mechanism with no merge-into-cart semantics of its own; it is
unaffected by this change.
Category (Required)
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
Fixes #666
Checklist
!for breaking changes).Screenshots / Logs (if applicable)
None. This is a text-only specification change.