Skip to content

feat: incoming mesage origin validation for web - #474

Merged
tiagocandido merged 4 commits into
mainfrom
07-15-feat_incoming_mesage_origin_validation_for_web
Aug 3, 2026
Merged

feat: incoming mesage origin validation for web#474
tiagocandido merged 4 commits into
mainfrom
07-15-feat_incoming_mesage_origin_validation_for_web

Conversation

@michaeljsXu

@michaeljsXu michaeljsXu commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Validate incoming checkout messages against the checkout URL origin, shop.app, and optional exact or wildcard origins configured through allowed-origins / allowedOrigins.

Rejected messages are surfaced through onMessageRejected. Origin parsing normalizes default ports and works in browsers without URL.canParse.

How to test

From platforms/web:

pnpm lint
pnpm test

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Jul 15, 2026

michaeljsXu commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Comment thread platforms/web/src/checkout.ts Outdated
Comment thread platforms/web/src/checkout.ts Outdated
@tiagocandido
tiagocandido force-pushed the 07-15-feat_incoming_mesage_origin_validation_for_web branch from 44efc78 to 6c5a9ad Compare July 31, 2026 11:43
@tiagocandido
tiagocandido changed the base branch from main to kieran-osgood/e2e-checkout-hardcoded-buyer-identity July 31, 2026 11:45
@tiagocandido
tiagocandido marked this pull request as ready for review July 31, 2026 11:49
@tiagocandido
tiagocandido requested a review from a team as a code owner July 31, 2026 11:49
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 96%
94.62% (299/316) 81.72% (152/186) 98.71% (77/78)

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Web npm tarball 65.5 KiB 70.1 KiB +4.6 KiB
Web file breakdown
File Base Head Delta
dist/index.js.map 184.1 KiB 192.0 KiB +7.8 KiB
dist/index.d.ts 41.9 KiB 44.7 KiB +2.8 KiB
dist/custom-elements.json 40.1 KiB 43.7 KiB +3.6 KiB
dist/index.js 29.6 KiB 31.5 KiB +1.9 KiB
README.md 17.8 KiB 17.8 KiB 0 B
package.json 2.8 KiB 2.8 KiB 0 B
LICENSE 1.1 KiB 1.1 KiB 0 B

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

Comment thread platforms/web/src/checkout-protocol.test.ts Outdated
@tiagocandido
tiagocandido changed the base branch from kieran-osgood/e2e-checkout-hardcoded-buyer-identity to graphite-base/474 August 3, 2026 15:40
@tiagocandido
tiagocandido force-pushed the 07-15-feat_incoming_mesage_origin_validation_for_web branch from 081459d to 1c51e83 Compare August 3, 2026 15:40
@tiagocandido
tiagocandido changed the base branch from graphite-base/474 to main August 3, 2026 15:41
Assisted-By: devx/b6c5d227-73eb-46ef-8749-52f1bd6779d2
@tiagocandido
tiagocandido merged commit 33b7fa7 into main Aug 3, 2026
27 checks passed
@tiagocandido
tiagocandido deleted the 07-15-feat_incoming_mesage_origin_validation_for_web branch August 3, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants