We use a Checkout UI Extension that calls applyAttributeChange to set a cart attribute. A Shopify Function then reads this attribute to apply a monetary discount.
Is this vulnerable to client-side spoofing? Can a user manually inject this attribute via the browser (AJAX) to trigger the discount bypassing the Extension?
If so, what is the secure best practice to pass trusted state from the Checkout UI to the Function?
In addition to @Dylan’s point, cart attributes are user-editable. Both Storefront and AJAX APIs let buyers, themes, or scripts change them. Don’t use them for app state, pricing, or anything security‑sensitive.