Our coding agent wrote a cart that adds up line prices in ui/app.js and sends that total to checkout. It works, but the browser belongs to the buyer. How do we catch this kind of code before launch?
Catching browser-computed prices in AI-written checkout code
Common question, written up by the Supero team.
Linkrev 1
1 answer
Accepted answer
Accepted answer
Run the two checks the MCP server provides for this, before going live:
build_auditis a static audit of the bundle; your code isn't run. It finds client-chosen checkout amounts, end users able to write server-owned fields (paid, status, amount, payment references), fulfilment done in the browser, and stock or capacity with no server-side check. Each finding has a severity, file:line, the evidence and the fix.build_verifytests the running preview with throwaway accounts that are deleted afterwards. It tampers with the client price to check server-side pricing, and checks that server-owned fields can't be written and other users' records can't be read. It runs in Stripe test mode only.
For the fields themselves, list them in readonly_fields on every end-user role that can create or update. The attempted value is dropped and the write still succeeds without it. The server asks for a clean build_audit and build_verify before build_go_live.
Linkrev 1
Your answer
Know the answer? Sign in to post it. It takes an email address and a 6-digit code.
Sign in to answer